sublimelsp / LSP-rust-analyzer

Convenience package for rust-analyzer
MIT License
69 stars 11 forks source link

error code is given whenever lsp imports an item that can be filled #94

Closed LollipopFt closed 1 year ago

LollipopFt commented 1 year ago

example: when pressing Tab or Enter to autocomplete winit::dpi::LogicalSize<> image after pressing 'OK', cursor jumps to the correct position: image so i have no idea why this error is shown. this error appears for anything that has to be filled up: image function in question is 4th line from the top, .build(window_target)

rchl commented 1 year ago

93 fixes this issue

evenyag commented 1 year ago

rust-analyzer adds the command rust-analyzer.triggerParameterHints in https://github.com/rust-lang/rust-analyzer/pull/14147

Seems it will then execute the editor.action.triggerParameterHints command in vscode.

This is how LSP handles editor.action.triggerParameterHints https://github.com/sublimelsp/LSP/blob/0d149265408824b73184709619af4497d9044650/plugin/execute_command.py#L26-L33

I copy them to plugin.py and it works. But ignoring the command and returning True like #93 also fixes this. The signature help still pops up.

rchl commented 1 year ago

Yeah, I suppose there are some client-specific differences in when the signature help is triggered. So it looks like we might actually need to explicitly trigger that command.

But the behavior might differ based on in which context completion is invoked so in theory there could still be cases where explicitly triggering the command would be necessary. But in that case we could fix that later.

predragnikolic commented 1 year ago

Fixed in this PR

And I made a new release that should include the fix -> https://github.com/sublimelsp/LSP-rust-analyzer/releases/tag/v1.4.0