Commit graph

53 commits

Author SHA1 Message Date
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
再生花
31641d72a4
feat(format-scripts): linewrap predicates
"format-ignore".kick()
2024-02-23 10:42:01 +02:00
Anthony Shi
5973b617a9
fix(kotlin): remove slow highlight and local pattern (#5954)
This is a parser bug that needs to be fixed; temporary workaround to
remove the ~0.5s delay on opening highlight and locals queries.
2024-02-06 13:51:50 +01:00
Phạm Huy Hoàng
77e298e4de chore: format queries 2024-01-21 23:55:02 +09: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
ObserverOfTime
fa38f4e6f9 fix(highlights): improve member/property distinction 2024-01-19 16:58:37 +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
ObserverOfTime
17fae3f4a3 feat(injections): add printf format strings 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
ObserverOfTime
b09d645098 fix(kotlin): improve highlights
Co-authored-by: Anthony Shi <69449791+anthony-S93@users.noreply.github.com>
2023-11-10 11:15:30 +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
Saleh Bakra'a
153818c29b
kotlin: update parser and queries
Update `queries/kotlin/locals.scm` to use the the newly exposed `function_value_parameters` node.
2023-04-06 14:50:38 +02:00
Amaan Qureshi
e559b6fb3f feat(kotlin): update queries from upstream changes 2023-03-26 23:17:24 +02: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
Josef Litoš
a4b72d4f7f Update highlights.scm 2023-02-22 10:08:30 -08:00
Josef Litoš
3f5ff9b434 Update queries/kotlin/highlights.scm
Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
2023-02-22 10:08:30 -08:00
JosefLitos
94f3e8b069 feat(kotlin): improved highlight queries 2023-02-22 10:08:30 -08:00
ObserverOfTime
74151445d0 highlights(kotlin): fix function highlights 2023-02-12 01:21:58 -08:00
Ananda Umamil
5ac2c92060 highlights(kotlin): package keyword and declaration 2023-01-14 12:06:51 +01:00
ObserverOfTime
a16499f584 highlights(kotlin): use more specific groups 2022-11-26 13:17:51 +02:00
ObserverOfTime
9b43ab819c highlights: use @preproc where appropriate 2022-10-15 08:49:01 -07:00
ObserverOfTime
d649756f49 highlights(kotlin): add companion keyword 2022-10-15 08:12:55 -07:00
Lewis Russell
37398c7d68 feat(spell): support more languages 2022-09-26 13:47:12 +01:00
lfenzo
0014e52e2d Split func/method definition from calls in lotlin highlighting queries 2022-08-03 12:05:30 -07:00
Sal Bakraa
a2629ebcc0 fix(kotlin): use _import for type captures 2022-01-08 20:01:00 +01:00
Sal Bakraa
b963e9f994 fix(kotlin): use @attribute instead of @annotation 2022-01-08 20:01:00 +01:00
Sal Bakraa
f92d11cdee fix(kotlin): use correct node for when expression folds 2022-01-08 20:01:00 +01:00
Sal Bakraa
d163f20617 fix(kotlin): fix typo in locals query 2022-01-08 20:01:00 +01:00
Sal Bakraa
2a50ac94bb feat(kotlin): include a folds and a locals query 2022-01-08 20:01:00 +01:00
Sal Bakraa
886ae5b87e fix(kotlin): include regex in injections query 2022-01-08 20:01:00 +01:00
Sal Bakraa
5cfc96effe fix(kotlin): update highlights query to match new parser 2022-01-08 20:01:00 +01:00
Joaquín León
02a0719424 Kotlin queries: Handle package statements 2021-09-18 00:13:19 +02:00
Joakker
16a4da493c New kotlin parser 2021-09-15 12:47:03 +02:00
Sergio Alejandro Vargas
820b4a9c21 Use @keyword.function consistently 2021-07-06 00:53:40 +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
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
Tormod Alf Try Tufteland
db67f5e517 attribute in stead of annotation 2021-03-20 17:52:07 +01:00
Tormod Alf Try Tufteland
8b4b07c55b kotlin: updated parser, and added annotation highlight again 2021-03-20 17:52:07 +01:00
Stephan Seitz
2cd1eb6e2a Update Kotlin parser 2021-03-16 18:52:43 +01:00
Santos Gallegos
e4083fc8e1
Add comment parser to highlight comment tags (#893)
Closes #236
2021-03-12 11:21:46 -05:00
Tormod Alf Try Tufteland
a8438b8bbf stricter regex kotlin constants 2020-12-20 22:59:40 +01:00
Tormod Alf Try Tufteland
855df2d0cc type and identifer defaults. fixed const keyword 2020-12-06 15:08:51 +01:00
Tormod Alf Try Tufteland
e63f81ec0a @annotation -> @attribute 2020-12-06 15:08:51 +01:00
Tormod Alf Try Tufteland
c071454a18 add more builtin functions 2020-12-06 15:08:51 +01:00