remove second check

This commit is contained in:
Oleg Matrokhin 2020-08-31 00:43:04 +03:00 committed by Thomas Vigouroux
parent cf9df71341
commit ac13baadb6

View file

@ -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