diff options
Diffstat (limited to 'lua/nvim-treesitter/locals.lua')
| -rw-r--r-- | lua/nvim-treesitter/locals.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lua/nvim-treesitter/locals.lua b/lua/nvim-treesitter/locals.lua index cbea8910..7ace347a 100644 --- a/lua/nvim-treesitter/locals.lua +++ b/lua/nvim-treesitter/locals.lua @@ -12,13 +12,13 @@ local M = { } function M.collect_locals(bufnr) - local ft = api.nvim_buf_get_option(bufnr, "ft") - if not ft then return end + local lang = parsers.ft_to_lang(api.nvim_buf_get_option(bufnr, "ft")) + if not lang then return end - local query = queries.get_query(ft, 'locals') + local query = queries.get_query(lang, 'locals') if not query then return end - local parser = parsers.get_parser(bufnr, ft) + local parser = parsers.get_parser(bufnr, lang) if not parser then return end local root = parser:parse():root() |
