YongJieYongJie
fc0b881f93
Refactor solidity highlights.scm further
...
- Instead of @keyword, use @conditional, @exception, @return, @function
as appropriate
- Standardize to using @field (instead of @property)for struct members
2022-03-11 19:06:39 +01:00
YongJieYongJie
8f3991065d
Refactor solidity highlights.scm
...
- Use more specific/appropriate captures; change invalid captures
- Don't highlight punctuations in type names (e.g., the brackets in
'bytes32[]')
2022-03-11 19:06:39 +01:00
YongJieYongJie
a180859eea
Add highlights query for Solidity
2022-03-11 19:06:39 +01:00
Daniel Woznicki
82389e52b6
Added test for known indent failure when tree is in broken state
2022-03-01 21:12:14 +01:00
Daniel Woznicki
3d6f2637a2
Made block comment indent @auto so that new lines line up nicely with existing comment block
...
Previous indentation:
/**
*
*/
New indentation:
/**
*
*/
2022-03-01 21:12:14 +01:00
Daniel Woznicki
9f78c9f0ad
Added test case for broken trees, plus partial test coverage
2022-03-01 21:12:14 +01:00
Daniel Woznicki
e23f5d48be
Modified Java indent rules to stop ignoring block comments because javadoc blocks were defaulting to indent 0
2022-03-01 21:12:14 +01:00
Daniel Woznicki
bf2493f5e1
Added fix for Java interfaces not being indented properly
2022-03-01 21:12:14 +01:00
Munif Tanjim
3ef2c77e13
fix(indent): ecma - parenthesized expression indentation
2022-02-26 15:44:37 +01:00
Munif Tanjim
20168d8e20
fix(indent): ecma - class method indentation
2022-02-26 15:44:11 +01:00
Daniel Woznicki
18c558fd92
Fixed a bug where indentation was not correct for class/enum bodies that had an annotation
2022-02-25 08:03:43 +01:00
Daniel Woznicki
1b47af43ce
Fixed a bug where Java enum body indentation was not correct
...
Added test for Java enum indentation
2022-02-25 08:03:43 +01:00
Daniel Woznicki
8f04c2ad2d
Removed newline causing sylua lint check to fail
2022-02-25 00:58:59 +01:00
Daniel Woznicki
b425a9c813
Added fix for incorrect Java indentation after a closing "}" in a method declaration
...
Added tests for Java indentation, including one for issue 2571
2022-02-25 00:58:59 +01:00
Connor Lay (Clay)
00dce44780
Gleam highlight tests
2022-02-15 19:01:02 +01:00
Connor Lay (Clay)
b62750e328
Gleam indentation tests
2022-02-15 19:01:02 +01:00
Stephan Seitz
6e7c8c4fed
tests: add failing test for incomplete arguments
2022-02-13 12:19:54 +01:00
Stephan Seitz
3fbf280e34
indents(php): don't use aligned_indent for php
...
Fixes #2497
2022-02-13 12:19:54 +01:00
Munif Tanjim
a98fa4839d
test(indent): fix typos
2022-02-06 23:07:22 +01:00
Stephan Seitz
5fd68ba0c2
indents(lua): make ")" `@indent_end
...
Fixes #2476
2022-02-06 20:47:15 +01:00
Stephan Seitz
2caac44720
fix: Allow re-parsing in Python, XFAIL \ indentation test
2022-02-06 19:42:57 +01:00
Stephan Seitz
fc54020531
tests(indent): also test creating new line when still in insert mode
2022-02-06 19:42:57 +01:00
Stephan Seitz
9940e48675
tests: add test for #2086
...
While this does not test the described problem in insert mode
2022-02-06 19:42:57 +01:00
Stephan Seitz
a62971e0ef
tests: Add test for C folding issue #1568
...
Also this issue has already been fixed
2022-02-05 19:29:14 +01:00
Stephan Seitz
a42137f56a
tests: add indent test for graphql ( #2459 )
...
Issue #1981
2022-02-05 19:11:14 +01:00
Stephan Seitz
a14970861c
indents(lua): use (comment) @auto
2022-02-05 18:54:55 +01:00
Stephan Seitz
66f33ddd8b
Update lua/nvim-treesitter/indent.lua
...
Co-authored-by: Kiyan <yazdani.kiyan@protonmail.com>
2022-02-05 18:54:55 +01:00
Stephan Seitz
b9069a81b9
tests: only compare indents not contents in indent tests
2022-02-05 18:54:55 +01:00
Stephan Seitz
ca06ff0a61
indents(r): fix all R tests
2022-02-05 18:54:55 +01:00
Stephan Seitz
9f25d66f7d
indents(go): perform some changes as go fmt dictates
2022-02-05 18:54:55 +01:00
Stephan Seitz
5d954f1812
indents(go): add tests
2022-02-05 18:54:55 +01:00
Stephan Seitz
992926ab99
indents(php): add another test
2022-02-05 18:54:55 +01:00
Stephan Seitz
d615497e7e
indents(python): remove branches.py from expected failures
...
The previous indentation actually causes a linter warning when using
pep8
2022-02-05 18:54:55 +01:00
Stephan Seitz
b06961a519
fix(indents): re-parse before each indent
2022-02-05 18:54:55 +01:00
Stephan Seitz
fd5a551d7c
indents(c): add zero_indent for #if
2022-02-05 18:54:55 +01:00
Stephan Seitz
616dc885fc
indents(c): fix indentation on block comment
2022-02-05 18:54:55 +01:00
Stephan Seitz
b9c38a48ca
indents: refactor hanging indent
2022-02-05 18:54:55 +01:00
Stephan Seitz
059fbc487c
indents: allow aligned_indent for unfinished calls in C and Python
2022-02-05 18:54:55 +01:00
Stephan Seitz
62982378b8
indents(cpp): indent at field_initializer_list
2022-02-05 18:54:55 +01:00
Stephan Seitz
3ff725e654
indents(c): fix ternary
2022-02-05 18:54:55 +01:00
Munif Tanjim
11e7ee1d91
fix(indent): lua - support @indent_end ( #2454 )
2022-02-04 22:08:18 +01:00
Christian Clason
05c963602b
chore: format with stylua 0.12.0 ( #2421 )
2022-01-31 10:50:30 +01:00
Pedro Castro
3606f8efbb
indents(r): add pipe test
2022-01-29 15:25:56 +01:00
Pedro Castro
d8f85649b8
indents(r): add tests runner
2022-01-29 15:25:56 +01:00
Pedro Castro
ca279928e3
indents(r): add aligned_indent test
2022-01-29 15:25:56 +01:00
Pedro Castro
74adb6bd30
indents(r): remove pipe test
2022-01-29 15:25:56 +01:00
Pedro Castro
995f462898
indents(r): add tests
2022-01-29 15:25:56 +01:00
Stephan Seitz
3f876efce5
tests: use main parsers instead of nvim-treesitter parser for tests
2022-01-29 13:11:56 +01:00
Stephan Seitz
e4675bc410
highlights(c/cpp): highlight case labels as constants
2022-01-29 13:11:56 +01:00
Stephan Seitz
974e2181a0
highlights(cpp): fix function highlighting of Foo::bar::baz()
...
Fixes https://github.com/nvim-treesitter/nvim-treesitter/issues/2396
2022-01-29 12:40:35 +01:00