From d7f52c9aaee49f62f9e3a2a410ca21eb5e4b1649 Mon Sep 17 00:00:00 2001 From: Tom van der Lee Date: Thu, 10 Sep 2026 21:54:47 +0200 Subject: 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. --- neovim/.config/nvim/lua/plugins/filetree.lua | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 neovim/.config/nvim/lua/plugins/filetree.lua (limited to 'neovim/.config/nvim/lua/plugins/filetree.lua') diff --git a/neovim/.config/nvim/lua/plugins/filetree.lua b/neovim/.config/nvim/lua/plugins/filetree.lua new file mode 100644 index 0000000..cdee9f7 --- /dev/null +++ b/neovim/.config/nvim/lua/plugins/filetree.lua @@ -0,0 +1,33 @@ +return { + "preservim/nerdtree", + lazy = false, + config = function() + -- Open NERDTree when no file is specified; quit when it's the last window + local augroup = vim.api.nvim_create_augroup("nerdtree_auto", { clear = true }) + + vim.api.nvim_create_autocmd("StdinReadPre", { + group = augroup, + callback = function() + vim.g.std_in = 1 + end, + }) + + vim.api.nvim_create_autocmd("VimEnter", { + group = augroup, + callback = function() + if vim.fn.argc() == 0 and vim.g.std_in == nil then + vim.cmd("NERDTree") + end + end, + }) + + vim.api.nvim_create_autocmd("BufEnter", { + group = augroup, + callback = function() + if vim.fn.winnr("$") == 1 and vim.bo.filetype == "nerdtree" then + vim.cmd("quit") + end + end, + }) + end, +} -- cgit v1.3