fix(neovim): LSP config fixes for Dotnet & TS/JS

This commit is contained in:
Pratik Tripathy
2024-12-26 21:32:51 +05:30
parent decf7c614f
commit 72657496dc

View File

@@ -133,7 +133,6 @@ return {
bashls = { filetypes = { "sh", "bash", "zsh" } }, bashls = { filetypes = { "sh", "bash", "zsh" } },
pylsp = {}, pylsp = {},
ts_ls = {},
lua_ls = { lua_ls = {
-- cmd = { ... }, -- cmd = { ... },
-- filetypes = { ... }, -- filetypes = { ... },
@@ -149,15 +148,55 @@ return {
}, },
}, },
omnisharp = { omnisharp = {
cmd = { "omnisharp" },
enable_editorconfig_support = true,
enable_ms_build_load_projects_on_demand = false,
enable_roslyn_analyzers = true,
organize_imports_on_format = true,
enable_import_completion = true,
analyze_open_documents_only = false,
settings = { settings = {
DotNet = { dotnet = {
enablePackageRestore = true, server = {
FormattingOptions = { OrganizeImports = true }, useOmnisharpServer = true,
RoslynExtensionOptions = { useModernNet = true,
EnableAnalyzerSupport = true, },
EnableImportCompletion = true, },
csharp = {
inlayHints = {
parameters = {
enabled = true,
},
types = {
enabled = true,
},
},
},
},
},
ts_ls = {
settings = {
typescript = {
inlayHints = {
includeInlayParameterNameHints = "all",
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
includeInlayFunctionParameterTypeHints = true,
includeInlayVariableTypeHints = true,
includeInlayPropertyDeclarationTypeHints = true,
includeInlayFunctionLikeReturnTypeHints = true,
includeInlayEnumMemberValueHints = true,
},
},
javascript = {
inlayHints = {
includeInlayParameterNameHints = "all",
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
includeInlayFunctionParameterTypeHints = true,
includeInlayVariableTypeHints = true,
includeInlayPropertyDeclarationTypeHints = true,
includeInlayFunctionLikeReturnTypeHints = true,
includeInlayEnumMemberValueHints = true,
}, },
Sdk = { IncludePrereleases = false },
}, },
}, },
}, },
@@ -166,26 +205,26 @@ return {
dockerls = {}, dockerls = {},
docker_compose_language_service = {}, docker_compose_language_service = {},
marksman = {}, -- marksman = {},
ltex = { -- ltex = {
filetypes = { "markdown", "text" }, -- filetypes = { "markdown", "text" },
flags = { debounce_text_changes = 3000 }, -- flags = { debounce_text_changes = 3000 },
settings = { -- settings = {
ltex = { -- ltex = {
language = "en", -- language = "en",
markdown = { -- markdown = {
nodes = { -- nodes = {
CodeBlock = "ignore", -- CodeBlock = "ignore",
FencedCodeBlock = "ignore", -- FencedCodeBlock = "ignore",
Code = "ignore", -- Code = "ignore",
AutoLink = "ignore", -- AutoLink = "ignore",
}, -- },
checkFrequency = "save", -- checkFrequency = "save",
languageToolHttpServerUri = "https://api.languagetool.org", -- languageToolHttpServerUri = "https://api.languagetool.org",
}, -- },
}, -- },
}, -- },
}, -- },
} }
-- Ensure the servers and tools above are installed -- Ensure the servers and tools above are installed
@@ -198,7 +237,6 @@ return {
"stylua", "stylua",
"codespell", "codespell",
"bash-language-server", "bash-language-server",
"marksman",
"html-lsp", "html-lsp",
"css-lsp", "css-lsp",
"dockerfile-language-server", "dockerfile-language-server",