Add ruff-lsp, remove some null-ls plugins
This commit is contained in:
parent
0021b8800f
commit
d99629439d
|
@ -20,7 +20,7 @@ M.on_attach = require "lsp.attach"
|
||||||
M.lsp_flags = require "lsp.flags"
|
M.lsp_flags = require "lsp.flags"
|
||||||
M.capabilities = require("cmp_nvim_lsp").default_capabilities()
|
M.capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||||
|
|
||||||
local servers = { "pyright", "nil_ls", "lua_ls", "fortls", "yamlls", "vimls", "bashls" }
|
local servers = { "pyright", "ruff_lsp", "nil_ls", "lua_ls", "fortls", "yamlls", "vimls", "bashls" }
|
||||||
for _, name in ipairs(servers) do
|
for _, name in ipairs(servers) do
|
||||||
require("lspconfig")[name].setup {
|
require("lspconfig")[name].setup {
|
||||||
on_attach = M.on_attach,
|
on_attach = M.on_attach,
|
||||||
|
|
|
@ -3,9 +3,6 @@ local lsp_formatting = function(bufnr)
|
||||||
bufnr = bufnr,
|
bufnr = bufnr,
|
||||||
timeout_ms = 2000,
|
timeout_ms = 2000,
|
||||||
async = true,
|
async = true,
|
||||||
filter = function(client)
|
|
||||||
return client.name ~= "jedi_language_server" and client.name ~= "lua_ls"
|
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
return lsp_formatting
|
return lsp_formatting
|
||||||
|
|
|
@ -1,13 +1,8 @@
|
||||||
local null_ls = require "null-ls"
|
local null_ls = require "null-ls"
|
||||||
return {
|
return {
|
||||||
null_ls.builtins.code_actions.gitsigns,
|
null_ls.builtins.code_actions.gitsigns,
|
||||||
null_ls.builtins.diagnostics.zsh,
|
|
||||||
null_ls.builtins.diagnostics.mypy,
|
|
||||||
null_ls.builtins.diagnostics.ruff,
|
|
||||||
null_ls.builtins.formatting.black,
|
null_ls.builtins.formatting.black,
|
||||||
null_ls.builtins.formatting.isort,
|
null_ls.builtins.formatting.isort,
|
||||||
null_ls.builtins.formatting.stylua,
|
|
||||||
null_ls.builtins.formatting.prettier,
|
null_ls.builtins.formatting.prettier,
|
||||||
null_ls.builtins.formatting.trim_whitespace,
|
null_ls.builtins.formatting.trim_whitespace,
|
||||||
null_ls.builtins.hover.dictionary,
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue