Riley Bruins
f58cae6c22
feat: more @keyword.type captures
2024-05-01 09:59:50 +02: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
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
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
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
Chinmay Dalal
cbd54ebb8d
fix(zig): capture function calls as @function.call
2023-06-22 04:10:38 -04: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
Amaan Qureshi
5a87bc98da
feat: add @comment.documentation where applicable
2023-03-05 17:15:32 -05:00
Amaan Qureshi
d2a45aa531
refactor(zig): @type.definition items belong in @keyword, differentiate @boolean from @constant.builtin
2023-03-03 07:07:52 -08:00
Amaan Qureshi
33ba346e60
feat!: add @keyword.coroutine capture
2023-03-03 07:07:52 -08:00
Eleanor Bartle
2e95d25412
Split out @keyword.return
...
Moves `break` and `continue` to `@repeat`. Leave coroutine keywords in `@keyword.return`. I'd really like a `@keyword.coroutine`.
2023-02-17 14:30:42 -08:00
Eleanor Bartle
9a0e095eba
Add spelling checks to strings and comments
...
I didn't touch these bits so they aren't in status quo, but sure, I'll fix them.
2023-02-17 14:30:42 -08:00
Eleanor Bartle
bf3b792ce6
Update Zig highlights
...
Recently I rearranged the keywords. This PR brings the highlights query file up to date with that.
2023-02-17 14:30:42 -08:00
ObserverOfTime
1a767376cd
highlights(zig): fix captures
2022-11-26 13:17:51 +02:00
Lewis Russell
37398c7d68
feat(spell): support more languages
2022-09-26 13:47:12 +01:00
phynalle
54de8afbed
fix(zig): Do not indent on newline after block
2022-08-08 14:07:30 -07:00
lfenzo
c784720917
Split func/method definition from calls in several programming language queries
2022-08-03 12:05:30 -07:00
maxxnino
50314758ee
zig: work around for hang neovim
2021-11-28 00:25:25 +01:00
maxxnino
ff2897e5b7
zig: highlight zig format, type and function
2021-11-23 16:46:27 +01:00
maxxnino
47a9e6dda9
Highlight zig add missing AssignOp
2021-10-21 20:23:01 +02:00
maxxnino
f76737ee33
Zig queries: highlight, fold and indent
...
* fold for if/while/for
* highlight "_" for ignore variable
* highlight "c" for PtrTypeStart
* highlight "?" for optional type
* remove duplicate query node in indent
2021-09-20 11:46:24 +02:00
maxxnino
cbc42914bf
highlight(zig) highlight all caps is a constant
...
* in some context, like translate c macro
* which is use all CAPS for define constant
2021-08-24 08:35:15 +02:00
maxxnino
2f73d7c0a8
highlight(zig): rework query
...
* improve query performance 120ms -> 6ms
* correct highlight for field, type and function
* add highlight for escape/format sequence in string
2021-08-23 08:15:07 +02:00
maxxnino
2dd36fa585
highlights(zig): label, switch item, operator, punctuation, field property ( #1685 )
...
Co-authored-by: maxxnino <idonthaveemail@dontknow.com>
2021-08-12 23:36:01 -05:00
maxxnino
53160520e2
Update new query and parser for zig
2021-08-11 08:16:16 +02:00
maxxnino
d5116feefd
highlights(zig): function return type, var decl type
2021-08-04 11:07:59 +02:00
maxxnino
cb5059e68f
highlights(zig): highlight enum,union,error and custom number type
...
* highlight enum field as a constant
* highlight cImport and constructor
* highlight else_switch
enum constant
2021-08-04 11:07:59 +02:00
Stephan Seitz
6d18b93ce7
highlights(zig): highlight true,false
2021-07-08 23:37:00 +02:00
Stephan Seitz
70f739c337
highlights(zig): highlight unreachable
2021-07-05 12:37:21 +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
Stephan Seitz
45cb7ef290
highlights(zig): use @string.escape for escape sequences
2021-07-04 21:17:48 +02:00
Gregory Anders
a7dac748ba
Update zig highlights
...
Highlight the built-in `@import` function with the TSInclude highlight
group. Also highlight character literals using TSCharacter instead of
TSNumber.
2021-06-10 07:37:34 +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
Himujjal
0b2ec9d266
improved zig grammar and queries
2021-04-02 03:29:21 +02:00
Himujjal
83bfcde7c2
fixed some errors
2021-04-02 03:29:21 +02:00
Stephan Seitz
4821bde80a
Import highlights.scm from tree-sitter-zig
2021-03-30 22:27:50 +02:00
Himujjal
597ec69378
Added Zig grammar
2021-03-23 12:36:34 +01:00