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

feat: Add keybindings for next/prev with skipping groups

Open tamirzb opened this issue 2 years ago • 1 comments

tamirzb avatar Jun 13 '23 11:06 tamirzb

I made the same behaviour in my config without changes in trouble.nvim

local next_skip_groups = function()
    require("trouble").next({ skip_groups = true });
end

local previous_skip_groups = function()
    require("trouble").previous({ skip_groups = true });
end

vim.api.nvim_create_autocmd({ "FileType" }, {
    pattern = { "Trouble" },
    callback = function(args)
        vim.api.nvim_buf_set_keymap(
            args.buf,
            'n',
            'j',
            "",
            {
                callback = next_skip_groups
            })
        vim.api.nvim_buf_set_keymap(
            args.buf,
            'n',
            'k',
            "",
            {
                callback = previous_skip_groups
            })
    end,
})

Andrei-Yermakovich avatar Jan 11 '24 17:01 Andrei-Yermakovich

Development on the main branch is EOL.

Trouble has been rewritten and will be merged in main soon.

This issue/feature either no longer exists or has been implemented on dev.

For more info, see https://github.com/folke/trouble.nvim/tree/dev

folke avatar Mar 29 '24 07:03 folke