From c641e224731180371e6a4705762af0c6a882d95e Mon Sep 17 00:00:00 2001 From: Chinmay Dalal Date: Sat, 3 Sep 2022 13:41:30 +0530 Subject: [PATCH] Add `make`, increase priority --- lua/rainbow/internal.lua | 4 ++-- lua/rainbow/levels.lua | 6 ++++++ queries/make/parens.scm | 11 +++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 queries/make/parens.scm diff --git a/lua/rainbow/internal.lua b/lua/rainbow/internal.lua index 935de72..b59c33c 100644 --- a/lua/rainbow/internal.lua +++ b/lua/rainbow/internal.lua @@ -91,7 +91,7 @@ local function update_range(bufnr, changes, tree, lang) { regtype = "b", inclusive = true, - priority = 120, + priority = 210, } ) else @@ -103,7 +103,7 @@ local function update_range(bufnr, changes, tree, lang) { endRow, endCol - 1 }, "blockwise", true, - 120 + 210 ) end end diff --git a/lua/rainbow/levels.lua b/lua/rainbow/levels.lua index da3240d..8d302d9 100644 --- a/lua/rainbow/levels.lua +++ b/lua/rainbow/levels.lua @@ -172,4 +172,10 @@ return { commonlisp = { list_lit = true, }, + make = { + command_substitution = true, + function_call = true, + substitution_reference = true, + variable_reference = true, + } } diff --git a/queries/make/parens.scm b/queries/make/parens.scm new file mode 100644 index 0000000..8026609 --- /dev/null +++ b/queries/make/parens.scm @@ -0,0 +1,11 @@ +; inherits round, curly +(function_call ")" @right) +(function_call "(" @left) + + +(substitution_reference ")" @right) +(substitution_reference "(" @left) + + +(variable_reference ")" @right) +(variable_reference "(" @left)