Skip to content

Commit

Permalink
Revert "Forced ordering of responses to prevent them from ending up a…
Browse files Browse the repository at this point in the history
…lphabetical (#159)"

This reverts commit 1e74138.
  • Loading branch information
PMunch committed May 24, 2023
1 parent 1e74138 commit ffb2ef4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/nimlsp.nim
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@ proc main(ins: Stream | AsyncFile, outs: Stream | AsyncFile) {.multisync.} =
addedSuggestions: HashSet[string]
for suggestion in suggestions:
seenLabels.inc suggestion.collapseByIdentifier
for i in 0..suggestions.high:
let collapsed = suggestions[i].collapseByIdentifier
for suggestion in suggestions:
let collapsed = suggestion.collapseByIdentifier
if not addedSuggestions.contains collapsed:
addedSuggestions.incl collapsed
let
Expand All @@ -311,7 +311,7 @@ proc main(ins: Stream | AsyncFile, outs: Stream | AsyncFile) {.multisync.} =
documentation = some(suggestion.doc),
deprecated = none(bool),
preselect = none(bool),
sortText = some(fmt"{i:04}"),
sortText = none(string),
filterText = none(string),
insertText = none(string),
insertTextFormat = none(int),
Expand Down

0 comments on commit ffb2ef4

Please sign in to comment.