summaryrefslogtreecommitdiff
path: root/scripts/tests
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/tests')
-rw-r--r--scripts/tests/minimal.vim20
1 files changed, 12 insertions, 8 deletions
diff --git a/scripts/tests/minimal.vim b/scripts/tests/minimal.vim
index b1e80d6..d6dcf39 100644
--- a/scripts/tests/minimal.vim
+++ b/scripts/tests/minimal.vim
@@ -1,4 +1,8 @@
" covers all package managers i am willing to cover
+" PRIORITY: lazy.nvim paths FIRST (prepend to ensure priority)
+set rtp^=~/.local/share/nvim/lazy/nvim-treesitter
+set rtp^=~/.local/share/nvim/lazy/plenary.nvim
+" Additional paths (append)
set rtp+=.
set rtp+=../plenary.nvim
set rtp+=../nvim-treesitter
@@ -8,8 +12,6 @@ set rtp+=~/.local/share/nvim/site/pack/packer/start/plenary.nvim
set rtp+=~/.local/share/nvim/site/pack/packer/start/nvim-treesitter
set rtp+=~/.local/share/lunarvim/site/pack/packer/start/plenary.nvim
set rtp+=~/.local/share/lunarvim/site/pack/packer/start/nvim-treesitter
-set rtp+=~/.local/share/nvim/lazy/plenary.nvim
-set rtp+=~/.local/share/nvim/lazy/nvim-treesitter
set autoindent
set tabstop=4
@@ -21,12 +23,9 @@ runtime! plugin/plenary.vim
runtime! plugin/nvim-treesitter.lua
lua <<EOF
-vim.opt.rtp:append(vim.fn.stdpath('data') .. '/site')
-
--- Always setup nvim-treesitter so it knows where to find parsers
-local install_dir = vim.fn.stdpath('data') .. '/site'
+-- Always setup nvim-treesitter
local ts = require('nvim-treesitter')
-ts.setup({ install_dir = install_dir })
+ts.setup()
-- parsers to attempt to install (for user convenience)
local all_parsers = {
@@ -40,10 +39,15 @@ local required_parsers = { 'lua', 'typescript' }
local function missing_parsers(parsers)
local missing = {}
local buf = vim.api.nvim_create_buf(false, true)
+ print('[minimal.vim] Checking for missing parsers...')
for _, lang in ipairs(parsers) do
- local ok = pcall(vim.treesitter.get_parser, buf, lang)
+ print('[minimal.vim] Checking parser for: ' .. lang)
+ local ok, err = pcall(vim.treesitter.get_parser, buf, lang)
if not ok then
+ print('[minimal.vim] Parser NOT found for ' .. lang .. ': ' .. tostring(err))
table.insert(missing, lang)
+ else
+ print('[minimal.vim] Parser FOUND for ' .. lang)
end
end
vim.api.nvim_buf_delete(buf, { force = true })