chore(lsp): disable automatic LSP server installation
This commit is contained in:
2 files changed
+112
-113
No files matched your search
+110
-110
@@ -3,133 +3,133 @@
|
|||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
-- ts_ls
|
-- ts_ls
|
||||||
vim.lsp.config("ts_ls", {
|
vim.lsp.config('ts_ls', {
|
||||||
settings = {
|
settings = {
|
||||||
typescript = {
|
typescript = {
|
||||||
inlayHints = {
|
inlayHints = {
|
||||||
includeInlayParameterNameHints = "all",
|
includeInlayParameterNameHints = 'all',
|
||||||
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
|
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
|
||||||
includeInlayFunctionParameterTypeHints = true,
|
includeInlayFunctionParameterTypeHints = true,
|
||||||
includeInlayVariableTypeHints = true,
|
includeInlayVariableTypeHints = true,
|
||||||
includeInlayPropertyDeclarationTypeHints = true,
|
includeInlayPropertyDeclarationTypeHints = true,
|
||||||
includeInlayFunctionLikeReturnTypeHints = true,
|
includeInlayFunctionLikeReturnTypeHints = true,
|
||||||
includeInlayEnumMemberValueHints = true,
|
includeInlayEnumMemberValueHints = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
vim.lsp.enable("ts_ls")
|
vim.lsp.enable('ts_ls')
|
||||||
|
|
||||||
-- rust
|
-- rust
|
||||||
vim.lsp.config("rust_analyzer", {
|
vim.lsp.config('rust_analyzer', {
|
||||||
settings = {
|
settings = {
|
||||||
["rust-analyzer"] = {
|
['rust-analyzer'] = {
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
enable = true,
|
enable = true,
|
||||||
experimental = { enable = true },
|
experimental = { enable = true },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
vim.lsp.enable("rust_analyzer")
|
vim.lsp.enable('rust_analyzer')
|
||||||
|
|
||||||
-- lua
|
-- lua
|
||||||
vim.lsp.config("lua_ls", {
|
vim.lsp.config('lua_ls', {
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
disable = {
|
disable = {
|
||||||
"missing-fields",
|
'missing-fields',
|
||||||
"undefined-global",
|
'undefined-global',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
vim.lsp.enable("lua_ls")
|
vim.lsp.enable('lua_ls')
|
||||||
|
|
||||||
-- python
|
-- python
|
||||||
vim.lsp.config("basedpyright", {
|
vim.lsp.config('basedpyright', {
|
||||||
settings = {
|
settings = {
|
||||||
basedpyright = {
|
basedpyright = {
|
||||||
inlayHints = true,
|
inlayHints = true,
|
||||||
disableDiagnostics = true,
|
disableDiagnostics = true,
|
||||||
disableOrganizeImports = true,
|
disableOrganizeImports = true,
|
||||||
analysis = {
|
analysis = {
|
||||||
-- Ignore all files for analysis to exclusively use Ruff for linting
|
-- Ignore all files for analysis to exclusively use Ruff for linting
|
||||||
-- Enable diagnostics
|
-- Enable diagnostics
|
||||||
-- ignore = { "*" },
|
-- ignore = { "*" },
|
||||||
diagnosticSeverityOverrides = {
|
diagnosticSeverityOverrides = {
|
||||||
reportUnusedImport = "none",
|
reportUnusedImport = 'none',
|
||||||
reportUnusedVariable = "none",
|
reportUnusedVariable = 'none',
|
||||||
reportAttributeAccessIssue = "none",
|
reportAttributeAccessIssue = 'none',
|
||||||
reportUnusedClass = "none",
|
reportUnusedClass = 'none',
|
||||||
reportUnusedFunction = "none",
|
reportUnusedFunction = 'none',
|
||||||
reportDuplicateImport = "none",
|
reportDuplicateImport = 'none',
|
||||||
reportArgumentType = "error",
|
reportArgumentType = 'error',
|
||||||
},
|
},
|
||||||
typeCheckingMode = "basic",
|
typeCheckingMode = 'basic',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
vim.lsp.enable("basedpyright")
|
vim.lsp.enable('basedpyright')
|
||||||
|
|
||||||
-- vim.lsp.config("pylsp", {
|
vim.lsp.config('pylsp', {
|
||||||
-- settings = {
|
settings = {
|
||||||
-- pylsp = {
|
pylsp = {
|
||||||
-- plugins = {
|
plugins = {
|
||||||
-- -- use black as default formatter
|
-- use black as default formatter
|
||||||
-- yapf = { enabled = false },
|
yapf = { enabled = false },
|
||||||
-- autopep8 = { enabled = false },
|
autopep8 = { enabled = false },
|
||||||
-- black = { enabled = true },
|
black = { enabled = true },
|
||||||
-- pycodestyle = {
|
pycodestyle = {
|
||||||
-- enabled = true,
|
enabled = true,
|
||||||
-- ignore = { "E203", "E701", "W503" },
|
ignore = { 'E203', 'E701', 'W503' },
|
||||||
-- maxLineLength = 88,
|
maxLineLength = 88,
|
||||||
-- },
|
},
|
||||||
-- },
|
},
|
||||||
-- },
|
},
|
||||||
-- },
|
},
|
||||||
-- })
|
})
|
||||||
|
|
||||||
-- latex
|
-- latex
|
||||||
vim.lsp.config("texlab", {
|
vim.lsp.config('texlab', {
|
||||||
settings = {
|
settings = {
|
||||||
texlab = {
|
texlab = {
|
||||||
build = {
|
build = {
|
||||||
executable = "latexmk",
|
executable = 'latexmk',
|
||||||
args = {
|
args = {
|
||||||
"-lualatex",
|
'-lualatex',
|
||||||
"-interaction=nonstopmode",
|
'-interaction=nonstopmode',
|
||||||
"-outdir=build",
|
'-outdir=build',
|
||||||
},
|
},
|
||||||
onSave = true,
|
onSave = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
vim.lsp.enable("texlab")
|
vim.lsp.enable('texlab')
|
||||||
|
|
||||||
-- bash
|
-- bash
|
||||||
vim.lsp.config("bashls", {
|
vim.lsp.config('bashls', {
|
||||||
settings = {
|
settings = {
|
||||||
bashIde = {
|
bashIde = {
|
||||||
shellcheckArguments = {
|
shellcheckArguments = {
|
||||||
"--exclude=SC1090,SC1091,SC2076,SC2164",
|
'--exclude=SC1090,SC1091,SC2076,SC2164',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
vim.lsp.enable("bashls")
|
vim.lsp.enable('bashls')
|
||||||
|
|
||||||
-- cpp
|
-- cpp
|
||||||
vim.lsp.config("clangd", {
|
vim.lsp.config('clangd', {
|
||||||
cmd = {
|
cmd = {
|
||||||
"clangd",
|
'clangd',
|
||||||
"--fallback-style=llvm",
|
'--fallback-style=llvm',
|
||||||
"--header-insertion=iwyu",
|
'--header-insertion=iwyu',
|
||||||
"-j=4",
|
'-j=4',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
vim.lsp.enable("clangd")
|
vim.lsp.enable('clangd')
|
||||||
+2
-3
@@ -36,11 +36,10 @@ return {
|
|||||||
"basedpyright",
|
"basedpyright",
|
||||||
"bashls",
|
"bashls",
|
||||||
"clangd",
|
"clangd",
|
||||||
-- "pylsp",
|
"pylsp",
|
||||||
"rust_analyzer",
|
"rust_analyzer",
|
||||||
},
|
},
|
||||||
-- auto-install configured servers (with lspconfig)
|
automatic_installation = false, -- Don't auto-install or auto-configure
|
||||||
automatic_installation = true, -- not the same as ensure_installed
|
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user