Commit graph

30 commits

Author SHA1 Message Date
Kai Moschcau
46cac01880 feat(bash,fish): deactivate spelling in shebangs 2024-05-01 15:01:48 +02:00
Omar Zeghouani
8f444c9fcb chore: update downstream fish highlights 2024-04-04 12:22:50 +02:00
Phạm Huy Hoàng
722617e672 refactor(format): drop extra indentation for field 2024-03-21 15:51:26 +01:00
再生花
31641d72a4
feat(format-scripts): linewrap predicates
"format-ignore".kick()
2024-02-23 10:42:01 +02: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
Pham Huy Hoang
949edb8c52
indents(fish): Add "end" and "case" (#5029) 2023-06-28 15:56:44 +09:00
Amaan Qureshi
85330918f0 perf: remove match where possible 2023-04-21 18:24:17 -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
dundargoc
4612212c72 docs: fix typos 2023-02-23 11:39:43 -08:00
Omar Zeghouani
ab5cc6414e
chore(fish): update test command highlight query (#4306) 2023-02-13 00:19:48 +02:00
taekwombo
fb4058448a fix(fish): "test" command capture name 2022-11-24 09:37:39 +01:00
Stephan Seitz
b79c763c03 fix(fish): update for upstream changes
https://github.com/ram02z/tree-sitter-fish/pull/16

Co-authored-by: taekwombo <taekwombo@users.noreply.github.com>
2022-11-24 01:36:18 +01:00
ObserverOfTime
9b43ab819c highlights: use @preproc where appropriate 2022-10-15 08:49:01 -07:00
Omar Zeghouani
05a07e6e34 Add spell query 2022-09-11 04:21:53 -07:00
Stephan Seitz
4b32b75d4d highlights(fish): use @function.call 2022-09-11 04:16:06 -07:00
Omar Zeghouani
44bf2b7fac highlight(fish): dollar command substitution 2022-03-16 13:11:23 +01:00
antonk52
90f15d9bf7 feat(keywords) merge return and yield into keyword.return group 2021-07-04 21:49:17 +02:00
antonk52
bd9095e969 feat(keywords) add keyword.return & keyword.yield 2021-07-04 21:49:17 +02:00
Omar Zeghouani
859c743296 locals: add more scopes 2021-07-04 21:48:20 +02:00
Gregory Anders
c71edcd781
fish: only highlight 'test' keyword instead of entire condition (#1464) 2021-07-02 09:52:24 +00:00
Omar Zeghouani
0c5b61b2aa Fix boolean highlight 2021-06-06 23:10:00 +02:00
Omar Zeghouani
1289f56fe9 Use any_of predicate for builtin functions 2021-06-06 23:10:00 +02:00
Omar Zeghouani
801adf2377 fish: move test to test_command 2021-05-17 23:24:46 +02:00
Thomas Vigouroux
ae7c5c9fdb feat(fish): highlight test_option 2021-05-17 20:46:34 +02:00
Omar Zeghouani
71247a4a65 comment: remove @combined 2021-05-17 00:37:32 +02:00
Omar Zeghouani
83f7739071 Add fish queries
Add isatty as builtin

Update function_definition option

Update highlights.scm per review

Fix list indentation

Add maintainer names
2021-05-07 10:12:31 +02:00