Skip to content

Commit

Permalink
fix(subprocess): require nvim-treesitter if installed
Browse files Browse the repository at this point in the history
See #303
rcarriga committed Feb 14, 2024

Verified

This commit was signed with the committer’s verified signature.
yuzawa-san James Yuzawa
1 parent 89a5b1f commit d1417bc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/neotest/lib/subprocess.lua
Original file line number Diff line number Diff line change
@@ -66,6 +66,9 @@ function neotest.lib.subprocess.init()
{ parent_address }
)
-- Load dependencies
if pcall(require, "nvim-treesitter") then
nio.fn.rpcrequest(child_chan, "nvim_exec_lua", "require('nvim-treesitter')", {})
end
nio.fn.rpcrequest(child_chan, "nvim_exec_lua", "require('plenary')", {})
enabled = true
nio.api.nvim_create_autocmd("VimLeavePre", { callback = cleanup })

0 comments on commit d1417bc

Please sign in to comment.