diff options
| author | Oleg Matrokhin <o.matrohin@softpro.com> | 2020-08-31 00:43:04 +0300 |
|---|---|---|
| committer | Thomas Vigouroux <39092278+vigoux@users.noreply.github.com> | 2020-08-30 23:48:11 +0200 |
| commit | ac13baadb66160e7cd863c42d6986609984c075c (patch) | |
| tree | dccec3f4cba856549f6cfc1a62497b76c0a5f409 /lua | |
| parent | fix get_package_path function for paths with trailing slash (diff) | |
| download | nvim-treesitter-ac13baadb66160e7cd863c42d6986609984c075c.tar nvim-treesitter-ac13baadb66160e7cd863c42d6986609984c075c.tar.gz nvim-treesitter-ac13baadb66160e7cd863c42d6986609984c075c.tar.bz2 nvim-treesitter-ac13baadb66160e7cd863c42d6986609984c075c.tar.lz nvim-treesitter-ac13baadb66160e7cd863c42d6986609984c075c.tar.xz nvim-treesitter-ac13baadb66160e7cd863c42d6986609984c075c.tar.zst nvim-treesitter-ac13baadb66160e7cd863c42d6986609984c075c.zip | |
remove second check
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-treesitter/utils.lua | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lua/nvim-treesitter/utils.lua b/lua/nvim-treesitter/utils.lua index c8f09fe22..101bfafab 100644 --- a/lua/nvim-treesitter/utils.lua +++ b/lua/nvim-treesitter/utils.lua @@ -20,8 +20,7 @@ end function M.get_package_path() for _, path in pairs(api.nvim_list_runtime_paths()) do local last_segment = vim.fn.fnamemodify(path, ":p:h:t") - local penultimate_segment = vim.fn.fnamemodify(path, ":p:h:t:t") - if last_segment == "nvim-treesitter" or (last_segment == "" and penultimate_segment == "nvim-treesitter") then + if last_segment == "nvim-treesitter" then return path end end |
