Skip to content

add "goto next workspace diagnostic" commands#10913

Open
plul wants to merge 3 commits intohelix-editor:masterfrom
plul:goto_next_diag_workspace
Open

add "goto next workspace diagnostic" commands#10913
plul wants to merge 3 commits intohelix-editor:masterfrom
plul:goto_next_diag_workspace

Conversation

@plul
Copy link
Contributor

@plul plul commented Jun 10, 2024

Helix currently has commands to go to the next LSP diagnostic in the present document, and it has a picker for workspace diagnostics and the ability to show in the status bar the number of workspace errors and warnings, but it lacks a seemingly simple "goto next workspace diagnostic" command.

This PR adds

  • goto_next_diag_workspace (any diagnostic level)
  • goto_next_error_workspace (errors)
  • goto_next_warning_workspace (errors and warnings)

Addition of goto_prev_..., goto_first_... and goto_last_... commands to match the existing ones that only search the current document I think are less important (the ones I personally want are almost always the goto_next_... variants), but should be easy to add as a follow up PR if the structure of this one is accepted.

Discussion of default keybindings for these commands should be reserved for a separate PR.

I'm a first time contributor to Helix, so bear that in mind when reviewing. Some helper functions I wasn't sure in which module to best place them. But any feedback or push back is welcomed.

Some related issues/pull-requests:

@kirawi kirawi added the A-command Area: Commands label Jun 15, 2024
@plul plul force-pushed the goto_next_diag_workspace branch 2 times, most recently from 5d90536 to aab0239 Compare October 13, 2024 10:50
@plul
Copy link
Contributor Author

plul commented Oct 13, 2024

Rebased and added first variants:

    goto_first_diag_workspace (any diagnostic level)
    goto_first_error_workspace (errors)
    goto_first_warning_workspace (errors and warnings)

@plul plul force-pushed the goto_next_diag_workspace branch 2 times, most recently from 713980c to 09a4b20 Compare January 22, 2025 12:22
@plul
Copy link
Contributor Author

plul commented Jan 22, 2025

Rebased on 25.01.1

@plul plul force-pushed the goto_next_diag_workspace branch from 09a4b20 to c316f98 Compare January 24, 2025 11:37
@plul
Copy link
Contributor Author

plul commented Jan 24, 2025

Rebased on master (for the newly merged file picker).

@plul plul force-pushed the goto_next_diag_workspace branch from c316f98 to e6ffc30 Compare February 14, 2025 09:40
@plul plul force-pushed the goto_next_diag_workspace branch from e6ffc30 to d7b550c Compare March 4, 2025 08:28
@plul
Copy link
Contributor Author

plul commented Mar 4, 2025

For anyone wishing to test this out, you can use the following keybindings as an example:

[keys.normal]
1 = "goto_next_diag_workspace"
2 = "goto_next_warning_workspace"
3 = "goto_next_error_workspace"
C-1 = "goto_first_diag_workspace"
C-2 = "goto_first_warning_workspace"
C-3 = "goto_first_error_workspace"

This is what I've been daily-driving for the past 8 months or so.

@plul plul force-pushed the goto_next_diag_workspace branch from d7b550c to f191f85 Compare March 10, 2025 14:36
@plul plul force-pushed the goto_next_diag_workspace branch from f191f85 to f3b29c7 Compare May 20, 2025 07:15
RoloEdits and others added 3 commits July 18, 2025 10:19
Adds
- goto_first_diag_workspace
- goto_first_error_workspace
- goto_first_warning_workspace
- goto_next_diag_workspace
- goto_next_error_workspace
- goto_next_warning_workspace
@plul plul force-pushed the goto_next_diag_workspace branch from f3b29c7 to 192d9a8 Compare July 30, 2025 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-command Area: Commands

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants