Commit graph

36 commits

Author SHA1 Message Date
Kai Moschcau
60c2b084c2 feat(awk,cmake,python,r,starlark): deactivate spelling in shebangs 2024-05-01 15:01:48 +02:00
Riley Bruins
4c84b83108 fix(r): highlight comma separators 2024-04-16 23:03:20 -04:00
Phạm Huy Hoàng
722617e672 refactor(format): drop extra indentation for field 2024-03-21 15:51:26 +01:00
Phạm Huy Hoàng
77e298e4de chore: format queries 2024-01-21 23:55:02 +09: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
Amaan Qureshi
85330918f0 perf: remove match where possible 2023-04-21 18:24:17 -04:00
dundargoc
1727f63976 docs: fix typos 2023-03-29 18:28:56 -04: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
Pedro Castro
6d2b0bd381 move 'in' to repeat 2022-12-31 13:50:47 +01:00
Pedro Castro
ec3d4af104 fix test 2022-12-31 13:50:47 +01:00
Pedro Castro
966393dc38 r: move inf to constant.builtin 2022-12-31 13:50:47 +01:00
Pedro Castro
58c0d78de8 r: update highlights 2022-12-31 13:50:47 +01:00
Pedro Castro
161576dde2 indents(r): support special operator
Close #3879
2022-11-29 19:23:09 +01:00
ObserverOfTime
9b43ab819c highlights: use @preproc where appropriate 2022-10-15 08:49:01 -07:00
Maximilian Muecke
f67fd904b7 highlights(r): add spell 2022-10-15 04:03:45 -07:00
Pedro Castro
cf9faaa0e3 r(indents): fix brace_list alignment 2022-03-29 08:43:38 +02:00
Pedro Castro
3b974b7257 r(highlights): fix default_parameter 2022-03-28 22:21:25 +02:00
Pedro Castro
249cd3ac3e
r(highlights): add default parameter/argument (#2688)
* Update lockfile.json

* r(highlights): default argument/parameter and some updates
2022-03-28 21:17:28 +02:00
Pedro Castro
e775d0331e injections(r): add comment 2022-03-19 22:44:43 +01:00
Stephan Seitz
ca06ff0a61 indents(r): fix all R tests 2022-02-05 18:54:55 +01:00
Pedro Castro
29fc7ed14c indents(r): update @indent group 2022-01-29 15:25:56 +01:00
Pedro Castro
807b20d0de indents(r): add indents support 2022-01-29 15:25:56 +01:00
Pedro Castro
07770b2daa highlights(r): highlight string_escape, change parameter priority and update pipe 2022-01-28 14:32:58 +01:00
Pedro Castro
6a958eccef highlights(r): change groups priority 2022-01-22 11:31:58 +01:00
aspeddro
190bcc8d56 r add new highlights 2021-11-18 14:16:09 +01:00
aspeddro
741812af8f r add new highlights 2021-11-12 22:02:52 +01:00
aspeddro
5706b1346b r: add new operator 2021-11-12 12:48:26 -05:00
Sergio Alejandro Vargas
820b4a9c21 Use @keyword.function consistently 2021-07-06 00:53:40 +02:00
echasnovski
51c7e9d785 Add definition.parameter query to 'r/locals.scm'. 2021-03-16 18:52:43 +01:00
echasnovski
702114270b Update queries for R language. 2021-03-16 18:52:43 +01:00
echasnovski
773ec8eefc Add support for R language. 2021-03-16 18:52:43 +01:00