Hi. This is my config for Neovim.
-
Clone the repo:
Linux, etc.git clone https://github.com/majamin/neovim-config.git ~/.config/nvim
Windows (PowerShell)git clone https://github.com/majamin/neovim-config.git $env:LOCALAPPDATA/nvim
-
Edit
lua/user/opts.lua
to specify LSPs, formatters, and other options. -
Review
:checkhealth
-
Optional: add plugins as separate (
lazy-spec
) files in thelua/plugins/
directory. -
Restart neovim and enjoy!
Binding | Description |
---|---|
; |
Leader key |
- |
Browse files |
F2 |
Save all open files and make session |
F3 |
Load session saved with F2 (if it exists) |
F4 |
Toggle spelling |
Space |
Incrementally select using Treesitter (if your lang supports it) |
TAB |
Open next buffer |
Shift+TAB |
Open previous buffer |
Backspace |
Jump to previously opened buffer (^) |
;+f |
Fuzzy find files |
;+g |
Fuzzy find text in files |
;+l |
LSP menu |
;+z |
Toggle ZenMode |
\ |
Format buffer - uses LSP or |
;+t |
Opens diagnostics using trouble (by cascading severity) |
K |
Hover Documentation |
Ctrl+n |
(Insert Mode) Manual LSP completion, TAB to accept, navigate the menu with Ctrl+n and Ctrl+p when menu visible |
-
Browse all keymaps with
:Telescope keymaps
or:WhichKey
-
Run
:Copilot
to turn on Github copilot
-
No UI affects, loading screens, etc. to get in the way
-
backspace
acts in the original way (vi
behavior). -
Which-key
pop-up delay is high on purpose - that way it doesn’t pop up constantly. -
No debuggers implemented in this config (yet).
-
Two choices for colorschemes: Rosepine and Tokyonight
-
Read
:mes
for any errors -
Ensure
:checkhealth
looks ok. As a bare minimum, we should have a clipboard andnpm
in path. -
Install any missing LSP clients, formatters, via
:Mason
ifuser/opts.lua
was not enough -
Does your LSP need special handling? E.g. If you already have an LSP installed, tell Mason to ignore install by adding it to
user.opts.servers_setup_only
. This is useful for LSPs that require special handling or, for example, can’t be installed by the usual Mason methods. -
(CAUTION) Clear share and state:
rm -rf ~/.local/{share,state}/nvim