Revamp some LSP settings
This commit is contained in:
parent
e0831aaedc
commit
5f9964079e
2 changed files with 9 additions and 28 deletions
|
@ -18,32 +18,6 @@ return {
|
|||
-- import cmp-nvim-lsp plugin
|
||||
local cmp_nvim_lsp = require("cmp_nvim_lsp")
|
||||
|
||||
-- Ruff setup
|
||||
lspconfig.ruff.setup({
|
||||
init_options = {
|
||||
settings = {
|
||||
-- Ruff language server settings go here
|
||||
logLevel = "debug",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Pyright setup
|
||||
lspconfig.pyright.setup({
|
||||
settings = {
|
||||
pyright = {
|
||||
-- Using Ruff's import organizer
|
||||
disableOrganizeImports = true,
|
||||
},
|
||||
python = {
|
||||
analysis = {
|
||||
-- Ignore all files for analysis to exclusively use Ruff for linting
|
||||
ignore = { "*" },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
local keymap = vim.keymap -- for conciseness
|
||||
|
||||
-- nvim_create_autocmd - used to execute some logic automaticaly on a specific event
|
||||
|
@ -114,6 +88,15 @@ return {
|
|||
capabilities = capabilities,
|
||||
})
|
||||
end,
|
||||
["clangd"] = function()
|
||||
lspconfig["clangd"].setup({
|
||||
filetypes = { "c" },
|
||||
cmd = {
|
||||
"clangd",
|
||||
"--offset-encoding=utf-16",
|
||||
},
|
||||
})
|
||||
end,
|
||||
["lua_ls"] = function()
|
||||
-- configure lua server (with special settings)
|
||||
lspconfig["lua_ls"].setup({
|
||||
|
|
|
@ -35,7 +35,6 @@ return {
|
|||
|
||||
mason_tool_installer.setup({
|
||||
ensure_installed = {
|
||||
"rust-analyzer",
|
||||
"golines",
|
||||
"goimports-reviser",
|
||||
"prettier", -- prettier formatter
|
||||
|
@ -44,7 +43,6 @@ return {
|
|||
"gofumpt",
|
||||
-- Astra settings for 3.7 Python
|
||||
-- NOTE: On Astra you need to install Ruff as standalone package
|
||||
"eslint_d",
|
||||
},
|
||||
})
|
||||
end,
|
||||
|
|
Loading…
Reference in a new issue