Skip to content

Latest commit

 

History

History
56 lines (42 loc) · 2.41 KB

File metadata and controls

56 lines (42 loc) · 2.41 KB

Repository Guidelines

Project Structure & Module Organization

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 example ale.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).

Build, Test, and Development Commands

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.

Coding Style & Naming Conventions

  • 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 . and luacheck before committing.

Testing Guidelines

  • 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.sh and require a clean pass (exit 0).

Commit & Pull Request Guidelines

  • 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).

Security & Configuration Notes

  • Do not commit machine-local secrets or tokens.
  • Treat lazy-lock.json updates as intentional dependency changes; mention plugin bumps in the PR.