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

@ -54,7 +54,7 @@ hlmap["include"] = "TSInclude"
function M.attach(bufnr, lang)
local bufnr = bufnr or api.nvim_get_current_buf()
local lang = lang or parsers.ft_to_lang(api.nvim_buf_get_option(bufnr, 'ft'))
local lang = parsers.get_buf_lang(bufnr, lang)
local config = configs.get_module('highlight')
for k, v in pairs(config.custom_captures) do