diff options
| author | smjonas <jonas.strittmatter@gmx.de> | 2022-07-08 20:59:59 +0200 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2022-07-08 22:02:36 +0200 |
| commit | 013c744b06bb8e2e985d9b259a5be86f27e1bf28 (patch) | |
| tree | c36b285334f6f5cfa2481775b73514b148b3c943 | |
| parent | remove accidental text (diff) | |
| download | nvim-treesitter-013c744b06bb8e2e985d9b259a5be86f27e1bf28.tar nvim-treesitter-013c744b06bb8e2e985d9b259a5be86f27e1bf28.tar.gz nvim-treesitter-013c744b06bb8e2e985d9b259a5be86f27e1bf28.tar.bz2 nvim-treesitter-013c744b06bb8e2e985d9b259a5be86f27e1bf28.tar.lz nvim-treesitter-013c744b06bb8e2e985d9b259a5be86f27e1bf28.tar.xz nvim-treesitter-013c744b06bb8e2e985d9b259a5be86f27e1bf28.tar.zst nvim-treesitter-013c744b06bb8e2e985d9b259a5be86f27e1bf28.zip | |
fix: avoid installing parsers multiple times when using auto_install
| -rw-r--r-- | lua/nvim-treesitter/install.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua index be980ca0f..648b55528 100644 --- a/lua/nvim-treesitter/install.lua +++ b/lua/nvim-treesitter/install.lua @@ -430,8 +430,8 @@ function M.setup_auto_install() pattern = { "*" }, callback = function() local lang = parsers.get_buf_lang() - if parsers.get_parser_configs()[lang] and not parsers.has_parser(lang) then - install { ask_reinstall = true } { lang } + if parsers.get_parser_configs()[lang] and not is_installed(lang) then + install() { lang } end end, }) |
