mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-21 04:40:08 -04:00
strip slash, normalize rtp checks
This commit is contained in:
parent
7caec274fd
commit
0443595b12
1 changed files with 6 additions and 2 deletions
|
|
@ -87,7 +87,7 @@ local function install_health()
|
||||||
health.info(k .. ': ' .. v)
|
health.info(k .. ': ' .. v)
|
||||||
end
|
end
|
||||||
|
|
||||||
local installdir = config.get_install_dir('')
|
local installdir = config.get_install_dir(''):gsub('/$', '')
|
||||||
health.start('Install directory for parsers and queries')
|
health.start('Install directory for parsers and queries')
|
||||||
health.info(installdir)
|
health.info(installdir)
|
||||||
if vim.uv.fs_access(installdir, 'w') then
|
if vim.uv.fs_access(installdir, 'w') then
|
||||||
|
|
@ -95,7 +95,11 @@ local function install_health()
|
||||||
else
|
else
|
||||||
health.error('is not writable.')
|
health.error('is not writable.')
|
||||||
end
|
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.')
|
health.ok('is in runtimepath.')
|
||||||
else
|
else
|
||||||
health.error('is not in runtimepath.')
|
health.error('is not in runtimepath.')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue