return {
"nvim-treesitter/nvim-treesitter-context",
config = function()
local context = require("treesitter-context")
vim.keymap.set("n", "<leader>o", context.toggle)
end
}
I am on master, commit 158377d
It works fine when starting neovim, but if I toggle it off and then on, it will no longer show any context for the rest of the session. I have tried calling context.enable and I have also tried manually running :TSContextEnable with no success.
I expect enable() to enable the context after it was disabled.
Actual behavior
enable() does not enable the context.
Minimal config
local plugins = {
ts = 'https://github.com/nvim-treesitter/nvim-treesitter',
ts_context = 'https://github.com/nvim-treesitter/nvim-treesitter-context',
-- ADD ADDITIONAL PLUGINS THAT ARE _NECESSARY_ TO REPRODUCE THE ISSUE
}
for name, url in pairs(plugins) do
local install_path = '/tmp/nvim/site/'..name
if vim.fn.isdirectory(install_path) == 0 then
vim.fn.system { 'git', 'clone', '--depth=1', url, install_path }
end
vim.o.runtimepath = install_path..','..vim.o.runtimepath
end
-- ADD INIT.LUA SETTINGS THAT IS _NECESSARY_ FOR REPRODUCING THE ISSUE
Description
My lazy config is:
I am on master, commit 158377d
It works fine when starting neovim, but if I toggle it off and then on, it will no longer show any context for the rest of the session. I have tried calling
context.enable
and I have also tried manually running:TSContextEnable
with no success.Neovim version
NVIM v0.10.1 Build type: Release LuaJIT 2.1.1716656478
Expected behavior
I expect
enable()
to enable the context after it was disabled.Actual behavior
enable()
does not enable the context.Minimal config
Steps to reproduce
nvim --clean -u minimal.lua