Drops the policy-A exclusivity that left grammar-backed languages without LSP semantic refinement. Adds tree-sitter-c (.c/.h) and tree-sitter-cpp (.cpp/.cc/.cxx/.hpp/...) to the bundle so the grid TUI gets lexical highlighting (keywords / strings / operators) on first open. The Lua attach in builtin/runtime/lsp.lua now pushes LspStyleView whenever an LSP server is up, regardless of grammar presence; with both views attached the cell-painter pipeline runs SyntaxHighlightView first (lexical) then LspStyleView (semantic) and their styles compose through crate::overlay::merge_styles. The result is the VSCode / Zed "TextMate + LSP semantic tokens" model on a terminal grid: keywords colored by tree-sitter, identifiers refined by clangd's semantic tokens. `.h` is ambiguous C / C++; the `c` BUILTIN_LANGUAGES entry claims it to match the LSP filetype map's default. Users who want `.h` parsed as C++ can override via Lua (extension → language map). Note the tree-sitter-c / -cpp crates expose `HIGHLIGHT_QUERY` (singular), matching tree-sitter-md's `HIGHLIGHT_QUERY_BLOCK` convention; tree-sitter-rust / -lua use `HIGHLIGHTS_QUERY` (plural). Same bundled highlights.scm either way. Regression guard: builtin_languages_include_c_and_cpp asserts the language entries exist and claim their canonical extensions. The LspStyleView module doc rewritten to reflect dual-authority composition; the existing headline test's comment updated (the test fixture still attaches only LspStyleView directly, so its asserted cells reflect the LSP authority alone — Lua-level attach_buffer is what exercises composition end-to-end). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| api | ||
| commands | ||
| hooks | ||
| keymaps | ||
| packages/repl | ||
| runtime | ||