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

feat: expand next/previous API calls; deprecate skip_groups #115

Closed
wants to merge 1 commit into from

Conversation

snezhniylis
Copy link
Contributor

Allow fine-tuning said API calls to be able to pick the exact type of items to select next. For example:

-- Selecting any item or folded group
require("trouble").next({target = {"item_any", "group_folded"}})
-- Selecting only 'error' and 'warning' items
require("trouble").previous({target = {"item_error", "item_warning"}})

Possible target items: "group_any", "group_folded", "group_unfolded", "item_any", "item_error", "item_warning", "item_information", "item_hint", "item_other"

This list can easily be expanded in the future.


View:next_item and View:previous_item are practically the same, except iteration direction, so maybe it makes sense to abstract them to 1 private method. But I'm not sure about the project's coding conventions, so I'll leave it as it is.


Closes #63

Allow fine-tuning said API calls to be able to pick the exact type of
items to select next. For example:

Selecting any item or folded group

  require("trouble").next({target = {"item_any", "group_folded"}})

Selecting only 'error' and 'warning' items

  require("trouble").previous({target = {"item_error", "item_warning"}})

---
Closes folke#63
@folke
Copy link
Owner

folke commented Mar 29, 2024

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 folke closed this Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jump to next warning or next error
2 participants