how to setup the trouble with snack. #1571
Unanswered
eahangari-8x8
asked this question in
Q&A
Replies: 2 comments 1 reply
|
Try a minimal reproducible example of the configuration: Code-- Run with `nvim -u repro.lua repro.lua`
-- Reproduce:
-- :lua Snacks.picker.diagnostics()
-- <C-t>
vim.env.LAZY_STDPATH = '.repro'
load(vim.fn.system 'curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua')()
---@module 'snacks'
---@diagnostic disable-next-line: missing-fields
require('lazy.minit').repro {
spec = {
{
'folke/trouble.nvim',
},
{
'folke/snacks.nvim',
dependencies = {
{ -- https://github.com/folke/snacks.nvim/blob/main/docs/picker.md?plain=1#L569-L596
'folke/trouble.nvim',
optional = true, -- Merge specs only if 'folke/trouble.nvim' is already imported
specs = {
'folke/snacks.nvim',
opts = function(_, opts)
return vim.tbl_deep_extend('force', opts or {}, {
picker = {
actions = require('trouble.sources.snacks').actions,
win = {
-- When the cursor is within `input`
input = { keys = { ['<c-t>'] = { 'trouble_open', mode = { 'n', 'i' } } } },
},
},
})
end,
},
},
},
},
{
'neovim/nvim-lspconfig',
opts = {
servers = {
lua_ls = {},
},
},
config = function(_, opts)
for server, config in pairs(opts.servers) do
require('lspconfig')[server].setup(config)
end
end,
},
},
} |
1 reply
|
@eahangari-8x8 I was confused and getting the same error because I was trying to use |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello everyone, Im new to nvim and lua but this is my snack config, can you please help me to setup the trouble.nvim with my snack. I love folke plugins 😍
but I don't know how to setup the trouble, and the documentation for the pickers is difficult to follow for me because I know nothing on lua lang.
when I try to press CTRL-t on the lsp errors it shows me this error
E73: Tag stack empty
instead of showing the lsp error with trouble
thanks for your help
All reactions