Commit graph

38 commits

Author SHA1 Message Date
Kiyan
d7f06bfb13
fix(indents): indents for error block (css, lua) (#3207) 2022-07-21 13:48:03 +02:00
Kiyan
7e0651cd56
fix(indent): set only one autocmd for binding indentexpr (#3190) 2022-07-17 08:23:51 +02:00
Christian Clason
07eb437bb1 refactor!: update to Neovim 0.7 APIs
* set highlight groups via nvim_set_hl
* define autocommands via nvim_create_autocmd
* port plugin/nvim-treesitter.vim to Lua
* port healthcheck to Lua
2022-04-30 16:08:01 +02:00
Stephan Seitz
2caac44720 fix: Allow re-parsing in Python, XFAIL \ indentation test 2022-02-06 19:42:57 +01:00
Stephan Seitz
07e07cf303 fix(indents): ignore comment_parsers for indentation 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
aa035cdf2a workaround(indents): avoid reparsing for indent sensitive yaml/python 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
7654bbc04b feat(indents): add support for language injection 2022-02-05 18:54:55 +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
46438064ac refactor(indent): extract functions and support metadata 2022-01-21 10:51:51 +01:00
Munif Tanjim
85140a7a47 feat(indent): use native Query:iter_captures 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
oxalica
6407d54092 fix: off-by-one errors in indent calculation 2021-11-28 14:52:06 +01:00
Santos Gallegos
be8f656087
Use stylua for autoformat code (#1480) 2021-07-04 21:12:17 +00:00
kiyan
7deedc4939 fix: prev_node nil check 2021-04-02 18:41:51 +02:00
kiyan
0f9bdb0939 fix: avoid infinite loop which causes some breakage 2021-04-01 20:50:25 +02:00
kiyan
a2cee8852b fix: indent on new line 2021-04-01 20:50:25 +02:00
Steven Sojka
6863f79118
refactor(all): language tree adaption (#1105) 2021-03-30 08:18:24 -05:00
Brady Phillips
bdbae28b24 Fix indent size
Indent size should equal shiftwidth, unless shiftwidth is 0 in which
case tabstop should be used.
2021-03-22 17:36:19 +01:00
BonaBeavis
be9c4ab36d Fix indent size 2021-02-22 18:17:46 +01:00
yzia2000
839f621955 fixed #630 2021-02-04 20:22:57 +01:00
Jędrzej Boczar
252472081e indent: introduce @ignore to avoid indenting some nodes (e.g. comments) 2021-01-14 13:54:43 +01:00
Jędrzej Boczar
5123231424 indent: introduce @return to further tune indentation on o/<cr> 2021-01-14 13:54:43 +01:00
Jędrzej Boczar
32cc79b7c9 indent: improve behavior on o/<cr> in languages like Python 2021-01-14 13:54:43 +01:00
Jędrzej Boczar
42bc217a54 indent: fix wrong line number passed to descendant_for_range 2021-01-14 13:54:43 +01:00
kiyan42
f2c219cddc indent fixes 2021-01-04 17:42:19 +01:00
Senghan Bright
d3180720f1 fix: support shiftwidth for indents. 2020-12-16 11:43:03 +01:00
Thomas Vigouroux
808765a6c8
fix: update interface following languagetree merge (#687) 2020-11-23 12:46:27 -06:00
kiyan42
1735528db5 Treesitter indent
also fixes the memoize_by_buf_tick function
2020-10-19 21:08:15 +02:00
kiyan42
36b5f6f075 start indent module 2020-10-19 21:08:15 +02:00