-
-
Notifications
You must be signed in to change notification settings - Fork 896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update support for rust-analyzer's inlay hints #3404
Changes from 1 commit
034553a
a4470c1
360ced5
7e80dea
f95fb23
44d1f3e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -397,9 +397,9 @@ See `-let' for a description of the destructuring mechanism." | |
|
||
(lsp-interface (rls:Cmd (:args :binary :env :cwd) nil)) | ||
|
||
(defconst lsp/rust-analyzer-inlay-hint-kind-type-hint "TypeHint") | ||
(defconst lsp/rust-analyzer-inlay-hint-kind-param-hint "ParameterHint") | ||
(defconst lsp/rust-analyzer-inlay-hint-kind-chaining-hint "ChainingHint") | ||
(defconst lsp/rust-analyzer-inlay-hint-kind-type-hint 1) | ||
(defconst lsp/rust-analyzer-inlay-hint-kind-param-hint 2) | ||
(defconst lsp/rust-analyzer-inlay-hint-kind-chaining-hint nil) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, so not a bug but an extension to the draft spec. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in rust-lang/rust-analyzer#11720 |
||
(lsp-interface (rust-analyzer:AnalyzerStatusParams (:textDocument)) | ||
(rust-analyzer:SyntaxTreeParams (:textDocument) (:range)) | ||
(rust-analyzer:ExpandMacroParams (:textDocument :position) nil) | ||
|
@@ -415,7 +415,7 @@ See `-let' for a description of the destructuring mechanism." | |
(rust-analyzer:RunnableArgs (:cargoArgs :executableArgs) (:workspaceRoot)) | ||
(rust-analyzer:RelatedTestsParams (:textDocument :position) nil) | ||
(rust-analyzer:RelatedTests (:runnable) nil) | ||
(rust-analyzer:InlayHint (:range :label :kind) nil) | ||
(rust-analyzer:InlayHint (:position :label :kind) nil) | ||
(rust-analyzer:InlayHintsParams (:textDocument) nil) | ||
(rust-analyzer:SsrParams (:query :parseOnly) nil) | ||
(rust-analyzer:CommandLink (:title :command) (:arguments :tooltip)) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not actually sure what that second parameter should be;
pos
doesn't work, but the position we get doesn't really have an end per se.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My guess would be that
pos
doesn't work because we setevaporate
, which makes Emacs remove the hints when they have length 0. I don't know if that's necessary, since we also remove the overlays manually when we update them. Maybe @yyoncho knows more here