Skip to content

Commit db416f8

Browse files
committed
feat: refactor treesitter filetype detection
1 parent e93611f commit db416f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lua/vsnip/treesitter.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ local function get_parser_filetype ( lang )
1818
end
1919
end
2020

21-
function M.is_available ()
21+
local function is_available ()
2222
return ok_parsers and ok_utils
2323
end
2424

@@ -28,7 +28,7 @@ function M.get_ft_at_cursor ( bufnr )
2828
injected_filetype = "",
2929
}
3030

31-
if M.is_available() then
31+
if is_available() then
3232
local cur_node = ts_utils.get_node_at_cursor( vim.fn.bufwinid( bufnr ) )
3333

3434
if cur_node then

0 commit comments

Comments
 (0)