diff options
| author | Thomas Vigouroux <tomvig38@gmail.com> | 2020-07-27 13:38:09 +0200 |
|---|---|---|
| committer | Thomas Vigouroux <39092278+vigoux@users.noreply.github.com> | 2020-07-27 15:18:48 +0200 |
| commit | 572a4a964bbe4071c3c26c72d4259412761196fa (patch) | |
| tree | 406bec234a65675647360d2bad245020bf67c5f4 /lua/nvim-treesitter/configs.lua | |
| parent | 1d178d75ea30a2e9ab0151867c7e1ededec22e03 (diff) | |
configs: attach on unknown parsers too
Diffstat (limited to 'lua/nvim-treesitter/configs.lua')
| -rw-r--r-- | lua/nvim-treesitter/configs.lua | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lua/nvim-treesitter/configs.lua b/lua/nvim-treesitter/configs.lua index 05221b66..e8cd4523 100644 --- a/lua/nvim-treesitter/configs.lua +++ b/lua/nvim-treesitter/configs.lua @@ -106,10 +106,6 @@ local function enable_module(mod, bufnr, lang) local bufnr = bufnr or api.nvim_get_current_buf() local lang = lang or parsers.get_buf_lang(bufnr) - if not parsers.list[lang] then - return - end - M.attach_module(mod, bufnr, lang) end @@ -342,7 +338,7 @@ end function M.attach_module(mod_name, bufnr, lang) local resolved_mod = resolve_module(mod_name) - if resolved_mod then + if resolved_mod and parsers.has_parser(lang) then resolved_mod.attach(bufnr, lang) end end |
