Skip to content

Commit 3af6493

Browse files
guiboulukas-reineke
authored andcommitted
fix: scope logic with unknown language
If the language is not listed in the languages "officially" supported by ibl, `scope[lang]` is `nil`.
1 parent 2e57e1b commit 3af6493

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/ibl/scope.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ M.get = function(bufnr, config)
7676
local type = node:type()
7777

7878
if
79-
(scope_lang[lang][type] and not utils.tbl_contains(excluded_node_types, type))
79+
((scope_lang[lang] and scope_lang[lang][type]) and not utils.tbl_contains(excluded_node_types, type))
8080
or utils.tbl_contains(include_node_types, type)
8181
or utils.tbl_contains(include_node_types, "*")
8282
then

0 commit comments

Comments
 (0)