This website requires JavaScript.
Explore
Help
Sign in
benbot
/
nvim-treesitter
Watch
1
Star
0
Fork
You've already forked nvim-treesitter
0
mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced
2026-07-19 11:50:09 -04:00
Code
Issues
Projects
Releases
Packages
Wiki
Activity
Actions
2
98a52ce300
nvim-treesitter
/
queries
/
yaml
/
indents.scm
7 lines
94 B
Scheme
Raw
Normal View
History
Unescape
Escape
feat: added more indent queries
2021-01-05 19:26:08 +07:00
[
fix(indents/yaml): only indent mapping pair if value is a block This improves the following situation, in which '|' is the cursor position: ```yaml - key1: value1 key2: value2| ``` Before this commit, by pressing Enter would result in this indentation: ```yaml - key1: value1 key2: value2 | ``` Which is less convenient than this: ```yaml - key1: value1 key2: value2 | ```
2022-06-06 18:23:29 -03:00
(
block_mapping_pair
value:
(
block_node
)
)
fix(indents/yaml): indent sequence/list items This solves the second issue reported at #1377, in which the cursor would not be aligned with the line "key2: value2" when entering a new line below it. ```yaml - key1: value1 key2: value2 ```
2022-06-05 20:11:18 -03:00
(
block_sequence_item
)
feat: added more indent queries
2021-01-05 19:26:08 +07:00
]
@indent
fix(indents/yaml): improve error handling This helps to solve the first issue reported at #1377. The problem is that the line loses its indentation when we start inserting a new mapping pair (specifically, when we enter the character ":"). The issue seems to be solved by auto indenting ERROR nodes.
2022-06-05 22:07:37 -03:00
(
ERROR
)
@auto
Reference in a new issue
Copy permalink