Refactor: Add parsers.get_buf_lang

This commit is contained in:
Stephan Seitz 2020-07-10 21:47:50 +02:00 committed by Thomas Vigouroux
parent 1849f30bb5
commit a4e2692c7b
5 changed files with 18 additions and 11 deletions

View file

@ -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)