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.neovideconfig.lazyconfig.optionsconfig.autocmdsconfig.keymapsconfig.lsp
init.luabootstraps the configlua/config/globals.luasets leader keys and disables built-in providers/netrwlua/config/neovide.luaapplies GUI-only Neovide settingslua/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 for Sorbet and OCamlcoc-settings.jsonstores CoC configurationcolors/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 |
| neoclide/coc.nvim | Built with npm ci, loaded on BufReadPre |
| tpope/vim-commentary | Comment operator on gc |
| duane9/nvim-rg | Ripgrep integration |
| vinitkumar/oscura-vim | Colorscheme |
| vinitkumar/monokai-pro-vim | Colorscheme |
| catppuccin/nvim | Installed as catppuccin |
| folke/tokyonight.nvim | Colorscheme |
| rebelot/kanagawa.nvim | Colorscheme |
| EdenEast/nightfox.nvim | Colorscheme |
| rose-pine/neovim | Installed as rose-pine |
| sainnhe/gruvbox-material | Colorscheme |
| nvim-lualine/lualine.nvim | Custom "bubbles" statusline theme |
| nvim-tree/nvim-web-devicons | Dependency for lualine and nvim-tree |
| sainnhe/everforest | Colorscheme |
| 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 |
| nvim-pack/nvim-spectre | Search and replace UI |
| nvim-lua/plenary.nvim | spectre dependency |
| 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 |
| zenbones-theme/zenbones.nvim | Colorscheme |
| rktjmp/lush.nvim | zenbones.nvim dependency |
Startup colors are chosen in lua/config/autocmds.lua:
catppuccin-mochawhen the desired background isdarkcatppuccin-lattewhen the desired background islight
Background selection works like this:
NVIM_BACKGROUND=darkorNVIM_BACKGROUND=lightoverrides everything- in Neovide on macOS, the config reads
AppleInterfaceStyleand follows the system appearance - outside Neovide, the default is always
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 - persistent undo in
stdpath("data") .. "/undo//" cursorline,hlsearch,wrap, andwildmenuenabledswapfile,backup, andwritebackupdisabledlistenabled by default with visible tab/trailing/extends markerssplitbelowandsplitrightenabledshell = "sh"
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
FocusGainedandBufEnter - for
~/vimwiki/diary/*.wiki, insert a template from~/.vim/bin/generate-vimwiki-diary-template - for
*.md, forcemarkdownfiletype and setsofttabstop/shiftwidthto 4 - for
*.md,*.txt, andCOMMIT_EDITMSG, enable wrap, linebreak, spell, andkspellcompletion - for
.html,*.txt,*.md, and*.adoc, enable spelling - 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:
- Sorbet:
srb tc --lspwith root markersGemfileand.git - OCaml:
$(opam var prefix)/bin/ocamllspwith root markers.opam,dune-project, and.git
This is separate from CoC, which is also installed.
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> |
:CocDiagnostics<CR> |
| Normal | <C-s> |
:GFiles<CR> |
| Normal | <C-g> |
:LazyGit<CR> |
| Normal | <leader>gd |
CoC definition |
| Normal | <leader>gy |
CoC type definition |
| Normal | <leader>gr |
CoC references |
| Normal | <leader>gi |
CoC implementation |
| Normal | <leader>h |
horizontal split |
| Normal | <leader>z |
:Goyo<CR> |
| Normal | <leader>v |
vertical split |
| Normal | <leader>t |
new tab |
| Normal | <leader>dt |
insert strftime("%c") |
| 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) |
| Insert | <Tab> |
CoC popup next item, otherwise refresh or literal tab |
| Insert | <S-Tab> |
CoC popup previous item |
| Insert | <CR> |
CoC confirm, otherwise newline |
| Normal/Visual | <D-=> |
increase Neovide scale |
| Normal/Visual | <D--> |
decrease Neovide scale |
| Normal/Visual | <D-0> |
reset Neovide scale |
Leader is ,.
lua/config/neovide.lua is only applied when vim.g.neovide is set.
Current Neovide settings:
guifontis set only whenNEOVIDE_FONTis non-empty- scale factor starts at
1.0 - padding is
10on all sides - refresh rate is
120 - floating blur is
2.0on both axes - floating shadow is enabled
- floating z height is
10 - light angle is
45 - light radius is
5 - cursor animation length is
0.05 - cursor trail size is
0.8 - cursor antialiasing is enabled
- quit confirmation is enabled
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 systemsnpmto buildcoc.nvimnodeto runcoc.nvimripgrepfornvim-rglazygitfor:LazyGitsrbfor the Sorbet LSPopamandocamllspfor the OCaml LSPtsgofortsc.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.
