From dfb342da4ebee21f29fa0713be5e61123a0cf36f Mon Sep 17 00:00:00 2001 From: "Simen A. W. Olsen" Date: Sat, 21 Mar 2026 13:42:12 +0100 Subject: refactor: restructure LSP configuration and modernize plugins MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Split LSP server configs into separate files in lsp/ directory - Replace deprecated vim.loop with vim.uv API - Update copilot plugin (copilot.vim → copilot.lua) - Add snacks.nvim plugin for utilities - Simplify LSP setup using new Neovim 0.11+ APIs - Remove hardcoded paths in favor of vim.fs.joinpath - Clean up configuration and remove duplicate keybindings - Remove comment.lua plugin --- lsp/astro.lua | 1 + lsp/gopls.lua | 17 +++++++++++++++++ lsp/lua_ls.lua | 12 ++++++++++++ lsp/vtsls.lua | 10 ++++++++++ lsp/zls.lua | 10 ++++++++++ 5 files changed, 50 insertions(+) create mode 100644 lsp/astro.lua create mode 100644 lsp/gopls.lua create mode 100644 lsp/lua_ls.lua create mode 100644 lsp/vtsls.lua create mode 100644 lsp/zls.lua (limited to 'lsp') diff --git a/lsp/astro.lua b/lsp/astro.lua new file mode 100644 index 0000000..a564707 --- /dev/null +++ b/lsp/astro.lua @@ -0,0 +1 @@ +return {} diff --git a/lsp/gopls.lua b/lsp/gopls.lua new file mode 100644 index 0000000..98d1c15 --- /dev/null +++ b/lsp/gopls.lua @@ -0,0 +1,17 @@ +return { + settings = { + gopls = { + symbolMatcher = "fuzzy", + symbolStyle = "dynamic", + hints = { + rangeVariableTypes = true, + parameterNames = true, + constantValues = true, + assignVariableTypes = true, + compositeLiteralFields = true, + compositeLiteralTypes = true, + functionTypeParameters = true, + }, + }, + }, +} diff --git a/lsp/lua_ls.lua b/lsp/lua_ls.lua new file mode 100644 index 0000000..087f8d1 --- /dev/null +++ b/lsp/lua_ls.lua @@ -0,0 +1,12 @@ +return { + settings = { + Lua = { + hint = { + enable = true, + }, + completion = { + callSnippet = "Replace", + }, + }, + }, +} diff --git a/lsp/vtsls.lua b/lsp/vtsls.lua new file mode 100644 index 0000000..e91e9a2 --- /dev/null +++ b/lsp/vtsls.lua @@ -0,0 +1,10 @@ +return { + filetypes = { + "javascript", + "javascriptreact", + "javascript.jsx", + "typescript", + "typescriptreact", + "typescript.tsx", + }, +} diff --git a/lsp/zls.lua b/lsp/zls.lua new file mode 100644 index 0000000..76666df --- /dev/null +++ b/lsp/zls.lua @@ -0,0 +1,10 @@ +return { + root_markers = { ".git", "build.zig", "zls.json" }, + settings = { + zls = { + enable_inlay_hints = true, + enable_snippets = true, + warn_style = true, + }, + }, +} -- cgit v1.3.1