This is my personal configuration for Neovim, built upon the NvChad v2.5 Neovim distro. It aims for a comfortable, performant, and productive development experience across various languages, with a focus on speed, usability, and extensibility.
This configuration is designed to be:
- π Fast & Performant: Achieves startup times often under 30ms (tested on
MacBook Pro 14 M1 Pro; actual speed depends on your SSD/CPU). Powered bylazy.nvimfor efficient plugin management and optimized settings. - π§ Simple & Ready-to-Use: Aims to work "out of the box" once prerequisites are met and plugins are installed.
- π» Modern & Lua-Powered: A pure Lua configuration, leveraging the latest Neovim advancements.
- π§© Modular & Customizable: Thoughtfully structured into modules (
editor,lsp,tools,ui) making it easy to understand, tweak, and extend. - π Well-Documented: Every plugin specification file (
plugins/*.lua) and most configuration files (configs/**/*.lua) are thoroughly documented to explain their purpose and settings. My goal is to maintain near 100% documentation coverage for custom configurations. - πͺ Powerful & Full-Featured: Provides comprehensive functionality for a productive coding workflow, including:
- π§ Intelligent LSP: Robust Language Server Protocol integration (
nvim-lspconfig) for autocompletion, diagnostics, code navigation, and signature help across numerous languages. - π¨ Sleek UI: A visually appealing and customizable user interface built with NvChad's
base46theming system and enhanced by plugins likeindent-blankline,gitsigns, andtrouble.nvim. - π§° Comprehensive Toolset:
- Efficient file navigation with
oil.nvim. - Powerful fuzzy finding with
telescope.nvim. - Seamless Git integration via
Neogitandgitsigns.nvim. - Integrated TODO management with
todo-comments.nvimandtrouble.nvim.
- Efficient file navigation with
- β¨οΈ Intuitive Keybindings: Sensible default and custom keymappings, easily discoverable with
which-key.nvim. - π¦ Excellent Rust Development Support: Dedicated support via
rustaceanvimandcrates.nvim. - π» Enhanced Terminal: Integrated terminal capabilities (via NvChad's included terminal and
toggleterm.nvimas a dependency for cmake-tools.nvim). - π Obsidian Integration: Built-in support for managing your Obsidian notes.
- π§ͺ Integrated Testing: A streamlined testing experience with
neotestand various language adapters. - β¨ Code Quality: Automatic code formatting (
conform.nvim) and linting (nvim-lint) on save.
- π§ Intelligent LSP: Robust Language Server Protocol integration (
Here's a high-level overview of the configuration's directory structure and key files:
.
βββ ξ init.lua <- Entry point, bootstraps lazy.nvim & loads core modules
βββ ξΏ lua/
β βββ ξ chadrc.lua <- NvChad specific overrides (theme, UI, etc.)
β βββ ξΏ core/
β β βββ ξ autocmds.lua <- Custom autocommands
β β βββ ξ lsp.lua <- Core LSP helper functions (on_attach, diagnostics, etc.)
β β βββ ξ mappings.lua <- Global custom keymappings
β β βββ ξ options.lua <- Global Neovim options (vim.o, vim.g)
β βββ ξΏ configs/
β β βββ ξ lazy.lua <- Configuration for lazy.nvim plugin manager
β β βββ ξΏ editor/ <- Plugin configurations related to editing
β β β βββ ξ *.lua
β β βββ ξΏ lsp/
β β β βββ ξ lspconfig.lua <- Main LSP server setup
β β β βββ ξΏ plugins/ <- Configurations for LSP-enhancing plugins
β β β β βββ ξ *.lua
β β β βββ ξΏ servers/ <- Specific configurations for individual LSP servers
β β β βββ ξ init.lua <- Dynamically loads all server configs in this dir
β β β βββ ξ *.lua
β β βββ ξΏ tools/ <- Plugin configurations for developer tools
β β β βββ ξ *.lua
β β βββ ξΏ ui/ <- Plugin configurations for UI enhancements
β β βββ ξ *.lua
β βββ ξΏ plugins/
β βββ ξ editor.lua <- Plugin specifications for 'editor' category
β βββ ξ lsp.lua <- Plugin specifications for 'LSP' category
β βββ ξ tools.lua <- Plugin specifications for 'tools' category
β βββ ξ ui.lua <- Plugin specifications for 'UI' category
βββ ξ lazy-lock.json <- Lockfile for plugin versions managed by lazy.nvim
βββ ο README.md <- This file
init.lua: The main entry point that sets uplazy.nvimand loads the initial NvChad plugin and your custom plugin categories.lua/chadrc.lua: Your primary file for NvChad specific customizations, like theme settings, UI component adjustments, and often a place for quick personal tweaks.lua/core/*.lua: Contains fundamental custom settings:autocmds.lua: Your custom autocommands.lsp.lua: Core helper functions for LSP setup (like the sharedon_attach).mappings.lua: Your global custom keybindings.options.lua: Global Neovim options (vim.o,vim.g).
lua/configs/lazy.lua: Configuration for thelazy.nvimplugin manager itself.lua/configs/<category>/*.lua: Contains detailed configuration tables for specific plugins, organized by category.lua/configs/lsp/servers/init.lua: Dynamically loads all individual LSP server configurations from its directory.lua/plugins/*.lua: These files define which plugins are loaded bylazy.nvimfor each category, along with their lazy-loading rules, dependencies, and how their configurations (fromlua/configs/) are applied.
- Neovim: v0.11.0+ (latest stable version highly recommended).
- Git: Essential for
lazy.nvimto install plugins. - Nerd Font: Crucial for proper icon display in the UI (e.g., Iosevka Nerd Font, FiraCode Nerd Font, JetBrainsMono Nerd Font).
- Build Tools:
- A C/C++ Compiler (like GCC or Clang) and CMake: Required by
telescope-fzf-native.nvimfor its build process, and potentially for some LSP servers or tools managed by Mason. - make: Required for building
LuaSnipdependencies.
- A C/C++ Compiler (like GCC or Clang) and CMake: Required by
- Command-line Utilities (Recommended for full functionality):
ripgrep(rg): Powers Telescope's live_grep and other fast search features.fd(fd-find): Used by some Telescope pickers for finding files.lazygit: Recommended if you plan to useNeogitextensively or have custom keybindings relying on it.- Specific formatters and linters for your languages if you wish
conform.nvimandnvim-lintto use them beyond what LSP provides (e.g.,stylua,prettier,ruff,gofumpt,shellcheck). Mason can install many of these.
-
Back up your current Neovim configuration and data (if any):
mv ~/.config/nvim ~/.config/nvim.bak mv ~/.local/share/nvim ~/.local/share/nvim.bak mv ~/.local/state/nvim ~/.local/state/nvim.bak # For Neovim 0.10+ (or 0.9+ with persistent undo/shada) mv ~/.cache/nvim ~/.cache/nvim.bak
-
Clone this repository into your Neovim configuration directory:
git clone https://github.com/Libsod/config.nvim ~/.config/nvim -
Start Neovim:
nvim
- On the first launch,
lazy.nvimwill automatically bootstrap itself and then install all specified plugins, including NvChad. This process might take a few moments. - NvChad's setup (often including a command like
:MasonInstallAllor an equivalent auto-setup mechanism) should then trigger. This will usemason.nvimto install all pre-configured LSP servers, linters, and formatters. - Monitor the messages in the Neovim command line. If any tools are reported as missing or if you need to manage them later, you can use the
:Masoncommand.
- On the first launch,
This configuration is modular, with plugins organized into logical categories as defined in the lua/plugins/ directory:
Plugins that directly enhance the text editing process:
hrsh7th/nvim-cmp: Autocompletion engine.L3MON4D3/LuaSnip: Snippet support.
nvim-treesitter/nvim-treesitter: Advanced syntax highlighting and code structure analysis.windwp/nvim-ts-autotag: Automatic management of HTML/XML/JSX tags.Wansmer/treesj: Splitting and joining code blocks.numToStr/Comment.nvim: Easy code commenting.kylechui/nvim-surround: Managing surrounding character pairs (brackets, quotes).smoka7/hop.nvim: Quick text jumps using "hints".chrisgrieser/nvim-spider: Enhanced word-motions.gbprod/substitute.nvim: Improved search and replace operators.
Everything related to the Language Server Protocol:
neovim/nvim-lspconfig: Core LSP client configurator.folke/neodev.nvim&folke/neoconf.nvim: Enhancements for Lua development in Neovim.- Language-specific Extensions:
mrcjkb/rustaceanvim: For Rust.pmizio/typescript-tools.nvim: For TypeScript/JavaScript.p00f/clangd_extensions.nvim: For C/C++.
- LSP Utilities:
ray-x/lsp_signature.nvim: Displays function signatures.
- Build System & Dependency Management LSP Integrations:
Civitasv/cmake-tools.nvim: For CMake.saecki/crates.nvim: For Rust dependency management.
Auxiliary tools for development:
- File Management:
stevearc/oil.nvim: File manager.
- Search & Navigation:
nvim-telescope/telescope.nvim: Powerful fuzzy-finder.telescope-fzf-native.nvim: FZF native sorter for Telescope.telescope-ui-select.nvim: Uses Telescope forvim.ui.select.
- Code Quality:
stevearc/conform.nvim: Code formatting.mfussenegger/nvim-lint: Code linting.
- Testing:
nvim-neotest/neotest(withneotest-zig,neotest-pythonadapters): Test runner framework.
- Version Control:
NeogitOrg/neogit: Git interface (Magit-style).
- Specialized Tools:
nvim-pack/nvim-spectre: Project-wide search and replace with UI.epwalsh/obsidian.nvim: Obsidian integration.
Plugins for enhancing the user interface:
- Visual Editor Enhancements:
lukas-reineke/indent-blankline.nvim: Indentation guides.lewis6991/gitsigns.nvim: Displays Git changes in the sign column.folke/paint.nvim: Custom highlighting based on Tree-sitter or Lua patterns.
- Informational UI Elements:
folke/which-key.nvim: Displays available keybindings.folke/todo-comments.nvim: Highlights and navigates TODO, FIXME, etc.folke/trouble.nvim: Displays diagnostics, TODOs, LSP references in a dedicated window.dnlhc/glance.nvim: UI for LSP navigation (definitions, references).
My <leader> key is set to Space.
Thanks to folke/which-key.nvim, after pressing <leader> (or other prefix keys like g, <c-w>), a popup will appear listing available commands.
Some of my frequently used custom mappings (see lua/core/mappings.lua and plugin configurations or run :WhichKey for a full list):
<leader>ff: Find files (Telescope find_files)<leader>fg: Find in files (live grep) (Telescope grep_string)<leader>fb: Find buffers (Telescope buffers)<leader>o: Open file manageroil.nvim(this mapping is inlua/core/mappings.lua, the one inobsidian.luaconfig is for its internal mapping table)<leader>fm: Format current file (conform.nvim)<leader>q: Open/close diagnostics list (trouble.nvim)<leader>gn: OpenNeogit<leader>S: OpenSpectre(project-wide search and replace);: Quick command-line mode access (:)
This configuration leverages nvim-lspconfig and mason.nvim (via NvChad's integrated setup) to automatically install and manage Language Servers. The following servers are pre-configured and should be installed automatically via NvChad's :MasonInstallAll command (or on first launch):
bashls(Bash)clangd(C/C++)asm_lsp(Assembly)zls(Zig)ols(Odin)html,cssls(Web)tailwindcsseslint(JavaScript/TypeScript linting)astrobasedpyright,ruff(Python)omnisharp(C#)gopls(Go)lua_ls(Lua)marksman(Markdown)textlsp(Generic text LSP)texlab(LaTeX)jsonls,yamlls,taplo(TOML),lemminx(XML)docker_compose_language_service,dockerlssqlsautotools_lsneocmake(CMake)jdtls(Java)glsl_analyzer(GLSL)
If any LSP server, linter, or formatter is not installed automatically, or if you wish to manage them manually, you can use the :Mason command.
The configuration is structured for easy customization, primarily within the lua/ directory. Refer to the Configuration Structure section above for a map of key files.
- Plugins: Add or modify plugin specifications in the respective files within
lua/plugins/. - Plugin Configurations: Adjust detailed settings for each plugin in its corresponding file under
lua/configs/. - Core Settings: Modify global Neovim options, custom mappings, and autocommands in the files within
lua/core/. - NvChad Specifics: For NvChad's UI elements (theme, statusline modules not covered by your custom
lsp_clients), refer to or createlua/custom/chadrc.lua. Yourinit.luahandles the main NvChad plugin loading.
After making changes to plugin specifications or their configurations, run :Lazy sync in Neovim to apply them.
This Neovim configuration, while personalized to my workflow, stands on the shoulders of giants. It is built upon the solid foundation and principles of NvChad v2.5.
-
π NvChad: Huge thanks to the NvChad maintainers and its vibrant community for creating and evolving such a well-structured and performant Neovim distro. Their dedication to providing a fast, beautiful, and extensible base has been invaluable. (NvChad GitHub, NvChad Website)
-
π‘ Plugin Authors: This setup wouldn't be possible without the incredible work of the many plugin authors whose tools are integrated here. Each plugin represents countless hours of development and a commitment to improving the Neovim experience for everyone. Please consider supporting them if you find their work useful!
-
π€ Community & Inspiration: Thanks also to the broader Neovim community for continuous inspiration, shared configurations, and helpful discussions that shape how we use and customize this powerful editor.
If you find a bug or have a suggestion for improvement, please feel free to create an Issue or Pull Request on this repository!
This configuration is distributed under the terms of the GNU General Public License v3.0. A copy of the license should be included in this repository. If not, see https://www.gnu.org/licenses/gpl-3.0.html.

