diff options
| author | 2026-09-10 21:54:47 +0200 | |
|---|---|---|
| committer | 2026-09-10 22:12:44 +0200 | |
| commit | d7f52c9aaee49f62f9e3a2a410ca21eb5e4b1649 (patch) | |
| tree | 2fb372e530bd5d7cffc63fae9aeab89f334ec420 /neovim/.config/nvim/lua/plugins/lsp.lua | |
| parent | 7264701a9f94b8fe758599f6c1ce32701189fc41 (diff) | |
| download | dotfiles-d7f52c9aaee49f62f9e3a2a410ca21eb5e4b1649.tar.gz dotfiles-d7f52c9aaee49f62f9e3a2a410ca21eb5e4b1649.tar.bz2 dotfiles-d7f52c9aaee49f62f9e3a2a410ca21eb5e4b1649.zip | |
Add standalone Neovim Lua config
Replace the neovim stow package's symlink into vim/.vim with a real,
independent Lua config: init.lua + lua/config/* (options, keymaps,
autocmds, lazy.nvim bootstrap) + lua/plugins/*.lua (one file per plugin
group).
- Plugin manager: lazy.nvim (self-bootstrapping, no submodule needed).
- Carries over every plugin from the vimrc as-is: vim-airline (+ themes,
tmuxline), vim-janah colorscheme, nerdtree, vim-signify, nerdcommenter,
ale, vim-fugitive, quick-scope, ctrlp.vim, claude-code.nvim, plus
vim-ansible-yaml/vim-terraform gated the same way the vimrc gated them
(executable() checks, now as lazy.nvim `cond` functions).
- Replaces YouCompleteMe + jedi-vim entirely with nvim-lspconfig +
mason.nvim + mason-lspconfig.nvim (ensure_installed: pyright, lua_ls,
bashls, terraformls, yamlls, ts_ls, cssls, html; clangd enabled
directly since it's already on PATH via Xcode CLT) and blink.cmp for
completion (+ friendly-snippets), with blink's LSP capabilities merged
into every server's default config.
- ALE stays as a pure linter/fixer (g:ale_disable_lsp = 1) so it doesn't
duplicate nvim-lspconfig's diagnostics/hover/go-to-definition.
- Ports the vimrc's general settings/functions (options, window-nav
keymaps, arrow-key disabling, StripTrailingWhitespace, AppendModeline,
the git->Git abbreviation) to Lua; drops the w!! sudo-save abbreviation
(vimrc's own comment notes it doesn't work under Neovim) and the
reload-vimrc-on-save autocmd (no clean Lua equivalent).
Vim's own vimrc, ftplugin/python.vim, and plugin installs are completely
untouched and unaffected by this change.
Diffstat (limited to 'neovim/.config/nvim/lua/plugins/lsp.lua')
| -rw-r--r-- | neovim/.config/nvim/lua/plugins/lsp.lua | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/neovim/.config/nvim/lua/plugins/lsp.lua b/neovim/.config/nvim/lua/plugins/lsp.lua new file mode 100644 index 0000000..0463dde --- /dev/null +++ b/neovim/.config/nvim/lua/plugins/lsp.lua | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | return { | ||
| 2 | "mason-org/mason-lspconfig.nvim", | ||
| 3 | dependencies = { | ||
| 4 | { "mason-org/mason.nvim", opts = {} }, | ||
| 5 | "neovim/nvim-lspconfig", | ||
| 6 | "saghen/blink.cmp", | ||
| 7 | }, | ||
| 8 | opts = { | ||
| 9 | ensure_installed = { | ||
| 10 | "pyright", | ||
| 11 | "lua_ls", | ||
| 12 | "bashls", | ||
| 13 | "terraformls", | ||
| 14 | "yamlls", | ||
| 15 | "ts_ls", | ||
| 16 | "cssls", | ||
| 17 | "html", | ||
| 18 | }, | ||
| 19 | -- default true: auto-calls vim.lsp.enable() for every Mason-installed | ||
| 20 | -- server as it finishes installing. | ||
| 21 | }, | ||
| 22 | config = function(_, opts) | ||
| 23 | -- Merge blink.cmp's LSP capabilities into every server's default config | ||
| 24 | -- (Mason-managed or not) before any server gets enabled. | ||
| 25 | vim.lsp.config("*", { | ||
| 26 | capabilities = require("blink.cmp").get_lsp_capabilities(), | ||
| 27 | }) | ||
| 28 | |||
| 29 | require("mason-lspconfig").setup(opts) | ||
| 30 | |||
| 31 | -- clangd ships with Xcode Command Line Tools already, so it's not | ||
| 32 | -- Mason-managed — nvim-lspconfig provides its default config, we just | ||
| 33 | -- need to turn it on. | ||
| 34 | vim.lsp.enable("clangd") | ||
| 35 | end, | ||
| 36 | } | ||
