mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-03 03:56:52 -04:00
Refactor: Add parsers.get_buf_lang
This commit is contained in:
parent
1849f30bb5
commit
a4e2692c7b
5 changed files with 18 additions and 11 deletions
|
|
@ -43,7 +43,7 @@ end
|
|||
function M.iter_locals(bufnr, root, query_kind)
|
||||
query_kind = query_kind or 'locals'
|
||||
|
||||
local lang = parsers.ft_to_lang(api.nvim_buf_get_option(bufnr, "ft"))
|
||||
local lang = parsers.get_buf_lang(bufnr)
|
||||
if not lang then return end
|
||||
|
||||
local query = queries.get_query(lang, query_kind)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue