nvim-treesitter-context icon indicating copy to clipboard operation
nvim-treesitter-context copied to clipboard

`:TSContextToggle` only disables treesitter-context but cannot enable

Open tgharib opened this issue 11 months ago • 2 comments

Description

:TSContextToggle used to work properly in the past.

However, now it seems it effectively functions as :TSContextDisable as it only disables treesitter-context but cannot enable treesitter-context.

Neovim version

NVIM v0.10.3

Expected behavior

No response

Actual behavior

See description.

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

Steps to reproduce

  1. nvim --clean -u minimal.lua
  2. :TSContextToggle once to disable treesitter-context
  3. :TSContextToggle again doesn't enable treesitter-context

tgharib avatar Jan 16 '25 19:01 tgharib

Sorry, please ignore, I tried to reproduce with a clean nvim config and couldn't.

tgharib avatar Jan 16 '25 19:01 tgharib

I'm having the problem that at startup, it is not shown although I have

require("treesitter-context").setup{
    enable = true,
}

in my config. I have to execute `:TSContextToggle TWICE in order to see it. After that, one execution of this command suffices to toggle it. This means, it was enabled after NeoVim startup but not visible.

Unfortunately, I have no permission to reopen this issue.

cmon1701 avatar May 21 '25 14:05 cmon1701