mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-06 13:30:01 -04:00
rename and finish ft->lang migration
This commit is contained in:
parent
30dbf73113
commit
def8c20dd7
4 changed files with 36 additions and 36 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue