diff options
| author | Amaan Qureshi <amaanq12@gmail.com> | 2023-03-11 16:05:03 -0500 |
|---|---|---|
| committer | Amaan Qureshi <amaanq12@gmail.com> | 2023-03-11 17:52:54 -0500 |
| commit | 079a50f66ea9f2d3b9827bdba82ba3b255155621 (patch) | |
| tree | b9c1443d772d7a67eaa4d57309f21503f8bad47e /lua | |
| parent | Update README (diff) | |
| download | nvim-treesitter-079a50f66ea9f2d3b9827bdba82ba3b255155621.tar nvim-treesitter-079a50f66ea9f2d3b9827bdba82ba3b255155621.tar.gz nvim-treesitter-079a50f66ea9f2d3b9827bdba82ba3b255155621.tar.bz2 nvim-treesitter-079a50f66ea9f2d3b9827bdba82ba3b255155621.tar.lz nvim-treesitter-079a50f66ea9f2d3b9827bdba82ba3b255155621.tar.xz nvim-treesitter-079a50f66ea9f2d3b9827bdba82ba3b255155621.tar.zst nvim-treesitter-079a50f66ea9f2d3b9827bdba82ba3b255155621.zip | |
refactor!: remove setting the update strategy
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-treesitter/configs.lua | 6 | ||||
| -rw-r--r-- | lua/nvim-treesitter/install.lua | 5 |
2 files changed, 2 insertions, 9 deletions
diff --git a/lua/nvim-treesitter/configs.lua b/lua/nvim-treesitter/configs.lua index 4207384ef..a3f4063cd 100644 --- a/lua/nvim-treesitter/configs.lua +++ b/lua/nvim-treesitter/configs.lua @@ -14,7 +14,6 @@ local M = {} ---@field ensure_installed string[]|string ---@field ignore_install string[] ---@field auto_install boolean ----@field update_strategy string ---@field parser_install_dir string|nil ---@type TSConfig @@ -24,7 +23,6 @@ local config = { ensure_installed = {}, auto_install = false, ignore_install = {}, - update_strategy = "lockfile", parser_install_dir = nil, } @@ -604,10 +602,6 @@ function M.get_parser_info_dir() return M.get_parser_install_dir "parser-info" end -function M.get_update_strategy() - return config.update_strategy -end - function M.get_ignored_parser_installs() return config.ignore_install or {} end diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua index ba8cada87..37f32fe53 100644 --- a/lua/nvim-treesitter/install.lua +++ b/lua/nvim-treesitter/install.lua @@ -379,7 +379,7 @@ local function run_install(cache_folder, install_folder, lang, repo, with_sync, end local revision = repo.revision - if not revision and configs.get_update_strategy() == "lockfile" then + if not revision then revision = get_revision(lang) end @@ -583,8 +583,7 @@ function M.update(options) utils.notify "Parsers are up-to-date!" end else - local parsers_to_update = configs.get_update_strategy() == "lockfile" and outdated_parsers() - or info.installed_parsers() + local parsers_to_update = outdated_parsers() or info.installed_parsers() if #parsers_to_update == 0 then utils.notify "All parsers are up-to-date!" end |
