Commit graph

26 commits

Author SHA1 Message Date
Riley Bruins
f26b5fb2ed feat(thrift): small improvements
Less capture duplication by separating queries, include folds, move
`@variable.member` to `@property`
2024-10-30 08:39:10 +01:00
Omar Valdez
51bba660a8 refactor(queries): Remove quotes from properties in set! directive 2024-07-28 11:43:41 +02:00
Kai Moschcau
ead283734b feat(latex, query, tablegen, thrift): disable spelling in shebangs 2024-05-01 15:01:48 +02:00
Riley Bruins
f58cae6c22 feat: more @keyword.type captures 2024-05-01 09:59:50 +02:00
Jaehwang Jung
998b230a77 feat(highlights)!: keyword @type.qualifier@keyword.modifier 2024-03-16 20:51:16 +08:00
ObserverOfTime
aa0c60ca5a fix(highlights): clean up tag highlights 2024-01-24 13:47:19 +01:00
Pham Huy Hoang
57a8acf0c4 chore: query formatting 2024-01-19 16:58:37 +01:00
Christian Clason
1ae9b0e455 feat!: align standard captures with upstream
Problem: Sharing highlight queries with upstream tree-sitter and
Helix is difficult.

Solution: Where reasonable, use capture names in tree-sitter's standard
list or Helix's Atom-style hierarchy.

Specifically:

* tree-sitter "standard capture names"
  (3f44b89685/highlight/src/lib.rs (L20-L72)):

  - `@parameter` -> `@variable.parameter`
  - `@field` -> `@variable.member`
  - `@namespace` -> `@module`
  - `@float` -> `@number.float`
  - `@symbol` -> `@string.special.symbol`
  - `@string.regex` -> `@string.regexp`
  - `@text.*` -> `@markup.*` (`strong`, `italic`, `link`, `strikethrough`; with exceptions; see below)
  - `@text.title` -> `@markup.heading`
  - `@text.literal` -> `@markup.raw`
  - `@text.reference` -> `@markup.link`
  - `@text.uri` -> `@markup.link.url` (in markup links)
  - `@string.special` -> `@markup.link.label` (non-url links)
  - `@punctuation.special` -> `@markup.list` (markdown lists only; move subitems from `@text.todo`)

* Helix captures
  (https://docs.helix-editor.com/master/themes.html#syntax-highlighting):

  - `@method` -> `@function.method`
  - `@method.call` -> `@function.method.call`
  - `@text.{todo,warning,note,danger}` -> `@comment.{error,warning,hint,info,todo}`
  - `@text.diff.{add,delete,}` -> `@diff.{plus,minus,delta}`
  - `@text.uri` -> `@string.special.url` (outside markup)
  - `@preproc` -> `@keyword.directive`
  - `@define` -> `@keyword.directive`(`.define`?)
  - `@storageclass` -> `@keyword.storage`
  - `@conditional` -> `@keyword.conditional`
  - `@debug` -> `@keyword.debug`
  - `@exception` -> `@keyword.exception`
  - `@include` -> `@keyword.import`
  - `@repeat` -> `@keyword.repeat`

* cleanup

  - remove some redundant `@conceal` (but still allow it for conceal-only patterns)
  - remove obsolete `@error` (syntax linting is out of scope for this repo)
  - sort, cleanup capture list in `CONTRIBUTING.md`
2024-01-19 16:58:37 +01:00
Christian Clason
5b90ea2aba feat(locals)!: switch to upstream captures 2024-01-19 16:58:37 +01:00
Pham Huy Hoang
107e61afb7 refactor: Remove all (ERROR) @error captures
As discussed in PR#5421, capturing `@error` is inconsistent, requiring
deep nesting (or priority) in order to correctly have red backgrounds to
it.

Some queries has this capture, some don't. For consistency purposes,
removing all of them is more preferable.

For re-enabling error, either add `(ERROR) @error` or `(ERROR _ @error)`
to your custom queries.
2023-10-25 18:18:50 +02:00
Pham Huy Hoang
78b54eb7f6 chore(injections)!: update injection syntax to 0.9
Since 0.9, @lang syntax is still available as fallback but will soon be deprecated.
Because of that, new syntax should be adopted once 0.9 becomes the
baseline requirements for nvim-treesitter

- update health check
- update doc
2023-08-12 17:34:15 +02:00
George Harker
cb568af539 use indent.X syntax for captures and properties of set directives
update CONTRIBUTING.md

adjust indents for bass

fix doc capture comment
2023-03-24 13:07:53 -04:00
George Harker
b4fcc61175 split delimiter into open_delimiter and close_delimiter 2023-03-24 13:07:53 -04:00
Zhizhen He
a1df50a79f docs: fix typo 2023-03-21 02:23:52 -04:00
Amaan Qureshi
3eae9ded42 feat(thrift): update queries based on upstream changes 2023-03-13 05:24:58 -04:00
Amaan Qureshi
5a87bc98da feat: add @comment.documentation where applicable 2023-03-05 17:15:32 -05:00
Amaan Qureshi
33ba346e60 feat!: add @keyword.coroutine capture 2023-03-03 07:07:52 -08:00
dundargoc
4612212c72 docs: fix typos 2023-02-23 11:39:43 -08:00
Amaan Qureshi
93386fc725 feat(thrift): improve queries 2023-02-18 09:37:41 -08:00
Amaan Qureshi
17d7cf6f4b feat: add @text.uri where applicable to thrift and gosum 2023-02-18 02:07:28 -08:00
Amaan Qureshi
c610c78576 chore: update thrift queries 2023-01-29 00:52:59 +01:00
Amaan Qureshi
d9d8f5eba4 feat(capnp, thrift): add folds, bump lockfile 2023-01-23 22:26:16 +01:00
Amaan Qureshi
f826b7af13 refactor(capnp, thrift): improve grammar & queries to stable for the foreseeable future 2023-01-23 22:26:16 +01:00
Amaan Qureshi
1913ce2fd2 feat(thrift): refactor queries for better highlights, fixes bugs where certain ones went past where they should've ended 2023-01-23 08:42:27 +01:00
Amaan Qureshi
b300d903b0
feat(thrift): use better queries, namely for idents (#4197) 2023-01-22 12:29:50 +02:00
Amaan Qureshi
08e1adae53
feat: add thrift (#4185) 2023-01-21 14:39:15 +02:00