Commit graph

53 commits

Author SHA1 Message Date
Phạm Huy Hoàng
722617e672 refactor(format): drop extra indentation for field 2024-03-21 15:51:26 +01:00
Jaehwang Jung
dccf31f9b1 feat(highlights)!: @keyword.storage@keyword.modifier 2024-03-16 20:51:16 +08:00
Jaehwang Jung
998b230a77 feat(highlights)!: keyword @type.qualifier@keyword.modifier 2024-03-16 20:51:16 +08:00
Omar Valdez
00bd760a0e
feat(csharp): highlight excape sequences (#6229) 2024-03-03 11:24:46 +01:00
JD Rudie
19bf991be2 feat(c-sharp): add enum member declaration highlight query 2024-02-22 16:53:11 +01:00
Amaan Qureshi
ae7ceaadad chore(c_sharp): highlight tweaks 2024-01-24 01:45:42 -05:00
Phạm Huy Hoàng
d198a75e2c
Fixup format (#5934)
* fix(format): newline between top-level field defs

* fixup: newline between node and comment

* fixup: optimize pattern
2024-01-20 18:47:56 +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
Bartek Łuka
295ab1da52 fix: link type in pattern matching correctly 2024-01-15 13:01:37 +01:00
Guilherme Soares
a3b2e0dcdb
feat(c_sharp): add missing highlights
Added:
 * `??` and `??=` as operators
 * `alias` as keyword
 * `when` as conditional
2023-08-16 17:44:47 -04: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
Iron-E
31d2f60734
fix(c_sharp): highlight < & > as @punctuation.bracket only in type param lists
This fixes highlighting of `x > 4`, for example
2023-05-04 15:46:41 -04:00
Iron-E
2115c7d585
feat(c_sharp): add capture for ternary operators 2023-05-04 15:37:29 -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
Corentin Brunel
c500926755
c_sharp: update parser and queries (#4169)
Remove "nameof" from @keyword.operator

Co-authored-by: cbrunel <cbrunel@nomadis.co>
2023-01-16 17:49:26 +00:00
Stephan Seitz
48a3da7103 highlights(c_sharp): add ">>>" ">>>="
From upstream change https://github.com/tree-sitter/tree-sitter-c-sharp/pull/266/files
2022-12-24 12:22:23 +01:00
Christian Clason
eedb7b9c69 csharp: update query to parser change 2022-12-20 08:35:20 +01:00
Ibrahim Abdelkareem
a1929ef139 feat: c# required keyword 2022-11-29 19:24:35 +01:00
ObserverOfTime
68c647f13b highlights(c_sharp): use more specific groups 2022-11-26 13:17:51 +02:00
Lewis Russell
37398c7d68 feat(spell): support more languages 2022-09-26 13:47:12 +01:00
Stephan Seitz
c557c68729 highlights(c_sharp): use @method.call 2022-09-11 04:16:06 -07:00
Stephan Seitz
57d3126ac1
Update parsers with C# fixes (#1910)
* highlights(c_sharp): fix queries for parser update

* Update c_sharp parser

* Fix generic method
2021-10-22 16:31:41 -05:00
Aleksei Abakumkin
0336fd8834 Remove redunant capture. 2021-08-18 22:00:31 +02:00
Aleksei Abakumkin
0259291e4a Update CSharp highlights. 2021-08-18 22:00:31 +02:00
Luxed
d8d5e4eb81 fix(c_sharp): Improve highlights 2021-08-06 11:08:30 +02:00
Luxed
e56a393c4b feat(c_sharp): Simplify folds by only folding blocks of code instead of
folding the methods and their attributes
2021-08-06 11:08:30 +02:00
Luxed
3110e0f7cd feat(c_sharp): Add first draft of locals 2021-08-06 11:08:30 +02: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
Luxed
dad4903048 highlights(c_sharp): Add preprocessor directives queries 2021-06-04 23:56:26 +02:00
Luxed
fde9521f9e folds(c_sharp): Add basic folding 2021-06-04 23:56:26 +02:00
Luxed
7e40537769 highlights(c_sharp): lots of improvements 2021-06-04 23:56:26 +02:00
Stephan Seitz
e52de2ca80 highlights(c_sharp): highlight namespaces 2021-06-01 21:53:21 +02:00
Stephan Seitz
96c3512549 highlights(c_sharp): add heuristic for type highlight 2021-06-01 21:53:21 +02:00
Stephan Seitz
40b749f7c0 highlights(c_sharp): highlight verbatim_string_literal 2021-06-01 21:53:21 +02:00
Stephan Seitz
ac5bd10633 highlights(c#): highlight calls of methods 2021-06-01 21:53:21 +02:00
Stephan Seitz
44e44c31a4 highlights(c_sharp): improve highlighting of interpolations 2021-06-01 21:53:21 +02:00
Santos Gallegos
67f0857015 Revert "Comment: use @combined to create just one tree per buffer (#1252)"
This reverts commit 4a7a713c52.
2021-05-07 16:51:57 +02:00
Santos Gallegos
4a7a713c52
Comment: use @combined to create just one tree per buffer (#1252)
* Comment: use `@combined` to create just one tree per buffer

There is no need to create a tree per line/block for comments.
Should fix https://github.com/nvim-treesitter/nvim-treesitter/issues/1251

* Add injections for scss

* Fix jsonc

* Combine jsdoc
2021-04-28 07:19:07 -05:00
Stephan Seitz
3695e58dd3 highlights(csharp): add "with" as @keyword.operator 2021-04-22 18:07:36 +02:00
Santos Gallegos
e4083fc8e1
Add comment parser to highlight comment tags (#893)
Closes #236
2021-03-12 11:21:46 -05:00
Stephan Seitz
3362f45196 Remove textobjects module 2020-10-04 14:20:20 +02:00
Stephan Seitz
bcf421b4e7 Fix #307: Use and document TSVariable/TSVariableBuiltin in all languages 2020-09-14 18:27:20 +02:00
Steve Vermeulen
23a16ab605 Added some more fixes to c# highlighting 2020-07-20 23:19:18 +02:00
Steve Vermeulen
d22e0dd865 Few more minor fixes to c# highlighting to cover other cases of types being used 2020-07-20 23:19:18 +02:00
Steve Vermeulen
e6fe7cdab0 Fixed to use @float instead of just @number 2020-07-20 23:19:18 +02:00
Steve Vermeulen
2391930b70 Commenting out the attempt to highlight method calls for now 2020-07-20 23:19:18 +02:00