diff options
| author | Stephan Seitz <stephan.seitz@fau.de> | 2022-06-25 11:51:21 +0200 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2022-06-25 12:01:22 +0200 |
| commit | d810c386341fbf0d49895a2cdd6a2b63b945b71a (patch) | |
| tree | 61d74cb82e03c28afee171e51aa5167f55ef8253 /lua/nvim-treesitter/install.lua | |
| parent | 74ec4e1d5c2bfaa7ad6488af7f934a28242804dd (diff) | |
Chore: remove prefix from parser "location" property
This was very confusing when using the location property as it
always had to start with "tree-sitter-<lang>" for no real reason.
Diffstat (limited to 'lua/nvim-treesitter/install.lua')
| -rw-r--r-- | lua/nvim-treesitter/install.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua index 822e00e6..e709849a 100644 --- a/lua/nvim-treesitter/install.lua +++ b/lua/nvim-treesitter/install.lua @@ -242,7 +242,11 @@ local function run_install(cache_folder, install_folder, lang, repo, with_sync, if from_local_path then compile_location = repo.url else - local repo_location = string.gsub(repo.location or project_name, "/", path_sep) + local repo_location = project_name + if repo.location then + repo_location = repo_location .. "/" .. repo.location + end + repo_location = repo_location:gsub("/", path_sep) compile_location = utils.join_path(cache_folder, repo_location) end local parser_lib_name = utils.join_path(install_folder, lang) .. ".so" |
