From 206c00c5c6d8678e337b15db3ffe97613afb9ddd Mon Sep 17 00:00:00 2001 From: janAkali <60652075+janAkali@users.noreply.github.com> Date: Fri, 22 Nov 2024 07:43:17 +0000 Subject: [PATCH 1/3] feat: Add Nim to scope languages https://github.com/nvim-treesitter/nvim-treesitter/blob/eff88f4e8b71d92bdcaeca6e4f7e1e146b263614/queries/nim/locals.scm#L306-L322 --- lua/ibl/scope_languages.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lua/ibl/scope_languages.lua b/lua/ibl/scope_languages.lua index 496fcb3..4e3fcd7 100644 --- a/lua/ibl/scope_languages.lua +++ b/lua/ibl/scope_languages.lua @@ -298,6 +298,23 @@ local M = { mlir = { region = true, }, + nim = { + ["for"] = true, + ["while"] = true, + ["block"] = true, + static_statement = true, + proc_declaration = true, + func_declaration = true, + method_declaration = true, + iterator_declaration = true, + converter_declaration = true, + template_declaration = true, + macro_declaration = true, + proc_expression = true, + func_expression = true, + iterator_expression = true, + concept_declaration = true, + }, nix = { let_expression = true, rec_attrset_expression = true, From 630d6079497af3f64d4d6ba4279da0c0c7a27495 Mon Sep 17 00:00:00 2001 From: janAkali Date: Fri, 22 Nov 2024 16:17:58 +0800 Subject: [PATCH 2/3] feat: add if, case, try to Nim scope --- lua/ibl/scope_languages.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/ibl/scope_languages.lua b/lua/ibl/scope_languages.lua index 4e3fcd7..a837826 100644 --- a/lua/ibl/scope_languages.lua +++ b/lua/ibl/scope_languages.lua @@ -299,9 +299,13 @@ local M = { region = true, }, nim = { + ["if"] = true, + case = true, + try = true, + ["for"] = true, ["while"] = true, - ["block"] = true, + block = true, static_statement = true, proc_declaration = true, func_declaration = true, From afb8ffde2d70c2c68a0369f35957ba5c330238f9 Mon Sep 17 00:00:00 2001 From: janAkali Date: Wed, 4 Dec 2024 13:46:56 +0800 Subject: [PATCH 3/3] style: remove extra space --- lua/ibl/scope_languages.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/ibl/scope_languages.lua b/lua/ibl/scope_languages.lua index a837826..52692f5 100644 --- a/lua/ibl/scope_languages.lua +++ b/lua/ibl/scope_languages.lua @@ -301,7 +301,7 @@ local M = { nim = { ["if"] = true, case = true, - try = true, + try = true, ["for"] = true, ["while"] = true,