This repository provides a modular and extensible Neovim configuration using Lazy.nvim and other plugins. Below is the structure of the configuration and the details of the plugins used.
❯ tree
.
├── init.lua
├── lazy-lock.json
└── lua
└── pygaiwan
├── init.lua
├── keymaps.lua
├── lazy
│ ├── languages
│ │ ├── formatting.lua
│ │ ├── linting.lua
│ │ ├── lspconfig
│ │ │ ├── configs
│ │ │ │ ├── biome.lua
│ │ │ │ ├── lua_ls.lua
│ │ │ │ ├── pyright.lua
│ │ │ │ └── ts_ls.lua
│ │ │ └── utils.lua
│ │ ├── lsp.lua
│ │ ├── python
│ │ │ ├── debugger.lua
│ │ │ ├── debugger_ui.lua
│ │ │ └── venvselect.lua
│ │ ├── testing.lua
│ │ └── treesitter.lua
│ ├── ui
│ │ ├── indentscope.lua
│ │ ├── key_suggestion.lua
│ │ ├── lualine.lua
│ │ ├── mini_icons.lua
│ │ ├── nord.lua
│ │ ├── todo_comments.lua
│ │ └── trouble.lua
│ └── vim_utils
│ ├── gitdiff.lua
│ ├── harpoon.lua
│ ├── lazygit.lua
│ ├── telescope.lua
│ └── zenmode.lua
├── lazy_init.lua
├── vim_keymaps.lua
└── vim_options.lua
pygaiwan.init
: Loads all the non-Lazy configurations.pygaiwan.lazy_init
: Initializes Lazy.nvim plugins and imports the following modules:ui
: Plugins that change or improve the Neovim UI.vim_utils
: Plugins that enhance Neovim functionality.languages
: Plugins for language-generic features.languages.python
: Plugins specific to Python.
- mason.nvim: For LSP and DAP management.
- lazy.nvim: As the plugin manager.
- mini.indentscope: Provides a visual bar for indentation blocks.
- which-key.nvim: Displays keybinding helpers.
- lualine.nvim: Customizes the status line.
- mini.icons: Renders icons and emojis.
- nord.nvim: Provides the Nord theme.
- todo-comments.nvim: Highlights keywords like
TODO
. - trouble.nvim: For diagnostics and references listing.
- diffview.nvim: For Git diff and merge management.
- harpoon: For quick file movement.
- lazygit.nvim: Provides an interface for LazyGit.
- telescope.nvim: Fuzzy finding utility.
- zen-mode.nvim: Enables Zen Mode.
- conform.nvim: Manages language formatters.
- nvim-lspconfig: LSP configuration.
- nvim-lint: Language linting management.
- neotest: Testing utility management.
- treesitter: Provides syntax tree-based features.
- nvim-dap: Debug Adapter Protocol (DAP) for Python.
- nvim-dap-ui: UI for Python DAP.
- venv-selector.nvim: Virtual environment management.
Follow these steps to add support for a new language:
- Add the language to the
ensure_installed
variable inlanguages.treesitter
. - Add the language in
languages.lsp
. - (Optional) If the LSP requires specific configurations, add them in the
handlers
section. - Add the required formatter to
formatters_by_ft
inlanguages.formatting
. - (Optional) Add non-standard formatter configurations in
formatters
. Check Conform.nvim Formatters for existing configurations. - Add the linter to
linters_by_ft
inlanguages.linting
. - (Optional) Add non-standard linter configurations if needed. Check nvim-lint Linters for references.
- (Optional) If a debugger is available, create a folder for the language and add the debugger plugin. Import the new folder in
lazy_init
. - (Optional) Add a testing adapter in
languages.testing
, if available.