A modular Neovim configuration in Lua, organized into “configs” and plugin‑specific modules.
This repository provides a structured Neovim configuration, broken into separate modules for LSPs, UI, key mappings, plugin integrations, etc. Its goal is to be clean, maintainable, and easily extendable.
- Neovim 0.11+
- Language servers, debuggers, etc., installed separately (this config assumes they exist or will be installed via
mason.nvim)- You will need
tree-sitter-cli;
- [OPTIONAL]
nodejs,npm,rust,cargo,go,zig,gcc/g++for the default lsp configs;-
remove any lsps you don't intend to use/don't want to install the binaries for before running
nvim
-
- You will need
-
Clone this repo into your Neovim config directory:
git clone https://github.com/brianferri/config.nvim.git ~/.config/nvim # You may also want to remove the `.git` from the dir rm -rf ~/.config/nvim/.git
-
Boot Neovim; your plugin manager should pick up
init.luaand load everything. -
Run
:checkhealthto see if anything is missing (LSPs, debug adapters, etc.). -
Optionally, add or override modules (see Customization below).
init.lualoads the plugin manager, keybinds and setup specific vim options.- After plugin setup, module scripts from
lua/configs/are required in a predefined order (or lazily according to thelua/plugins/init.lua). - Each module may call
require("xxx").setup(...)or configure autocommands, keymaps, etc. - Plugin extensions in
lua/plugins/supplement or override default plugin behavior (for example, custom telescope commands).
The separation helps keep concerns modular (LSP config separate from UI config, etc.).
You can easily override or add your own config modules:
- To add another LSP (say
rust.lua), createlua/configs/lsps/rust.luawith your setup logic.- Require the new lsp configuration in
lua/configs/lspconfig.lua
- Require the new lsp configuration in
- To override existing modules, you can either:
- Fork and edit the relevant file, or
- In your personal config,
requirethem and apply patches
- For plugin-specific extensions (e.g. custom
telescopepickers), put files in thelua/plugins/area following existing patterns.
Here are some of the modules and what they typically handle:
| Module | Purpose |
|---|---|
configs/lsps/ |
LSP Specific setups |
configs/cmp.lua |
Setup nvim-cmp (completion) |
configs/dap.lua |
Debug Adapter Protocol configuration |
configs/gitsigns.lua |
Git integration overlays (signs, hunks) |
configs/ibl.lua |
Indentation, blank lines, guides |
configs/keybinds.lua |
Global keymaps and leader mappings |
configs/lspconfig.lua |
Core LSP client / server mapping logic |
configs/nvimtree.lua |
File tree / explorer plugin |
configs/render-markdown.lua |
Markdown render / preview settings |
configs/telescope.lua |
Telescope / fuzzy‑finder configuration |
configs/treesitter.lua |
Treesitter syntax parsing / highlighting |
configs/vscode-theme.lua |
Theme / colorscheme setup, mimicking VSCode styling |
Plugin extension modules:
plugins/dap/run.lua: extra commands or helpers to launch / run debugging sessionsplugins/telescope/open_recent.lua: open recently viewed filessearch_replace.lua: search (and replace) diff view
plugins/treesitter/patch_priorities.lua: a monkey patch to override treesitter extmark priority metadataplugins/vscode-theme/better_comments.lua: Highlights comments according to patternstrailing_whitespaces.lua: Highlights trailing whitespaces and facilitates removal
- Use
:Lazyto inspect loaded plugins. - Use
:Mason(:MasonLog) to inspect your LSPs, DAPs, Linters, etc. - Use
:checkhealthto verify LSP, treesitter, and other modules.