trouble.nvim
trouble.nvim copied to clipboard
bug v3: Error viewing astro file
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)
NVIM v0.9.5
Operating system/version
Arch Linux x86_64
Describe the bug
When I open an Astro file using LazyVim and Trouble-v3 it starts with a lot of errors like this
..hare/nvim/lazy/trouble.nvim/lua/trouble/view/section.lua:98: Error executing lua: ...e/nvim/lazy/lualine.nvim/lua/lualine/utils/nvim_opts.lua:77: E539: Illegal character <]> stack traceback: [C]: in function 'nvim_win_set_option' ...e/nvim/lazy/lualine.nvim/lua/lualine/utils/nvim_opts.lua:77: in function 'setter_fn' ...e/nvim/lazy/lualine.nvim/lua/lualine/utils/nvim_opts.lua:50: in function 'set_opt' ...e/nvim/lazy/lualine.nvim/lua/lualine/utils/nvim_opts.lua:74: in function 'set' ...irio/.local/share/nvim/lazy/lualine.nvim/lua/lualine.lua:432: in function 'refresh' .../.local/share/nvim/lazy/trouble.nvim/lua/trouble/api.lua:150: in function 'on_update' ...hare/nvim/lazy/trouble.nvim/lua/trouble/view/section.lua:108: in function 'update' ...hare/nvim/lazy/trouble.nvim/lua/trouble/view/section.lua:72: in function 'finder' ...hare/nvim/lazy/trouble.nvim/lua/trouble/view/section.lua:66: in function 'fn' ...hare/nvim/lazy/trouble.nvim/lua/trouble/view/section.lua:99: in function <...hare/nvim/lazy/trouble.nvim/lua/trouble/view/section.lua:98> [C]: in function 'nvim_win_call' ...hare/nvim/lazy/trouble.nvim/lua/trouble/view/section.lua:98: in function 'main_call' ...hare/nvim/lazy/trouble.nvim/lua/trouble/view/section.lua:64: in function 'fn' ....local/share/nvim/lazy/trouble.nvim/lua/trouble/util.lua:119: in function <....local/share/nvim/lazy/trouble.nvim/lua/trouble/util.lua:115> [C]: in function 'xpcall' ....local/share/nvim/lazy/trouble.nvim/lua/trouble/util.lua:115: in function <....local/share/nvim/lazy/trouble.nvim/lua/trouble/util.lua:114>
If I use old version of Trouble there are no errors
Steps To Reproduce
- Open LazyVim
- Open an Astro file
- Wait some seconds and they appear
Expected Behavior
It will open the file without errors, now it is unusable. I tried with the repro below, but it doesn't reproduce anything, I don't know how to set it to reproduce (I'm a little newbie in this XD )
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
I tried also this repro.lua, but it doesn't appear any error
-- 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
{
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
},
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
require("lualine").setup()
vim.cmd.colorscheme("tokyonight")
-- add anything else here
These are my extras installed
These are my dotfiles, if can be of any help
I think this is probably fixed by https://github.com/folke/trouble.nvim/commit/f6a3fbfb667c3cccea8df9b7471fb9b31b1235fc