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
|
-- import cmp-nvim-lsp plugin
|
||||||
local cmp_nvim_lsp = require("cmp_nvim_lsp")
|
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
|
local keymap = vim.keymap -- for conciseness
|
||||||
|
|
||||||
-- nvim_create_autocmd - used to execute some logic automaticaly on a specific event
|
-- nvim_create_autocmd - used to execute some logic automaticaly on a specific event
|
||||||
|
@ -114,6 +88,15 @@ return {
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
["clangd"] = function()
|
||||||
|
lspconfig["clangd"].setup({
|
||||||
|
filetypes = { "c" },
|
||||||
|
cmd = {
|
||||||
|
"clangd",
|
||||||
|
"--offset-encoding=utf-16",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
["lua_ls"] = function()
|
["lua_ls"] = function()
|
||||||
-- configure lua server (with special settings)
|
-- configure lua server (with special settings)
|
||||||
lspconfig["lua_ls"].setup({
|
lspconfig["lua_ls"].setup({
|
||||||
|
|
|
@ -35,7 +35,6 @@ return {
|
||||||
|
|
||||||
mason_tool_installer.setup({
|
mason_tool_installer.setup({
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"rust-analyzer",
|
|
||||||
"golines",
|
"golines",
|
||||||
"goimports-reviser",
|
"goimports-reviser",
|
||||||
"prettier", -- prettier formatter
|
"prettier", -- prettier formatter
|
||||||
|
@ -44,7 +43,6 @@ return {
|
||||||
"gofumpt",
|
"gofumpt",
|
||||||
-- Astra settings for 3.7 Python
|
-- Astra settings for 3.7 Python
|
||||||
-- NOTE: On Astra you need to install Ruff as standalone package
|
-- NOTE: On Astra you need to install Ruff as standalone package
|
||||||
"eslint_d",
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in a new issue