diff options
| author | Phelipe Teles <phelipe_teles@hotmail.com> | 2022-06-06 18:23:29 -0300 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2022-06-14 22:37:52 +0200 |
| commit | 8bd07c88b6165f5f5bcbef251d9ec86a2c99311f (patch) | |
| tree | 46e6e4f60a7774cacdebc8c2bfac70edbedf41db /queries/yaml | |
| parent | fix(indents/yaml): improve error handling (diff) | |
| download | nvim-treesitter-8bd07c88b6165f5f5bcbef251d9ec86a2c99311f.tar nvim-treesitter-8bd07c88b6165f5f5bcbef251d9ec86a2c99311f.tar.gz nvim-treesitter-8bd07c88b6165f5f5bcbef251d9ec86a2c99311f.tar.bz2 nvim-treesitter-8bd07c88b6165f5f5bcbef251d9ec86a2c99311f.tar.lz nvim-treesitter-8bd07c88b6165f5f5bcbef251d9ec86a2c99311f.tar.xz nvim-treesitter-8bd07c88b6165f5f5bcbef251d9ec86a2c99311f.tar.zst nvim-treesitter-8bd07c88b6165f5f5bcbef251d9ec86a2c99311f.zip | |
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
|
```
Diffstat (limited to 'queries/yaml')
| -rw-r--r-- | queries/yaml/indents.scm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/queries/yaml/indents.scm b/queries/yaml/indents.scm index 9c5223478..5820c62e4 100644 --- a/queries/yaml/indents.scm +++ b/queries/yaml/indents.scm @@ -1,5 +1,5 @@ [ - (block_mapping_pair) + (block_mapping_pair value: (block_node)) (block_sequence_item) ] @indent |
