summaryrefslogtreecommitdiff
path: root/lua/nvim-treesitter/locals.lua
diff options
context:
space:
mode:
authorkiyan42 <yazdani.kiyan@protonmail.com>2020-06-22 11:56:55 +0200
committerThomas Vigouroux <39092278+vigoux@users.noreply.github.com>2020-06-22 13:22:30 +0200
commitdef8c20dd710d7ee6337af21012535cb860607ae (patch)
treec3936371b9a9fb6b3cc12e53977262afee430fd8 /lua/nvim-treesitter/locals.lua
parent30dbf73113974789c70d4fa63e470e5bf7e16922 (diff)
rename and finish ft->lang migration
Diffstat (limited to 'lua/nvim-treesitter/locals.lua')
-rw-r--r--lua/nvim-treesitter/locals.lua8
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()