LSP icon indicating copy to clipboard operation
LSP copied to clipboard

Add setting for diagnostics sort order

Open jwortmann opened this issue 4 years ago • 1 comments

This is a suggestion to make the sort order for diagnostics (per file) configurable by the user. It allows for example to restore the former sorting by location, which was removed when the DiagnosticsManager / Goto Diagnostic quick panel was added.

I've left the default value to be unsorted (current behavior).

For some context see https://github.com/sublimelsp/LSP/pull/1884#issuecomment-960159248


I've also move the "show_multiline_diagnostics_highlights" setting up a little bit in LSP.sublime-settings, so that all settings related to diagnostics are grouped together.

jwortmann avatar Nov 30 '21 12:11 jwortmann

Even though I've originally raised this need, I don't think anymore that it's better to sort by location after using the current logic for a while.

Nonetheless, this looks like potentially useful and simple feature.

rchl avatar Dec 01 '21 14:12 rchl

@jwortmann are you fine with dropping this PR? Nobody else complained, I personally don't miss this feature either so it's probably not worth complicating the code.

rchl avatar Aug 29 '22 21:08 rchl

Well, I still find it weird to use just the arbitrary and sometimes random ordering from the server, rather than sorting the diagnostics. Especially for the "Goto diagnostic" in the command palette it seems confusing to me that the view scrolls back and forth when you repeatedly press the arrow-down key in the list.

Unbenannt

VSCode for example seems to sort the diagnostics by line number in its problem panel. But the matter is not that important to me and I rarely use the diagnostics panel anyway, so I guess we can close this.

Nobody else complained

That's true, but not really an argument that it is the best solution what is currently used, because before the PR which removed the sorting I think also nobody complained over a time of several years :)

jwortmann avatar Aug 30 '22 08:08 jwortmann