Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug v3: requires Treesitter markdown_inline #413

Closed
3 tasks done
jpmcb opened this issue Apr 5, 2024 · 6 comments
Closed
3 tasks done

bug v3: requires Treesitter markdown_inline #413

jpmcb opened this issue Apr 5, 2024 · 6 comments
Labels

Comments

@jpmcb
Copy link

jpmcb commented Apr 5, 2024

Did you check docs and existing issues?

  • I have read all the trouble.nvim docs
  • I have searched the existing issues of trouble.nvim
  • 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 jpmcb added the bug v3 label Apr 5, 2024
nicojust added a commit to nicojust/kickstart-modular.nvim that referenced this issue Apr 11, 2024
nicojust added a commit to nicojust/kickstart-modular.nvim that referenced this issue Apr 24, 2024
nicojust added a commit to nicojust/kickstart-modular.nvim that referenced this issue May 5, 2024
nicojust added a commit to nicojust/kickstart-modular.nvim that referenced this issue May 11, 2024
@folke
Copy link
Owner

folke commented May 12, 2024

Thank you for reporting!

I updated the docs that either Neovim 0.10.0 or the markdown treesitter parsers are required and also added a check during setup.

@folke folke closed this as completed May 12, 2024
@gagefonk
Copy link

I'm not sure if i should open a new issue, or just comment here since it was 'recently' closed, please let me know if i should make a new issue @folke. After the checks from 307f271, my trouble is broken now. I keep getting the error that i need to be on neovim 0.10.0 or have markdown/markdown_inline installed.

While I do have both markdown/markdown_inline installed, it's still throwing an error for me. When I commented out the checks from this last commit, the plugin loaded fine and works like normal.

@folke folke reopened this May 13, 2024
@folke
Copy link
Owner

folke commented May 13, 2024

@gagefonk what version of Neovim are you on?
What does :=vim.treesitter.language.add('markdown') show? (and same for inline)

@gagefonk
Copy link

im on 0.9.5,
this is from running the command:
Screenshot 2024-05-12 at 22 25 13
this is my treesitter lazyspec, and the info from TSModuleInfo showing it's installed:
Screenshot 2024-05-12 at 22 27 40
Screenshot 2024-05-12 at 22 27 08

@folke
Copy link
Owner

folke commented May 13, 2024

ok, thanks. It's probably becuase noice is loaded before nvim-treesitter.
Will work on a fix!

@folke
Copy link
Owner

folke commented May 13, 2024

I've just pushed a fix. Let me know if you still experience issues.

@folke folke closed this as completed May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants