mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 00:29:43 -04:00
rm null-ls
This commit is contained in:
parent
abb95f51b4
commit
2638d6dbaf
1 changed files with 21 additions and 24 deletions
|
|
@ -21,30 +21,27 @@ require("notify").setup({
|
||||||
|
|
||||||
local lsp = require("lsp-zero").preset({})
|
local lsp = require("lsp-zero").preset({})
|
||||||
|
|
||||||
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
--require("null-ls").setup({
|
||||||
local on_attach = function(client, bufnr)
|
-- -- you can reuse a shared lspconfig on_attach callback here
|
||||||
if client.supports_method("textDocument/formatting") then
|
-- on_attach = function(client, bufnr)
|
||||||
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
-- if client.supports_method("textDocument/formatting") then
|
||||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
-- vim.api.nvim_clear_autocmds({ group = vim.api.nvim_create_augroup("LspFormatting", {}), buffer = bufnr })
|
||||||
group = augroup,
|
-- vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
buffer = bufnr,
|
-- group = augroup,
|
||||||
callback = function()
|
-- buffer = bufnr,
|
||||||
vim.lsp.buf.format({
|
-- callback = function()
|
||||||
bufnr = bufnr,
|
-- vim.lsp.buf.format({
|
||||||
filter = function(client)
|
-- bufnr = bufnr,
|
||||||
return client.name == "null-ls"
|
-- filter = function(client)
|
||||||
end,
|
-- return client.name == "null-ls"
|
||||||
})
|
-- end,
|
||||||
vim.lsp.buf.formatting_sync()
|
-- })
|
||||||
end,
|
-- vim.lsp.buf.formatting_sync()
|
||||||
})
|
-- end,
|
||||||
end
|
-- })
|
||||||
end
|
-- end
|
||||||
|
-- end,
|
||||||
require("null-ls").setup({
|
--})
|
||||||
-- you can reuse a shared lspconfig on_attach callback here
|
|
||||||
on_attach = on_attach,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
||||||
lsp.setup_servers({
|
lsp.setup_servers({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue