kreeger's nvim configs
This repo contains my NeoVim configs, which I clone right to ~/.config/nvim.
Here's how things are structured.
Explained
Top-level (no plugins involved yet)
init.luais the thin start point: it sets theleaderto my spacebar, disablesnetrw, and thenrequire()'s 4 other configs, which have to live in theluadirectory for therequirestatement to work like it does.lua/config/lazy_init.lualoads Lazy, my plugin manager of choicelua/config/settings.luaincludes my basic global Vim settings that would normally be in myvimrcfiles; stuff like line numbers, clipboard use, etc.lua/config/keymaps.luaincludes any keymappings related to global Vim behaviors, like quitting, diagnostics, focus moving, etc.lua/config/autocmds.luaincludes any auto-commands, which is pretty sparse at the moment, but does crucially have a fix to automatically ensure ".tf" files are read asterraformfiles (so thatterraform-lscan start working right away)
I also have a ftplugin folder for any local-buffer settings that need to be
run anytime a specific filetype is open (really basic things like tab-size
settings).
lua/config/lazy/*.lua: plugin town
This directory gets picked up by lua/config/lazy_init.lua, and loads a series
of plugins in file order based on an ordering scheme I found in a YouTube video
that now eludes me. But in a nutshell:
10-git.lua: usesgitsigns.nvimfor gutter markings andlazygit.nvimfor an in-NeoVim experience leveraging lazygit, my favorite git TUI20-which-key.lua: anytime I strike a key in normal mode that's the beginning of a key sequence (my leader, org, orctrl-w), this opens a pane at the bottom of my editor to show me which keys are available next in the sequence and what they do. It'swhich-key.nvimand it's amazing.30-fuzzyfinder.lua: installs and configurestelescope.nvim, which is a fuzzy-finder UI that lets me open files in a buffer quickly, or grep through my project, or do any number of things that use fuzzily-matched text as input. This powers a few additional plugins that come right after it:31-tree.lua: installsnvim-tree.luato give me a nice file explorer sidebar.32-terminal.lua: installstoggleterm.nvimto give me in-nvim terminal windows, for when I don't want to use tmux or iTerm2 to manage a separate tab for me.
40-lsp.lua: the first of NeoVim's language-awareness powers. Installslazydev.nvim(I'll be real honest, this only works withluafiles and I don't know how necessary it is) and then the big one:nvim-lspconfig, which handles providing configuration files to a number of LSPs, all of which get installed usingmason.nvim(a package manager for LSPs, if you will) andmason-lspconfig. There's a lot of stuff in this file that was pulled from... somebody else's repo? and a YouTube video? Honestly it's the file I've combed through the absolute least.41-autoformat.lua: installsconfirm.nvimfor running formatters that get installed either as part of an LSP, or just the installed formatter itself (again, all installed and handled throughmason.nvim). Format on save, and format on a key chord (leader-f, I think).42-autocomplete.lua: installs and configuresblink.cmpfor showing completions (those completions all come from LSPs).
50-colorscheme.lua: Catppuccin, baby.60-comments.lua: supercharge my comments by... giving me TODO highlights. I plan to expand on this more in the future, probably.80-mini.lua: installsmini.nvim, a grab bag of tons of smaller Lua modules improving the NeoVim experience. I've barely scratched the surface on this one.99-treesitter.lua: installs and configuresnvim-treesitterwhich gives nvim the rest of its syntax-highlighting superpowers. Intentionally installed last for a specific reason I no longer recall.
And that's it, mostly. This is ever evolving and changing, so stay tuned for future updates.