This repository is a Lua-based Neovim configuration.
init.lua: bootstrap entrypoint (leader key, Lazy.nvim setup, module loading).lua/: main modules by concern:lua/editor/for options, keymaps, commands, autocmds, Telescope, Treesitter.lua/plugins/for Lazy plugin specs and plugin-specific config (for exampleale.lua).lua/lsp/for Mason/LSP/nvim-cmp integration.lua/ui/for colors and diagnostics display.lua/legacy/for compatibility aliases.
after/: filetype and late-loading overrides.test/: regression suite (test/regression.lua) and runner (test/run.sh).
Use these from repo root:
./test/run.sh: run the full headless regression suite (required before/after changes).luacheck . --config .luacheckrc: static lint for Lua.stylua --check .: formatting check (CI matches this).stylua .: apply formatting.nvim --headless -u init.lua -c 'quit': quick startup sanity check.
- Indentation: 2 spaces (
.editorconfig,.stylua.toml). - Prefer small, focused modules and
require(...)by domain (editor.*,plugins.*,ui.*). - File names: lowercase snake_case (for example
healthcheck.lua). - Keep comments brief and intent-focused; avoid restating obvious Lua syntax.
- Run
stylua .andluacheckbefore committing.
- Primary framework: custom Neovim regression tests in
test/regression.lua. - Add tests when changing options, keymaps, commands, plugin wiring, or autocmd behavior.
- Test names should describe observable behavior (example:
"Leader key is semicolon"). - Execute with
./test/run.shand require a clean pass (exit 0).
- Follow Conventional Commit style seen in history:
feat(scope): ...,fix(scope): ...,refactor(scope): ...,docs(scope): .... - Keep commits scoped to one logical change.
- PRs should include:
- a short problem/solution summary,
- linked issue/task when applicable,
- commands run and results (
./test/run.sh,luacheck,stylua --check .), - notes on user-visible behavior changes (keymaps/commands/UI highlights).
- Do not commit machine-local secrets or tokens.
- Treat
lazy-lock.jsonupdates as intentional dependency changes; mention plugin bumps in the PR.