0
Fork 0
mirror of https://github.com/zeronsh/comet.git synced 2026-11-16 18:57:19 +00:00
Commit graph

12 commits

Author SHA1 Message Date
zeronsh[bot]
187b402439
Syntax: Luau highlighting (#1031)
`.luau` files and ```luau fences now highlight with the official
tree-sitter-luau grammar (tree-sitter-grammars, pinned at 1.2.0), and
Luau files get their icon wherever a language resolves one.

The upstream query targets Neovim, and several patterns misfire under
tree-sitter-highlight; each is rewritten against its exact upstream text, so
a grammar bump that changes one fails the tests instead of drifting:
- `#lua-match?` isn't evaluated by the Rust runtime (every identifier
  matched the type and constant patterns): rewritten to `#match?`.
- `(comment) @comment @spell`: the unmapped second capture took the
  comment's highlight.
- `(type (identifier))`: `type` is a supertype that includes `identifier`,
  so it matched every name. Types are matched where they sit instead —
  after an annotation's `:`, a cast's `::`, an alias's `=`, or inside a
  composite type.
- Table-type keys and function-type parameters are only the names before
  a `:` (the grammar doesn't parse named function-type parameters at all).

Co-authored-by: Wing <44917547+wingleeio@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-10-25 06:46:09 +00:00
José Gurruchaga
03250d033c
feat(files): add a remote-safe workspace file tree and editor (#130)
* feat(proto): define workspace file contracts

* refactor(engine): centralize workspace checkout resolution

* feat(engine): list and search workspace files

* feat(engine): read workspace text files

* feat(engine): guard workspace file writes

* feat(engine): stream workspace file changes

* test(engine): harden workspace file RPC routing

* feat(ui): model workspace file tree state

* feat(ui): connect Files surface to workspace RPC

* feat(ui): add Files right-pane surface

* feat(ui): render virtualized workspace file tree

* feat(ui): add workspace file search and live refresh

* feat(ui): preview workspace files

* test(ui): harden Files surface lifecycle

* feat(ui): open workspace files as surface tabs

* refine Files surface compact navigation

* refine Files search header

* fix Files preview loading and horizontal scrolling

* fix(ui): keep file previews visible when toggling sidebar

* fix(files): preserve vertical scrolling in previews

* refine(files): clarify ignored files visibility

* refine(files): dim ignored tree entries

* refine(files): remove read-only tree labels

* refine(files): reuse Files tab for first preview

* fix(files): propagate ignored state to descendants

* feat(files): add preview word wrap toggle

* refine(files): use line icon for word wrap

* build(ui): pin compatible gpui-base fork

* refactor(ui): model editable file documents

* feat(ui): render file previews with gpui-base editor

* feat(ui): connect zeron syntax to file editor

* feat(settings): configure file autosave delay

* feat(ui): autosave edited workspace files

* feat(ui): reconcile external file changes

* feat(ui): flush file edits on lifecycle changes

* polish(ui): finish file editor experience

* fix(ui): preserve editor keybindings

* polish(ui): remove unsaved tab indicator

* polish(ui): hide unsaved file label

* Add inline review comments to file editor

* Refine file editor comment popovers

* Match file editor caret to app theme

* Protect dirty files from destructive reload

* Stop automatic retries after failed file saves

* Restore editor focus when switching file tabs

* Reconcile recreated open files

* Preserve editor context on external reload

* Fix file editor reconciliation edge cases

* Update gpui-base for stable caret rendering

* Persist word wrap across file editors

* Persist hidden file visibility across trees

* Fix Markdown syntax highlighting

* Respect file sidebar visibility preference

* Hide transient autosave status

* Hide transient file tree loading state

* Attach workspace files by dragging to composer

* feat(files): group fuzzy search results by directory

* refactor(files): make refresh actions contextual

* fix(ui): expose composer inputs to accessibility

* feat(files): add editor context menu

* fix(files): bound workspace search results

* fix(files): release orphaned comment flushes

* docs: align gpui-base notice revision

* docs: document remote workspace trust boundary

* fix(files): bound retained document cache

* fix(files): reject NTFS alternate data streams

* fix(files): reject invalid tree relationships

* fix(files): bound watcher reconciliation latency

* feat(files): open workspace links from chat

* style(files): align toolbar control sizes

* Fix editor scrollbar contrast

* Separate file headers from tab bar

* Add editor font size setting

* feat(ui): add opt-in autosave and manual file save

* fix(editor): update gpui-base gutter clipping

* fix(settings): hide autosave delay when disabled

* test: reproduce stale editor highlight race

* fix: reject stale file highlights

* Polish Files toolbar spacing and join pane borders

* Align sidebar surface toolbars and bind file saves to their checkout

* Give the History graph a consistent left gutter

* Add configurable file-save and sidebar shortcuts and center author initials

* Use file-tab dirty indicators instead of a save toolbar button

* Preserve file edits on exit and fix editor lifetime and shortcut migration

* Handle the native Objective-C BOOL type on Apple Silicon

---------

Co-authored-by: wing-anara <wing@anara.com>
2026-09-08 02:06:56 -07:00
wing-anara
4902c79257 Reduce streaming allocations and park completed transcript redraws 2026-09-05 04:40:32 +00:00
José Gurruchaga
804ffbb9ec fix(syntax): cover Kotlin query edge cases 2026-08-28 17:25:25 -04:00
José Gurruchaga
a82e032f8b fix(syntax): restore derived language query coverage 2026-08-28 17:04:30 -04:00
José Gurruchaga
6ee0ce0c22 Merge upstream/main into worktree/implement-tree-sitter-highlighting 2026-08-14 08:18:30 -04:00
José Gurruchaga
417d68f76b fix(syntax): address highlighting audit findings 2026-08-13 19:41:39 -04:00
José Gurruchaga
866ed3dce3 test(ui): harden syntax highlighting quality and performance 2026-08-13 19:38:36 -04:00
José Gurruchaga
4830b2f7e4 feat(syntax): support embedded language injections 2026-08-13 19:38:36 -04:00
José Gurruchaga
ff1693f2c6 feat(syntax): add core language grammars 2026-08-13 19:38:36 -04:00
José Gurruchaga
cab72399c5 feat(syntax): add tree-sitter highlighting core 2026-08-13 19:38:32 -04:00
José Gurruchaga
43c0d4f610 refactor(syntax): define shared highlighting contracts 2026-08-13 19:38:32 -04:00