trouble.nvim icon indicating copy to clipboard operation
trouble.nvim copied to clipboard

bug v3: requires Treesitter `markdown_inline`

Open jpmcb opened this issue 10 months ago • 0 comments

Did you check docs and existing issues?

  • [X] I have read all the trouble.nvim docs
  • [X] I have searched the existing issues of trouble.nvim
  • [X] I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

v0.9.4 Release

Operating system/version

macOS 13.3

Describe the bug

After a fresh install, toggling into Trouble opens the window pane but yields this error:

...0.9.4/share/nvim/runtime/lua/vim/treesitter/language.lua:93: no parser for 'markdown_inline' language, see :help treesitter-parsers
Press ENTER or type command to continue

which persists and keeps repeating until it eventually fills the screen and requires :q many times to quit or it just crashes:

Screenshot 2024-04-04 at 10 19 42 PM

I was able to unblock this by :TSInstall markdown_inline and adding:

	{
		"nvim-treesitter/nvim-treesitter",
		build = ":TSUpdate",
		ensure_installed = {
			"markdown_inline",
		},
		auto_install = true,
	},

to my inline Lazy.nvim config. Was there something I was missing in the install instructions? I just took the recommended install whole-sale from the README.md.

Steps To Reproduce

  1. :TSUninstall markdown_inline
  2. Open a file and <leader>xx

Expected Behavior

I'd expect:

  1. Treesitter to be required by the plugin
  2. The necessary treesitter parsers to come "batteries included" with the trouble.nvim install

Repro

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  "folke/trouble.nvim",
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here

-- TODO: late night, working on reproducing this, will come back with a minimal Lua to reproduce

jpmcb avatar Apr 05 '24 04:04 jpmcb