Skip to content

Impl displaying signature from LSP#1720

Merged
dzhou121 merged 1 commit intomasterfrom
signature
Nov 19, 2022
Merged

Impl displaying signature from LSP#1720
dzhou121 merged 1 commit intomasterfrom
signature

Conversation

@MinusGix
Copy link
Copy Markdown
Member

@MinusGix MinusGix commented Nov 19, 2022

  • Added an entry to CHANGELOG.md if this change could be valuable to users

This PR adds support for displaying the signature of a function when it is being called, by asking the language server for the information.
It binds this to Ctrl+Shift+Space, since that is a common binding for showing it when it is closed.

image

Notes:

  • I put the get_signature keybinding in both keymaps-macos.toml and keymaps-nonmacos.toml, but they are the same. I did that due to get_completion being defined in both, but is that really intended? Shouldn't it just be in keymaps-common.toml?
  • This doesn't yet implement switching between signatures (like in overloads), but I believe it should change the selection based on what LSP tells us; which covers many of the cases of using it. It would be good to support that eventually.

@MinusGix MinusGix added A-ui Area: UI rendering and interactions A-lsp Area: LSP, assists and code completion labels Nov 19, 2022
@MinusGix MinusGix marked this pull request as ready for review November 19, 2022 04:55
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Nov 19, 2022

Codecov Report

Merging #1720 (509007c) into master (e65d64b) will decrease coverage by 0.08%.
The diff coverage is 0.00%.

@@            Coverage Diff            @@
##           master   #1720      +/-   ##
=========================================
- Coverage    6.64%   6.56%   -0.09%     
=========================================
  Files         126     127       +1     
  Lines       53284   53944     +660     
=========================================
  Hits         3541    3541              
- Misses      49743   50403     +660     
Impacted Files Coverage Δ
lapce-core/src/command.rs 0.00% <ø> (ø)
lapce-data/src/command.rs 0.00% <ø> (ø)
lapce-data/src/config.rs 0.00% <ø> (ø)
lapce-data/src/data.rs 0.00% <0.00%> (ø)
lapce-data/src/editor.rs 0.00% <0.00%> (ø)
lapce-data/src/markdown/mod.rs 0.00% <0.00%> (ø)
lapce-data/src/proxy.rs 0.00% <0.00%> (ø)
lapce-data/src/signature.rs 0.00% <0.00%> (ø)
lapce-proxy/src/dispatch.rs 0.00% <0.00%> (ø)
lapce-proxy/src/plugin/lsp.rs 0.00% <0.00%> (ø)
... and 10 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@dzhou121 dzhou121 merged commit 6492ec2 into master Nov 19, 2022
@dzhou121 dzhou121 deleted the signature branch November 19, 2022 19:45
@panekj panekj added this to the Next release milestone Nov 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-lsp Area: LSP, assists and code completion A-ui Area: UI rendering and interactions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants