refactor(parser): expose get_lang_from_ft as public API
Problem: `get_lang_from_ft` is needed by the gitsigns module but was a local function in `parser.lua`, causing duplication. Solution: assign it to `M.get_lang_from_ft` for reuse by other modules.
This commit is contained in:
parent
09a0418942
commit
559ef194b7
1 changed files with 2 additions and 0 deletions
|
|
@ -353,6 +353,8 @@ function M.parse_buffer(bufnr)
|
||||||
return hunks
|
return hunks
|
||||||
end
|
end
|
||||||
|
|
||||||
|
M.get_lang_from_ft = get_lang_from_ft
|
||||||
|
|
||||||
M._test = {
|
M._test = {
|
||||||
ft_lang_cache = ft_lang_cache,
|
ft_lang_cache = ft_lang_cache,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue