Lua-based Neovim 0.11+ configuration using Lazy.nvim for plugin management and native vim.lsp for language servers.
~/.config/nvim/
├── init.lua # Entry point
├── lua/
│ ├── vim-options.lua # Vim options
│ ├── keymaps.lua # Key mappings
│ ├── lsp.lua # LSP keymaps + server list
│ └── plugins/ # Plugin configurations
├── lsp/ # Custom LSP server configs
│ └── tofu_ls.lua # OpenTofu (not in nvim-lspconfig)
├── lazy-lock.json # Plugin version lock
└── stylua.toml # Lua formatter (2 spaces, 80 cols)
- Native vim.lsp: Uses
vim.lsp.config()andvim.lsp.enable()(Neovim 0.11+) - nvim-lspconfig: Provides server configurations
- Completion: blink.cmp
lua_ls, gopls, ruby_lsp, pylsp, ts_ls, vue_ls,
tofu_ls, marksman, ansiblels, helm_ls, gh_actions_ls
| Key | Action |
|---|---|
K |
Hover documentation |
gd |
Go to definition |
gD |
Go to declaration |
gi |
Go to implementation |
go |
Go to type definition |
gr |
Find references |
gs |
Signature help |
F2 |
Rename symbol |
F3 |
Format code |
F4 |
Code actions |
- If in nvim-lspconfig: add server name to
lua/lsp.luaservers list - If custom: create
lsp/<name>.luawithcmd,filetypes,root_markers
- Create file in
lua/plugins/ - Use
optsoverconfigwhen possible - Use lazy loading (
event,cmd,keys,ft)
stylua . # Format Lua
:Lazy sync # Sync plugins to lockfile
:Lazy update # Update plugins + lockfile
:checkhealth vim.lsp # Check LSP status