This repository contains a Lua-based Neovim configuration with a small init.lua entrypoint and focused modules under lua/config/.
init.lua loads these modules in order:
config.globalsconfig.optionsconfig.lazyconfig.autocmdsconfig.keymapsconfig.lsp
init.luabootstraps the configlua/config/globals.luasets leader keys and disables built-in providers/netrwlua/config/lazy.luabootstrapslazy.nvimlua/config/options.luasets core editor optionslua/config/autocmds.luadefines colorscheme switching and filetype-specific behaviorlua/config/keymaps.luadefines custom mappingslua/config/lsp.luaenables Neovim's built-in LSP clients and turns on native LSP features on attachcolors/contains local colorscheme files
The configuration uses lazy.nvim. If it is not installed, lua/config/lazy.lua clones the stable branch into Neovim's data directory on startup.
The current lua/config/plugins.lua declares these plugins:
| Plugin | Notes |
|---|---|
| ibhagwan/fzf-lua | Loaded on Linux as the fuzzy finder UI, with nvim-web-devicons integration |
| vinitkumar/fff.nvim | Loaded on non-Linux systems, built with cargo build --release, pinned to branch feat/implement-buffers-support |
| dmmulroy/tsc.nvim | Lazy-loaded for TypeScript buffers, configured to run tsgo --noEmit --pretty false |
| tpope/vim-commentary | Comment operator on gc |
| nvim-lualine/lualine.nvim | Custom "bubbles" statusline theme with native diagnostics/progress segments |
| nvim-tree/nvim-web-devicons | Dependency for lualine and nvim-tree |
| lukas-reineke/indent-blankline.nvim | Loaded via ibl on BufReadPost |
| nvim-tree/nvim-tree.lua | :NvimTreeToggle file tree |
| kdheepak/lazygit.nvim | :LazyGit integration |
| sourcegraph/amp.nvim | Always loaded with auto_start = true |
| nvim-treesitter/nvim-treesitter | Starts Tree-sitter on file buffers and registers markdown_inline as markdown |
| brenoprata10/nvim-highlight-colors | Background color previews, including Tailwind and variable usage |
| kevinhwang91/nvim-ufo | Folding with Tree-sitter/indent providers |
| kevinhwang91/promise-async | nvim-ufo dependency |
| MagicDuck/grug-far.nvim | Search and replace UI |
| vimwiki/vimwiki | Wiki and diary support |
| ggandor/leap.nvim | Motion plugin mapped on s, S, and gs |
| kylechui/nvim-surround | Surround text objects |
| j-hui/fidget.nvim | LSP progress UI |
| rockyzhang24/arctic.nvim | Dark colorscheme |
| rktjmp/lush.nvim | arctic.nvim dependency |
lua/config/autocmds.lua always loads the local lancia colorscheme, which renders both light and dark variants based on vim.o.background.
Background selection works like this:
NVIM_BACKGROUND=darkorNVIM_BACKGROUND=lightoverrides everything- on macOS, the config reads
AppleInterfaceStyleand follows the system appearance - elsewhere, the default is
dark
The repo also ships a colors/ directory with local colorscheme files.
The current defaults from lua/config/options.lua include:
- line numbers and relative line numbers enabled
- UTF-8 encodings
- system clipboard via
unnamedandunnamedplus - 2-space indentation with
expandtab textwidth = 80termguicolors = true- Tree-sitter folding via
foldexpr - completion popup borders via
pumborder=rounded - floating window borders via
winborder=rounded - native popup completion tuned with
completeopt = menu,menuone,popup,fuzzy,nearest pummaxwidth = 80- persistent undo in
stdpath("data") .. "/undo//" cursorline,hlsearch,wrap, andwildmenuenabledswapfile,backup, andwritebackupdisabledlistenabled by default with visible tab/trailing/extends markerssplitbelowandsplitrightenabled
The config defines these behaviors in lua/config/autocmds.lua:
- strip trailing whitespace before write, except for binary buffers and diff files
- re-evaluate background/colorscheme on
FocusGained - for
~/vimwiki/diary/*.wiki, insert a template from~/.vim/bin/generate-vimwiki-diary-template - for
*.md, forcemarkdownfiletype and setsofttabstop/shiftwidthto 4 - for
*.md,*.txt,*.adoc,*.html, andCOMMIT_EDITMSG, enable wrap, linebreak, spell, andkspellcompletion - for
gitcommit, enable spelling and settextwidth = 72 - for
javascript,typescript,json,c,html, andhtmldjango, enforce 2-space indentation - for
*.tsx, forcefiletype=typescript.tsx - for
*.yamland*.yml, forcefiletype=yaml - for
yaml, enforce 2-space indentation
lua/config/lsp.lua enables Neovim's built-in LSP for:
- Ruby LSP:
ruby-lspwith root markersGemfile,.ruby-version, and.git - TypeScript LSP:
typescript-language-server --stdio - Lua LSP:
lua-language-server - OCaml:
$(opam var prefix)/bin/ocamllspwith root markers.opam,dune-project, and.git - Pyright:
pyright-langserver --stdio
On LspAttach, the config also enables these Neovim 0.12 native features when the server supports them:
- auto-triggered native LSP completion
- code lens display and execution
- linked editing ranges
- rounded diagnostic floats
The current custom mappings from lua/config/keymaps.lua are:
| Mode | Mapping | Action |
|---|---|---|
| Normal | <C-p> |
Linux: require("fzf-lua").files(), otherwise require("fff").find_files() |
| Normal | <C-b> |
Linux: require("fzf-lua").buffers(), otherwise require("fff").buffers() |
| Normal | <C-h> |
Linux: require("fzf-lua").git_files(), otherwise require("fff").git_files() |
| Normal | <C-c> |
:NvimTreeToggle<CR> |
| Normal | <C-t> |
:tabNext<CR> |
| Normal | <C-e> |
open buffer diagnostics in the location list |
| Normal | <C-g> |
:LazyGit<CR> |
| Normal | <leader>gd |
native LSP definition |
| Normal | <leader>gy |
native LSP type definition |
| Normal | <leader>gr |
native LSP references |
| Normal | <leader>gi |
native LSP implementation |
| Normal | <leader>h |
horizontal split |
| Normal | <leader>lr |
:LspRestart |
| Normal | <leader>lw |
native workspace diagnostics |
| Normal | <leader>v |
vertical split |
| Normal | <leader>t |
new tab |
| Normal | <leader>dt |
insert strftime("%c") |
| Normal | <leader>rn |
rename symbol |
| Normal | <leader>ca |
code action |
| Normal | <CR> |
go to end of file (G) |
| Normal | <BS> |
go to start of file (gg) |
| Normal | <j> |
display-line down (gj) |
| Normal | <k> |
display-line up (gk) |
| Normal | grx |
run native LSP code lens |
| Normal | K |
hover documentation |
| Insert | <Tab> |
native popup next item or literal tab |
| Insert | <S-Tab> |
native popup previous item or literal shifted tab |
| Insert | <CR> |
native popup confirm when an item is selected, otherwise newline |
Leader is ,.
Based on the current config, these external tools are expected:
- Neovim with Lua config support and
vim.lsp.config/vim.lsp.enable gitto bootstraplazy.nvimfzfforfzf-luaon Linuxcargoto buildfff.nvimon non-Linux systemslazygitfor:LazyGitruby-lspfor Rubytypescript-language-serverfor JavaScript and TypeScriptlua-language-serverfor Luaopamandocamllspfor the OCaml LSPpyright-langserverfor Pythontsgofortsc.nvim~/.vim/bin/generate-vimwiki-diary-templateif you use vimwiki diary creation
git clone https://github.com/vinitkumar/nvim ~/.config/nvim
nvimOn first launch, lazy.nvim bootstraps itself and installs the configured plugins.
