mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 08:41:43 +05:30
feat(nvim): v0.11: Use native LSP, Completion, Diagnostics
- Move all language LSP configurations to `nvim/lsp` - Move nvim LSP configurations to `nvim/lua/core` - Remove LSP attach keymaps where default ones exists and are usable - Reorged LSP attach keymaps per plugin - Move Lazy.nvim configurations to `nvim/lua/core` - `nvim/init.lua` cleaned to only load other files - Uniform diagnostics symbols across lualine & gutter
This commit is contained in:
3
common/.config/nvim/lsp/bashls.lua
Normal file
3
common/.config/nvim/lsp/bashls.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
return {
|
||||
filetypes = { "sh", "bash", "zsh" },
|
||||
}
|
||||
1
common/.config/nvim/lsp/cssls.lua
Normal file
1
common/.config/nvim/lsp/cssls.lua
Normal file
@@ -0,0 +1 @@
|
||||
return {}
|
||||
@@ -0,0 +1 @@
|
||||
return {}
|
||||
1
common/.config/nvim/lsp/dockerls.lua
Normal file
1
common/.config/nvim/lsp/dockerls.lua
Normal file
@@ -0,0 +1 @@
|
||||
return {}
|
||||
6
common/.config/nvim/lsp/html.lua
Normal file
6
common/.config/nvim/lsp/html.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
return {
|
||||
-- cmd = { ... },
|
||||
-- filetypes = { ... },
|
||||
-- capabilities = {},
|
||||
filetypes = { "html", "twig", "hbs" },
|
||||
}
|
||||
15
common/.config/nvim/lsp/jsonls.lua
Normal file
15
common/.config/nvim/lsp/jsonls.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
return {
|
||||
-- lazy-load schemastore when needed
|
||||
on_new_config = function(new_config)
|
||||
new_config.settings.json.schemas = new_config.settings.json.schemas or {}
|
||||
vim.list_extend(new_config.settings.json.schemas, require("schemastore").json.schemas())
|
||||
end,
|
||||
settings = {
|
||||
json = {
|
||||
format = {
|
||||
enable = true,
|
||||
},
|
||||
validate = { enable = true },
|
||||
},
|
||||
},
|
||||
}
|
||||
28
common/.config/nvim/lsp/lua_ls.lua
Normal file
28
common/.config/nvim/lsp/lua_ls.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
return {
|
||||
settings = {
|
||||
typescript = {
|
||||
updateImportOnFileMove = { enabled = "always" },
|
||||
suggest = { completeFunctionCalls = true },
|
||||
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,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
32
common/.config/nvim/lsp/omnisharp.lua
Normal file
32
common/.config/nvim/lsp/omnisharp.lua
Normal file
@@ -0,0 +1,32 @@
|
||||
return {
|
||||
cmd = { "omnisharp" },
|
||||
handlers = {
|
||||
["textDocument/definition"] = function(...)
|
||||
return require("omnisharp_extended").handler(...)
|
||||
end,
|
||||
},
|
||||
enable_roslyn_analyzers = true,
|
||||
organize_imports_on_format = true,
|
||||
enable_import_completion = true,
|
||||
enable_editorconfig_support = true,
|
||||
enable_ms_build_load_projects_on_demand = false,
|
||||
analyze_open_documents_only = false,
|
||||
settings = {
|
||||
dotnet = {
|
||||
server = {
|
||||
useOmnisharpServer = true,
|
||||
useModernNet = true,
|
||||
},
|
||||
},
|
||||
csharp = {
|
||||
inlayHints = {
|
||||
parameters = {
|
||||
enabled = true,
|
||||
},
|
||||
types = {
|
||||
enabled = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
1
common/.config/nvim/lsp/pylsp.lua
Normal file
1
common/.config/nvim/lsp/pylsp.lua
Normal file
@@ -0,0 +1 @@
|
||||
return {}
|
||||
1
common/.config/nvim/lsp/rust_analyzer.lua
Normal file
1
common/.config/nvim/lsp/rust_analyzer.lua
Normal file
@@ -0,0 +1 @@
|
||||
return {}
|
||||
1
common/.config/nvim/lsp/sqlls.lua
Normal file
1
common/.config/nvim/lsp/sqlls.lua
Normal file
@@ -0,0 +1 @@
|
||||
return {}
|
||||
28
common/.config/nvim/lsp/ts_ls.lua
Normal file
28
common/.config/nvim/lsp/ts_ls.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
return {
|
||||
settings = {
|
||||
typescript = {
|
||||
updateImportOnFileMove = { enabled = "always" },
|
||||
suggest = { completeFunctionCalls = true },
|
||||
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,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user