configure treesitter

This commit is contained in:
Ray Elliott 2025-12-07 20:44:49 +00:00
commit 907331f4f2
4 changed files with 176 additions and 5 deletions

View file

@ -157,16 +157,29 @@ Source of truth for the step-by-step rebuild. Keep this concise and up to date.
## Phase 5 — Treesitter
## Phase 5.1 — Confirm scope and priorities
- [ ] Confirm scope and priorities for this phase
- [x] Confirm scope and priorities for this phase
- [x] Decision: Focus on languages: PHP, HTML, JavaScript, TypeScript, CSS, Markdown, Lua, Bash, JSON
- [x] Decision: Enable syntax highlighting and incremental selection (CR to expand, BS to shrink)
- [x] Decision: Enable textobjects for functions, classes, parameters, conditionals, loops
- [x] Decision: Enable autotag for HTML/PHP/JS/React files
- [x] Decision: Disable indent (experimental) to start; can enable per-filetype if stable
## Phase 5.2 — Base Treesitter
- [ ] Add `nvim-treesitter` with incremental selection, highlighting
- [x] Add `nvim-treesitter` with incremental selection, highlighting
- [x] Configure parsers: lua, vim, vimdoc, php, html, javascript, typescript, tsx, css, scss, json, markdown, markdown_inline, bash, regex
- [x] Enable auto-install for missing parsers
- [x] Incremental selection keymaps: CR (init/expand), S-CR (scope expand), BS (shrink)
- [x] Disable for large files (>100KB) to maintain performance
## Phase 5.3 — Treesitter textobjects
- [ ] Add `nvim-treesitter-textobjects`
- [x] Add `nvim-treesitter-textobjects`
- [x] Select keymaps: `af`/`if` (function), `ac`/`ic` (class), `aa`/`ia` (parameter), `ai`/`ii` (conditional), `al`/`il` (loop), `a/` (comment)
- [x] Move keymaps: `]f`/`[f` (next/prev function start), `]F`/`[F` (function end), similar for classes and parameters
- [x] Swap keymaps: `<leader>a`/`<leader>A` (swap parameter with next/prev)
## Phase 5.4 — Treesitter autotag
- [ ] Add `nvim-ts-autotag`
- [x] Add `nvim-ts-autotag`
- [x] Enable auto-close, auto-rename, and close-on-slash for HTML/PHP/JS/React/TS/Vue files
## Phase 6 — UX / Editing
@ -240,7 +253,7 @@ Source of truth for the step-by-step rebuild. Keep this concise and up to date.
- [ ] Validate startup performance (no errors, fast launch)
## Phase 9.4 — Tab workflow validation
- [ ] Validate tab-per-context workflow with Neo-tree
- [ ] Validate tab-per-context workflow with Neo-tree (if used)
## Phase 9.5 — Navigation validation
- [ ] Validate Telescope navigation + LSP jumps