Neovim - adhityaravi/fire-flake GitHub Wiki

Neovim configured to be beautiful with feature-rich plugins and a focus on usability. This setup is designed to be beginner-friendly while still providing advanced features for experienced users.

Right off the bat, this setup doesnt use any dynamic package managers to install packages but rather nixpkgs and NUR. Maybe this is already clear from the philosophy behind flakes - This is to make sure the config is entirely declarative, reproducible and pure according to nix. So similar to other modern Neovim configs, you can update the upstream to update all the plugins but unsimilar to others, you have to do it via Nix Home-Manager.

That said, I plan to use the import functionality of lazy.nvim to lazy load the plugins. So lazy.nvim can be used to add your own flavors without having to wait for upstream changes. This, ofcourse, means you main these and not fire-flake. And it will tarnish your Neovim setup from being nix pure.

Some cool and well-maintained Neovim configs that inspire me -

I plan to add some specalized plugins for my work (TBD) with an opt-out option.

Also, I am relatively new to lua and neovim, (and actually the nix ecosystem) so I am still learning the ropes. I am learning by doing, so I cant claim (yet) that the plugis or how its implemented is performant. But that's the plan.


๐Ÿงฉ Design Decisions

  • Lazy load plugins where possible to reduce startup time. (WIP)
  • Expose plugins and configurations in the home.nix file for user customization.
  • Start big and trim down later. So while it might seem bloated, I plan to remove plugins that are not useful or are too heavy.
  • Some plugins intentionally overlap in functionality (e.g., Spectre vs. Telescope's grep) to allow flexibility and tool specialization.
  • Initially considered Codeium and Windsurf for AI features but they were less stable or cumbersome to configure โ€” defaulted to Copilot for now.
  • which-key.nvim is preferred over mini.clue due to its beginner-friendly interface, although many recommend mini.clue for performance and minimalism. Both are available but only which-key is exposed in the profile for now.

๐Ÿงฉ Nix Configuration

home.nix user profile allows customization of the default neovim setup:

# Neovim
custom.neovim = {
  enable = true;

  # Example: Add extra plugins
  extraPlugins = with pkgs.vimPlugins; [
   catppuccin-nvim
  ];

  # Example: Add extra Lua config
  extraLuaConfig = ''
   vim.cmd("colorscheme catppuccin")
   require("catppuccin").setup({})
  '';
};

The module can be imported and configured in the home.nix under the profile directory in the user profile path /profile/user/

While this is a flexibility I want to have, I only intend to use it for enabling or disabling plugins provided by the fire-flake flavored neovim setup. So that, the same module can be used with different setups for different profiles.

But, it still allows entire neovim configurations from home.nix. But no one sane will do it, rather use a package manager like lazy.nvim (comes with fire-flake) to do it if you need personilizations that upstream doesnt provide.


โœจ Plugin Groups

๐Ÿ”‹ Core Dependencies

๐Ÿง  UX Enhancements

๐ŸŽจ UI Components

๐ŸŽจ Themes

๐ŸŒˆ Syntax Highlighting

Language support enabled for: bash, go, python, terraform, nix, lua, json, yaml, markdown.

๐Ÿง  LSP Support

โšก Autocompletion

Provides AI-assisted suggestions and standard autocomplete.

๐Ÿ” Search & Navigation

๐Ÿ—‚๏ธ File Explorer

๐Ÿงช Debugging & Testing

๐Ÿงฌ Git Integration


๐Ÿงพ Keymaps

Global

vim.g.mapleader = " "
vim.g.maplocalleader = " "

๐Ÿงฉ which-key Groups

Key Group Icon
<leader>h hydras ๓ฐ•š
<leader>g git ๓ฐŠข
<leader>gh github ๏‚›
<leader>b buffers ๓ฐˆš
<leader>l lsp ๓ฐ’•
<leader>f fuzzy-find ๓ฐญŽ
<leader>a ai-assist ๏’ธ
<leader>t toggles ๏ˆ…
<leader>d debug ๏†ˆ
<leader>r find-replace ๏€‚
<leader>p grapple ๓ฐ„›
<leader>q quick-fix ๏‚ญ

๐Ÿ“ฆ Notable Keymaps (Grouped by Function)

๐Ÿ—‚ Buffers

Key Action
<S-l> / <S-h> Next / Prev buffer
<leader>bd Close buffer
<leader>bp Pick buffer
<leader>bo Close others
<leader>bl Move buffer right
<leader>bh Move buffer left

๐Ÿค– AI Assistant

Key Action
<leader>ae Copilot Enable
<leader>ad Copilot Disable
<leader>as Copilot Status

๐Ÿงฌ Git

Key Action
<leader>gg Open LazyGit
<leader>gS Git status (Telescope)
<leader>gc Git commits (Telescope)
<leader>ghi List GitHub Issues
<leader>ghp List GitHub PRs
<leader>ghP Create PR
<leader>ghc Checkout PR
<leader>ghs Start Review
<leader>gha Approve PR
<leader>ghr Request Changes
<leader>ghm Add Review Comment
<leader>ghS Submit Review
<leader>ghl Add Label
<leader>ghu Add Reviewer
<leader>ghg Add Assignee
<leader>ghh Add ๐Ÿ‘ Reaction

๐ŸชŸ Smart Splits

Key Action
<A-h/l/k/j> Resize splits
<C-h/l/k/j> Move between splits
<leader>bh Move buffer left
<leader>bl Move buffer right
<leader>bk Move buffer up
<leader>bj Move buffer down

๐Ÿ”ญ Fuzzy Finder

Key Action
<leader>ff Find files
<leader>fr Recent files
<leader>fg Live grep
<leader>fb Open buffers
<leader>fh Help tags
<leader>fc Find in current buffer
<leader>fd Diagnostics
<leader>fm Jump to mark
<leader>fp Projects
<leader>fs Grapple tags
<leader>fz Colorschemes
<leader>ft Symbols (Treesitter)

๐Ÿง  LSP

Key Action
<leader>ld LSP Definitions
<leader>lr LSP References
<leader>li LSP Implementations
<leader>ls Document Symbols

๐Ÿ”€ Toggles

Key Action
<leader>tt Toggle Terminal
<Esc> (in term) Terminal Normal Mode
<leader>tp Toggle Copilot
<leader>ta Toggle Autosave
<leader>tn Toggle FileExplorer

๐Ÿ›  Quickfix

Key Action
<leader>qo Open Quickfix
<leader>qc Close Quickfix
<leader>qn Next Quickfix item
<leader>qp Previous Quickfix item
<leader>qq Diagnostics to Quickfix

๐Ÿž Debugging

Key Action
<leader>dd Start/Continue Debug
<leader>db Toggle Breakpoint
<leader>do Step Over
<leader>di Step Into
<leader>du Toggle DAP UI
<leader>dt Run Nearest Test
<leader>df Run Test File
<leader>do Open Test Output
<leader>ds Toggle Test Summary

๐Ÿ” Find & Replace

Key Action
<leader>rr Replace in Files
<leader>rw Replace Word Under Cursor
<leader>rf Replace in Current File

๐Ÿท Grapple

Key Action
<leader>pa Add tag
<leader>pr Remove tag
<leader>pm Toggle tag menu
<leader>pn Next tag
<leader>pp Previous tag
<leader>ps Toggle scope

๐Ÿ” Authentication

The following plugins require you to log in to their respective services:

  • Copilot โ€” enabled by default. Use :Copilot auth to authenticate.
  • Octo.nvim โ€” GitHub functionality. Use gh auth login to authenticate.

Refer to each plugin's documentation for advanced configuration and troubleshooting.


๐Ÿงฉ Roadmap

๐Ÿš€ Performance

  • Lazy load plugins with lazy.nvim to reduce startup time.
  • Organize plugin imports in init.lua.
  • Improve auto-completion performance.

๐Ÿงฉ Features

  • Make selected plugins (TBD) optional for users to enable/disable in home.nix.
  • Add oil for file management in the buffer.
  • Add mapple for note taking.
  • Add autopairs for auto-pairing characters.
  • Add spider for better text navigation.
  • Add todo-comments.

๐ŸŽจ UIUX

Refactors

  • Group plugins by functionality for better organization.

๐Ÿ’ญ Final Notes

Some suggest this is too many plugins; others say it's not enough. For now, this setup is tuned for personal comfort and will evolve over time as preferences change.

Many parts of this will raise the comment "but youre re-building the wheel" and yes, I might be doing that to learn wtf is going on or to maybe compensate some disadvantages of a static configuration model.

โš ๏ธ **GitHub.com Fallback** โš ๏ธ