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
ae4c982f94
indents(php): align with C indentation
...
Fixes https://github.com/nvim-treesitter/nvim-treesitter/issues/2357
2022-01-24 22:33:41 +01:00
Ryan Roden-Corrent
f67eb83be5
feat(indent): Implement basic indent for gdscript.
...
Indent is not handled correctly when adding new lines.
It seems that functions/loops/etc. are not recognized until they have at
least one indented block.
For example, if you enter a newline after `func foo():`, the cursor will
not be indented. If you manually indent and add a line like `pass`,
e.g.:
```
func foo():
pass
```
now any insertions above or below `pass` will be indented correctly.
This might be an issue with the grammar, as it seems to apply to highlights
as well.
The following will not be highligted
```
func foo():
```
However, the following will be:
```
func foo():
pass
```
2022-01-24 13:11:01 +01:00
Munif Tanjim
fb7b6a266e
test(indent): rust - add test for indented comment
2022-01-21 16:40:36 +01:00
Munif Tanjim
c2e3938510
fix(indent): rust - support newline after closing brace
2022-01-21 16:40:36 +01:00
Munif Tanjim
7a6d93ca5b
feat(indent): ecma - support common use-cases
2022-01-21 16:40:36 +01:00
Munif Tanjim
782e299cd6
fix(indent): c/cpp - support newline after closing brace
2022-01-21 16:40:36 +01:00
Munif Tanjim
8f9d4ada35
feat(indent): ecma - support try_catch and if_else
2022-01-21 16:40:36 +01:00
Munif Tanjim
bb60706433
feat(indent): support @aligned_indent for python
2022-01-21 10:51:51 +01:00
Munif Tanjim
c0110e34aa
feat: rewrite indent module
2022-01-21 10:51:51 +01:00
Munif Tanjim
baf94219aa
feat: improve indent module
...
get_node_at_line should return appropriate child if available
2022-01-21 10:51:51 +01:00
Christian Clason
c80715f883
feat(lua)!: switch from our fork to MunifTanjim's ( #2272 )
...
also take queries from https://github.com/MunifTanjim/nvim-treesitter-lua/tree/main/queries/lua
BREAKING CHANGE: queries are not compatible; modules will have to update
2022-01-18 22:15:26 +01:00
oxalica
6407d54092
fix: off-by-one errors in indent calculation
2021-11-28 14:52:06 +01:00
Stephan Seitz
c7634f16de
Mark failing indent tests to add them to CI
...
Expected failures should be monitored so that we don't have regressions
and also remove failure marks when they are resolved.
2021-11-24 17:29:55 +01:00
leo60228
1dea3928a2
add compound_lit.c test
2021-08-01 11:01:47 +02:00
Santos Gallegos
be8f656087
Use stylua for autoformat code ( #1480 )
2021-07-04 21:12:17 +00:00
Jędrzej Boczar
af3537fbe5
tests/indent: factor out most of the code into common.lua
2021-04-23 21:21:38 +02:00
Jędrzej Boczar
dbb1550aaf
tests/indent: move common code out of main lua/ directory
2021-04-23 21:21:38 +02:00
Jędrzej Boczar
db97170e4e
tests/indent: move the run helper functions to top-level
2021-04-23 21:21:38 +02:00