From 8bd07c88b6165f5f5bcbef251d9ec86a2c99311f Mon Sep 17 00:00:00 2001 From: Phelipe Teles Date: Mon, 6 Jun 2022 18:23:29 -0300 Subject: 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 | ``` --- queries/yaml/indents.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/queries/yaml/indents.scm b/queries/yaml/indents.scm index 9c522347..5820c62e 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 -- cgit v1.2.3