Cameron
bb24f483ca
Create indent-square-brackets.rb
2023-01-09 22:17:50 +01:00
lucario387
85d9534491
allow negative assertion in injection tests ( #4107 )
...
* tests(vue, svelte): strengthen tests
* fix(html, vue, svelte): fix wrong test format
* allow negative assertions in injection tests
2023-01-07 11:22:20 +01:00
Michael Lan
0922634d37
fix(utils): swap_nodes calculates correct char_delta ( #4110 )
...
* fix(utils): swap_nodes calculates correct char_delta
The char_delta is not calculated correctly right now when there are two
treesitter nodes being swapped, one directly following the other. This
is rare but can happen for example when attempting to swap "print" and
"(1)" in "print(1)". In this case an incorrect char_delta is calculated
because of a bug in range comparison.
* test(swap_nodes): check cursor
* add a regression test (for multiline node swap)
* add a test with adjacent swaps that fails when char_delta is not
calculated correctly
* test(swap_nodes): check text content after swap
* test: note language for parser
* fix tests
* use same not equal for table comparison
2023-01-07 02:53:12 +01:00
Cameron
2d8e6b6662
Add tests correctly for ruby rescue/ensure indentation
2023-01-06 19:48:42 +01:00
Cameron
14bdbef468
Create indent-ensure.rb
2023-01-06 19:48:42 +01:00
Cameron
7eb76dc290
Create indent-rescue.rb
2023-01-06 19:48:42 +01:00
Pham Huy Hoang
2cd89b4bc3
fix(jsx): add missing indent end mark to elements
2023-01-04 12:14:03 +01:00
Pham Huy Hoang
8c71c6c5ed
fix(html): fix wrong indents for script/style tags
2023-01-03 17:50:44 +01:00
Lucario387
28baed7698
refactor(svelte): Remove duplicated queries
...
These injection queries are defined already in html_tags, remove them
Signed-off-by: Pham Huy Hoang <hoangtun0810@gmail.com>
2023-01-03 12:05:10 +01:00
Lucario387
6f4b9b190b
refactor(vue, html): Update injections
...
Update html_tags injections so that html/vue/svelte parsers can use
it without having a script/style tag being captured twice
Signed-off-by: Pham Huy Hoang <hoangtun0810@gmail.com>
2023-01-03 12:05:10 +01:00
Stephan Seitz
6a31d9086e
highlights(rust): use @namespace for [(crate) (self) (super)]
...
Fixes https://github.com/nvim-treesitter/nvim-treesitter/issues/3992
2023-01-01 15:32:07 +01:00
Stephan Seitz
ab414f8b1c
ci: allow negative assertions in tests
2023-01-01 15:32:07 +01: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
58c0d78de8
r: update highlights
2022-12-31 13:50:47 +01:00
Michael Hoffmann
ee3e9f4dc0
feat(hcl,terraform): split terraform from hcl, add specialized queries for tf
...
This enables us to have different queries for
terraform and general hcl. It solve the situation
where other dialects of hcl (nomad, packer, etc)
might use a terraform keyword and get highlighted
out of place.
2022-12-29 22:18:41 +01:00
Lucario387
f5d517f4a7
Fix(vue): Invalid match queries
2022-12-25 17:43:25 +01:00
Lucario387
bbd7ecb25d
add test file
2022-12-25 14:58:33 +01:00
xasc
2d48cbc831
feat(t32): initial support
2022-12-21 23:57:06 +01:00
Raymond Ha
6c4772f7b6
indents(ecma): Fix switch default indent
2022-12-07 18:05:33 +01:00
Stephan Seitz
d6a2ecb8b7
highlights: create subscoping for ternary operator
...
After https://github.com/nvim-treesitter/nvim-treesitter/issues/470 ,
we decided to use `@conditional` for ternary operator instead of
operator despite `@conditional` is documented for keywords only.
A sub-scoping can make it easier for people to highlight this operator
group differently.
Also unify the usage of `@conditional...` across languages.
2022-12-02 21:42:11 +01:00
Aaron Rancsik
2568022580
test(highlights/cpp): add new test for auto as type.builtin.
2022-12-01 15:08:07 +01:00
Aaron Rancsik
45bb230dc0
test(highlights/cpp): type -> type.builtin for primitive types.
2022-12-01 15:08:07 +01:00
Pedro Castro
161576dde2
indents(r): support special operator
...
Close #3879
2022-11-29 19:23:09 +01:00
ObserverOfTime
6725bef5ce
highlights(hack): fix captures
2022-11-26 13:17:51 +02:00
ObserverOfTime
08bd9d0e08
highlights(solidity): use more specific groups
2022-11-26 13:17:51 +02:00
ObserverOfTime
353538d570
highlights(tiger): fix captures
2022-11-26 13:17:51 +02:00
ObserverOfTime
276627849b
highlights(gleam): use more specific groups
2022-11-26 13:17:51 +02:00
ObserverOfTime
79705a1f80
highlights(cpp): use more specific groups
2022-11-26 13:17:51 +02:00
ObserverOfTime
54ca5ae2f0
highlights(gitattributes): fix captures
2022-11-26 13:17:51 +02:00
Raymond Ha
ef24c633f6
highlights(typescript): Fix as highlight
2022-11-25 00:34:25 +01:00
Munif Tanjim
63d7e456ea
highlights(ecma): add pair_pattern punctuation.delimiter
2022-10-17 14:37:36 -07:00
Christian Clason
42ab95d5e1
feat!: remove obsolete TS* highlight groups
2022-10-16 15:50:55 +02:00
ObserverOfTime
0bfeb5484e
test(gitattributes): add tests for highlights
2022-10-15 08:44:41 -07:00
Stephan Seitz
53742779e3
highlights(rust): distinguish between "for" in loops and impl_item
...
Fixes #3641
2022-10-15 04:02:20 -07:00
gbprod
3096e637c8
fix(php): add indent for enums
2022-10-10 23:01:22 +02:00
gbprod
84e23bd979
Fix php indent for short array declaration
2022-10-06 08:55:11 -04:00
Christian Clason
8e763332b7
fix(test): update tests to Nvim 0.8
2022-10-02 09:29:34 -04:00
Stephan Seitz
27cba73df9
indents(wgsl): add indents.scm
2022-09-28 19:25:07 -04:00
Stephan Seitz
d11d35fb61
highlights(hack): use @function.call/@method.call
2022-09-11 04:16:06 -07:00
Stephan Seitz
f66a911a95
highlights(ecma): use @method.call/function.call
2022-09-11 04:16:06 -07:00
Stephan Seitz
c30f73aaa4
ci: add test for #3382 (wrong JS array indent)
2022-09-10 12:59:21 -07:00
Stephan Seitz
e60cdd0278
ci(indents): add known failure case for #3364
2022-08-30 08:02:42 +02:00
Stephan Seitz
d1ce3db8ea
indents(go): no indent at all composite_literal, indent at struct_type
2022-08-15 13:34:16 -07:00
Stephan Seitz
ac5456567a
indens(go): fix issue 3288
...
Fixes #3288
2022-08-15 13:34:16 -07:00
Zheng Piaodan
48d88ddbff
fix(ruby): indent of brackets & parens
2022-08-13 03:40:17 -07:00
Zheng Piaodan
65a1817ba3
fix(ruby): indent parenthesized_statements
2022-08-13 03:40:17 -07:00
phynalle
d2815cb82f
Enable expandtab
2022-08-08 14:07:30 -07:00
phynalle
5c7f9d2ddb
Add zig tests for newline
2022-08-08 14:07:30 -07:00
Stephan Seitz
27424a2040
indents(go): improve @branch rules
...
- Don't branch at `case`
- Let `import_spec_list`/`var_declaration` behave like
`const_declaration`
Fixes #2166
2022-08-05 12:32:20 -07:00