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

Goto Diagnostic is broken under certain conditions #2089

Closed
jwortmann opened this issue Oct 15, 2022 · 0 comments · Fixed by #2091
Closed

Goto Diagnostic is broken under certain conditions #2089

jwortmann opened this issue Oct 15, 2022 · 0 comments · Fixed by #2091

Comments

@jwortmann
Copy link
Member

Describe the bug
The "LSP: Goto Diagnostic..." and "LSP: Goto Diagnostic in Project..." commands are broken under certain conditions.

To Reproduce

  1. Install LSP-pyright (for example)
  2. In LSP.sublime-settings, set "diagnostics_panel_include_severity_level": 2
  3. Open a file with the following content:
print(x)

def foo(y):
    pass
  1. "LSP: Goto Diagnostic..." and "LSP: Goto Diagnostic in Project..." work as expected
  2. Comment out the first line with the error "x is not defined"
  3. Now, "LSP: Goto Diagnostic..." will just open the command palette, and "LSP: Goto Diagnostic in Project..." will crash Sublime Text (it just closes without error message)

Probably the max_severity restriction for the ListInputHandlers of LspGotoDiagnosticCommand should be dropped, or it needs also to be used for is_enabled.

Environment (please complete the following information):

  • OS: Windows 11
  • Sublime Text version: 4126
  • LSP version: latest
  • Language servers used: LSP-pyright
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 a pull request may close this issue.

1 participant