Skip to content

Latest commit

 

History

History
67 lines (42 loc) · 1.79 KB

AGENTS.md

File metadata and controls

67 lines (42 loc) · 1.79 KB

AGENTS.md

Personal Neovim config (~130 plugins). See init.lua for full plugin list.

Key config

  • Indentation: expandtab=true, shiftwidth=2, tabstop=4

Plugins

  • Package manager: lazy.nvim (installed manually to ~/.local/share/nvim/lazy/)
  • Configs in lua/configs/*.lua
  • Lockfile: lazy-lock.json (should not be edited manually, generated by lazy.nvim)

Architecture

  • init.lua - Entry point, plugin list
  • lua/configs/ - Plugin configs (options, keymaps, autocmds, per-plugin setups)
  • lua/utils.lua - Helpers

Plugin config pattern

Most plugins use a pattern where use 'plugin-name' in init.lua automatically loads configs.plugin-name:

-- init.lua
use 'telescope'

-- lua/configs/telescope.lua
return { 'nvim-telescope/telescope.nvim', ... }

The use() function in lua/utils.lua, which does require('configs.' .. module).

If vim.g.minimal_config is set only the most important plugins will get loaded for a faster startup time.

Plugin config files

When adding a new config, please follow the pattern of plugin configs in ./lua/configs/.

If a plugin only has one dependency, just use a string instaed of a table with one string:

return {
  dependencies = 'tpope/vim-repeat',
  -- ...
}

Lazy loading

I try to lazy load as many plugins as possible. See nvim -c 'help lazy.nvim.txt' for more info on lazy.nvim and lazy loading.

Treesitter

  • Custom textobjects in lua/configs/treesitter/textobjects.lua
  • List of treesitter parsers in lua/configs/treesitter/parsers.lua

Formatting

Please auto-format any modified lua file with EmmyLuaCodeStyle.

References

  • For Neovim help docs, use Neovim's :help command
  • README.md - Installation
  • .luarc.json - Lua LSP config