diff options
| author | kiyan42 <yazdani.kiyan@protonmail.com> | 2020-10-15 21:04:38 +0200 |
|---|---|---|
| committer | Thomas Vigouroux <tomvig38@gmail.com> | 2020-10-16 13:48:24 +0200 |
| commit | e5d8b6ade7c9896f4aa7f9f8efac98a82bad25d0 (patch) | |
| tree | a8d3d93ce72a2ba8bc10c82b88c0b75e08035cef /lua | |
| parent | Update README requirements for parser download/compilation (diff) | |
| download | nvim-treesitter-e5d8b6ade7c9896f4aa7f9f8efac98a82bad25d0.tar nvim-treesitter-e5d8b6ade7c9896f4aa7f9f8efac98a82bad25d0.tar.gz nvim-treesitter-e5d8b6ade7c9896f4aa7f9f8efac98a82bad25d0.tar.bz2 nvim-treesitter-e5d8b6ade7c9896f4aa7f9f8efac98a82bad25d0.tar.lz nvim-treesitter-e5d8b6ade7c9896f4aa7f9f8efac98a82bad25d0.tar.xz nvim-treesitter-e5d8b6ade7c9896f4aa7f9f8efac98a82bad25d0.tar.zst nvim-treesitter-e5d8b6ade7c9896f4aa7f9f8efac98a82bad25d0.zip | |
Remove get_parser logic
upstream now handles parsers by itself, so we don't need to do it
in this repo.
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-treesitter/parsers.lua | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index f77259b82..848f66ffe 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -377,13 +377,7 @@ function M.get_parser(bufnr, lang) local lang = lang or M.get_buf_lang(buf) if M.has_parser(lang) then - if not M[buf] then - M[buf] = {} - end - if not M[buf][lang] then - M[buf][lang] = ts.get_parser(buf, lang) - end - return M[buf][lang] + return ts.get_parser(bufnr, lang) end end |
