aboutsummaryrefslogtreecommitdiff
path: root/lua/plugins/lsp.lua
diff options
context:
space:
mode:
authorCrony Akatsuki <crony@cronyakatsuki.xyz>2025-10-21 20:26:16 +0200
committerCrony Akatsuki <crony@cronyakatsuki.xyz>2025-10-21 20:26:16 +0200
commitd0738bbf71b41b9394846cf9de96bbceeda7eebd (patch)
tree18ed3ee572f8894ec352e0497a2782f5f911ce67 /lua/plugins/lsp.lua
parent91660e8890ec0e361be36f30cd11c85305bbd703 (diff)
downloadnvim-d0738bbf71b41b9394846cf9de96bbceeda7eebd.zip
nvim-d0738bbf71b41b9394846cf9de96bbceeda7eebd.tar.gz
feat: big refactor.
Diffstat (limited to 'lua/plugins/lsp.lua')
-rw-r--r--lua/plugins/lsp.lua29
1 files changed, 27 insertions, 2 deletions
diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua
index cfa3ff9..7145821 100644
--- a/lua/plugins/lsp.lua
+++ b/lua/plugins/lsp.lua
@@ -1,7 +1,32 @@
+-- Enable some settings globally
+vim.lsp.config("*", {
+ -- allow for multiline token support
+ capabilities = {
+ textDocument = {
+ semanticTokens = {
+ multilineTokenSupport = true,
+ }
+ }
+ },
+ -- make .git always be a root marker
+ root_markers = { '.git' },
+ -- setup autocompletion
+ -- on_attach = function(client, bufnr)
+ -- vim.lsp.completion.enable(true, client.id, bufnr, {
+ -- autotrigger = true,
+ -- convert = function(item)
+ -- return { abbr = item.label:gsub('%b()', '') }
+ -- end,
+ -- })
+ -- end,
+})
+
+-- enable specific language servers
vim.lsp.enable({
"nixd",
"lua_ls",
+ "jsonls",
})
--- fix stupid lua error with neovim
-require("lazydev").setup()
+-- diagnostic settings
+vim.diagnostic.config({ virtual_text = true })