From 0443595b12c027642c628531a612df1d71651c3b Mon Sep 17 00:00:00 2001 From: Sneha De <55897319+sneha-afk@users.noreply.github.com> Date: Sun, 29 Mar 2026 11:56:52 -0700 Subject: [PATCH] strip slash, normalize rtp checks --- lua/nvim-treesitter/health.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lua/nvim-treesitter/health.lua b/lua/nvim-treesitter/health.lua index 2fcaea5a0..020842c06 100644 --- a/lua/nvim-treesitter/health.lua +++ b/lua/nvim-treesitter/health.lua @@ -87,7 +87,7 @@ local function install_health() health.info(k .. ': ' .. v) end - local installdir = config.get_install_dir('') + local installdir = config.get_install_dir(''):gsub('/$', '') health.start('Install directory for parsers and queries') health.info(installdir) if vim.uv.fs_access(installdir, 'w') then @@ -95,7 +95,11 @@ local function install_health() else health.error('is not writable.') end - if vim.list_contains(vim.api.nvim_list_runtime_paths(), installdir) then + if + vim.iter(vim.api.nvim_list_runtime_paths()):any(function(p) + return installdir == vim.fs.normalize(p) + end) + then health.ok('is in runtimepath.') else health.error('is not in runtimepath.')