Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 5.0.0-rc1
-
None
Description
With the haskell-language-server, completing "getKeys" in my project gives:
14:29:01.639 Client {"id":"{2a2cbd5c-1b23-4e55-a64b-857b3c971c83}","jsonrpc":"2.0","method":"textDocument/completion","params":{"context":{"triggerKind":1},"position":{"character":17,"line":14},"textDocument":{"uri":"file://****/paddle/Paddle1.hs"}}} 14:29:01.715 Server {"result":{"items":[{"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"*Defined in 'Common'*\n* * *\n\n"},"insertText":"getKeys ${1:Keys}","detail":":: Keys -> Set Keysym","label":"getKeys"},{"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"*Defined in 'SDL.Raw'*\n* * *\n\n"},"insertText":"getKeyFromScancode","command":{"title":"extend import","command":"50595:ghcide-completions:extendImport","arguments":[{"importQual":null,"importName":"SDL.Raw","doc":"file://****/paddle/Paddle1.hs","newThing":"getKeyFromScancode","thingParent":null}]},"label":"getKeyFromScancode"},{"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"*Defined in 'SDL.Raw.Event'*\n* * *\n\n"},"insertText":"getKeyFromScancode","command":{"title":"extend import","command":"50595:ghcide-completions:extendImport","arguments":[{"importQual":null,"importName":"SDL.Raw.Event","doc":"file://****/paddle/Paddle1.hs","newThing":"getKeyFromScancode","thingParent":null}]},"label":"getKeyFromScancode"},{"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"*Defined in 'SDL.Raw.Event'*\n* * *\n\n"},"insertText":"getKeyboardFocus","command":{"title":"extend import","command":"50595:ghcide-completions:extendImport","arguments":[{"importQual":null,"importName":"SDL.Raw.Event","doc":"file://****/paddle/Paddle1.hs","newThing":"getKeyboardFocus","thingParent":null}]},"label":"getKeyboardFocus"},{"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"*Defined in 'SDL.Raw'*\n* * *\n\n"},"insertText":"getKeyboardFocus","command":{"title":"extend import","command":"50595:ghcide-completions:extendImport","arguments":[{"importQual":null,"importName":"SDL.Raw","doc":"file://****/paddle/Paddle1.hs","newThing":"getKeyboardFocus","thingParent":null}]},"label":"getKeyboardFocus"},{"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"*Defined in 'SDL.Input.Keyboard'*\n* * *\n\n"},"insertText":"getKeyboardState","command":{"title":"extend import","command":"50595:ghcide-completions:extendImport","arguments":[{"importQual":null,"importName":"SDL.Input.Keyboard","doc":"file://****/paddle/Paddle1.hs","newThing":"getKeyboardState","thingParent":null}]},"label":"getKeyboardState"},{"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"*Defined in 'SDL.Raw'*\n* * *\n\n"},"insertText":"getKeyboardState","command":{"title":"extend import","command":"50595:ghcide-completions:extendImport","arguments":[{"importQual":null,"importName":"SDL.Raw","doc":"file://****/paddle/Paddle1.hs","newThing":"getKeyboardState","thingParent":null}]},"label":"getKeyboardState"},{"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"*Defined in 'SDL.Input'*\n* * *\n\n"},"insertText":"getKeyboardState","command":{"title":"extend import","command":"50595:ghcide-completions:extendImport","arguments":[{"importQual":null,"importName":"SDL.Input","doc":"file://****/paddle/Paddle1.hs","newThing":"getKeyboardState","thingParent":null}]},"label":"getKeyboardState"},{"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"*Defined in 'SDL.Raw.Event'*\n* * *\n\n"},"insertText":"getKeyboardState","command":{"title":"extend import","command":"50595:ghcide-completions:extendImport","arguments":[{"importQual":null,"importName":"SDL.Raw.Event","doc":"file://****/paddle/Paddle1.hs","newThing":"getKeyboardState","thingParent":null}]},"label":"getKeyboardState"},{"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"*Defined in 'SDL'*\n* * *\n\n"},"insertText":"getKeyboardState","command":{"title":"extend import","command":"50595:ghcide-completions:extendImport","arguments":[{"importQual":null,"importName":"SDL","doc":"file://****/paddle/Paddle1.hs","newThing":"getKeyboardState","thingParent":null}]},"label":"getKeyboardState"},{"insertTextFormat":2,"kind":3,"documentation":{"kind":"markdown","value":"*Defined in 'Common'*\n* * *\n\n"},"insertText":"getPressedKeys ${1:KeyPressState}","detail":":: KeyPressState -> Set Keysym","label":"getPressedKeys"}],"isIncomplete":true},"id":"{2a2cbd5c-1b23-4e55-a64b-857b3c971c83}","jsonrpc":"2.0"}
Qt Creator
- messes up the order, putting "getKeys" at the bottom
- removes "getKeyFromScancode"
I understand that it is nice that Qt Creator improves completion for servers that don't return a sensible list themselves, but it should at least optionally possible to just pass through the result in cases where the server does a good job (and possibly better than Qt Creator )
In this specific case "getKeys" should be the preferred completion result even when Qt Creator fiddles with the results.
Attachments
For Gerrit Dashboard: QTCREATORBUG-26114 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
367096,3 | LSP: Do not sort completion items if none sets sortText | 5.0 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |