Skip to content

Goto definition - all shown twice #6414

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

Closed
neilyoung opened this issue Oct 30, 2020 · 22 comments
Closed

Goto definition - all shown twice #6414

neilyoung opened this issue Oct 30, 2020 · 22 comments
Labels
S-unactionable Issue requires feedback, design decisions or is blocked on other work

Comments

@neilyoung
Copy link

Let me say first: I love your rust-analyzer (even though it causes pretty heavy load to my old MBP).

I have a question regarding "CMD_CLICK" to a symbol, which is AFAIK "show references".

If your plugin is disabled, this is shown while hovering over a symbol...

image

...and once I CMD_CLICK on the symbol the appropriate source file is opened and the cursor is positioned to the place where the symbol is defined.

Now, with your extension installed, the display changes a bit (it is annotated):

image

...and CMD_CLICK opens a popup-window, showing twice the same reference:

image

I suspect, this is because the symbol is shown twice in the hovering information. It is not such a big thing, but a bit annoying, if you just expect one place to be shown.

Regards

@flodiebold
Copy link
Member

@neilyoung do you have another Rust extension enabled? Please disable the vscode-rust extension when using rust-analyzer.

@flodiebold flodiebold added the S-unactionable Issue requires feedback, design decisions or is blocked on other work label Dec 21, 2020
@lnicola
Copy link
Member

lnicola commented Dec 21, 2020

I can't reproduce this, but it might also be caused by the #[derive] attribute.

@neilyoung
Copy link
Author

Hmm. I was now away from Rust for four weeks. The November edition of VSCode now complained about "5 crashes in a row with rust-analyzer". I deinstalled and installed again. Doesn't work anymore...

Failed to deserialize InitializeParams: invalid type: integer `1`, expected a boolean; {"capabilities":{"experimental":{"codeActionGroup":true,"hoverActions":true,"snippetTextEdit":true,"statusNotification":true},"general":{"markdown":{"parser":"marked","version":"1.1.0"},"regularExpressions":{"engine":"ECMAScript","version":"ES2020"}},"textDocument":{"callHierarchy":{"dynamicRegistration":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dataSupport":true,"disabledSupport":true,"dynamicRegistration":true,"honorsChangeAnnotations":false,"isPreferredSupport":true,"resolveSupport":{"properties":["edit"]}},"codeLens":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"completion":{"completionItem":{"commitCharactersSupport":true,"deprecatedSupport":true,"documentationFormat":["markdown","plaintext"],"insertReplaceSupport":true,"insertTextModeSupport":{"valueSet":[1,2]},"preselectSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"snippetSupport":true,"tagSupport":{"valueSet":[1]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]},"contextSupport":true,"dynamicRegistration":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"documentHighlight":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"documentSymbol":{"dynamicRegistration":true,"hierarchicalDocumentSymbolSupport":true,"labelSupport":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"foldingRange":{"dynamicRegistration":true,"lineFoldingOnly":true,"rangeLimit":5000},"formatting":{"dynamicRegistration":true},"hover":{"contentFormat":["markdown","plaintext"],"dynamicRegistration":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"linkedEditingRange":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"publishDiagnostics":{"codeDescriptionSupport":true,"dataSupport":true,"relatedInformation":true,"tagSupport":{"valueSet":[1,2]},"versionSupport":false},"rangeFormatting":{"dynamicRegistration":true},"references":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"honorsChangeAnnotations":true,"prepareSupport":true,"prepareSupportDefaultBehavior":1},"selectionRange":{"dynamicRegistration":true},"semanticTokens":{"dynamicRegistration":true,"formats":["relative"],"multilineTokenSupport":false,"overlappingTokenSupport":false,"requests":{"full":{"delta":true},"range":true},"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator"]},"signatureHelp":{"contextSupport":true,"dynamicRegistration":true,"signatureInformation":{"activeParameterSupport":true,"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}}},"synchronization":{"didSave":true,"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true}},"window":{"showDocument":{"support":true},"showMessage":{"messageActionItem":{"additionalPropertiesSupport":true}},"workDoneProgress":true},"workspace":{"applyEdit":true,"codeLens":{"refreshSupport":true},"configuration":true,"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"executeCommand":{"dynamicRegistration":true},"fileOperations":{"didCreate":true,"didDelete":true,"didRename":true,"dynamicRegistration":true,"willCreate":true,"willDelete":true,"willRename":true},"semanticTokens":{"refreshSupport":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"workspaceEdit":{"changeAnnotationSupport":{"groupsOnLabel":true},"documentChanges":true,"failureHandling":"textOnlyTransactional","normalizesLineEndings":true,"resourceOperations":["create","rename","delete"]},"workspaceFolders":true}},"clientInfo":{"name":"Visual Studio Code","version":"1.52.1"},"initializationOptions":{"assist":{"importMergeBehaviour":"full","importPrefix":"plain"},"callInfo":{"full":true},"cargo":{"allFeatures":false,"autoreload":true,"features":[],"loadOutDirsFromCheck":false,"noDefaultFeatures":false,"noSysroot":false,"target":null},"cargoRunner":null,"checkOnSave":{"allFeatures":null,"allTargets":true,"command":"check","enable":true,"extraArgs":[],"features":null,"noDefaultFeatures":null,"overrideCommand":null,"target":null},"completion":{"addCallArgumentSnippets":true,"addCallParenthesis":true,"autoimport":{"enable":true},"postfix":{"enable":true}},"debug":{"engine":"auto","engineSettings":{},"openDebugPane":false,"sourceFileMap":{"/rustc/<id>":"${env:USERPROFILE}/.rustup/toolchains/<toolchain-id>/lib/rustlib/src/rust"}},"diagnostics":{"disabled":[],"enable":true,"enableExperimental":true,"warningsAsHint":[],"warningsAsInfo":[]},"files":{"watcher":"client"},"hoverActions":{"debug":true,"enable":true,"gotoTypeDef":true,"implementations":true,"linksInHover":true,"run":true},"inlayHints":{"chainingHints":true,"enable":true,"maxLength":null,"parameterHints":true,"typeHints":true},"lens":{"debug":true,"enable":true,"implementations":true,"methodReferences":false,"run":true},"linkedProjects":[],"lruCapacity":null,"notifications":{"cargoTomlNotFound":true},"procMacro":{"enable":false},"runnableEnv":null,"runnables":{"cargoExtraArgs":[],"overrideCargo":null},"rustcSource":null,"rustfmt":{"extraArgs":[],"overrideCommand":null},"serverPath":"/Users/decades/Documents/Rust/rust-analyzer/target/release/rust-analyzer","trace":{"extension":false,"server":"off"},"updates":{"askBeforeDownload":true,"channel":"stable"}},"locale":"en-us","processId":28382,"rootPath":"/Users/decades/Documents/dragonfly2rust","rootUri":"file:///Users/decades/Documents/dragonfly2rust","trace":"off","workspaceFolders":[{"name":"dragonfly2rust","uri":"file:///Users/decades/Documents/dragonfly2rust"}]}
[Info  - 17:30:44] Connection to server got closed. Server will restart.
Failed to deserialize InitializeParams: invalid type: integer `1`, expected a boolean; {"capabilities":{"experimental":{"codeActionGroup":true,"hoverActions":true,"snippetTextEdit":true,"statusNotification":true},"general":{"markdown":{"parser":"marked","version":"1.1.0"},"regularExpressions":{"engine":"ECMAScript","version":"ES2020"}},"textDocument":{"callHierarchy":{"dynamicRegistration":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dataSupport":true,"disabledSupport":true,"dynamicRegistration":true,"honorsChangeAnnotations":false,"isPreferredSupport":true,"resolveSupport":{"properties":["edit"]}},"codeLens":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"completion":{"completionItem":{"commitCharactersSupport":true,"deprecatedSupport":true,"documentationFormat":["markdown","plaintext"],"insertReplaceSupport":true,"insertTextModeSupport":{"valueSet":[1,2]},"preselectSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"snippetSupport":true,"tagSupport":{"valueSet":[1]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]},"contextSupport":true,"dynamicRegistration":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"documentHighlight":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"documentSymbol":{"dynamicRegistration":true,"hierarchicalDocumentSymbolSupport":true,"labelSupport":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"foldingRange":{"dynamicRegistration":true,"lineFoldingOnly":true,"rangeLimit":5000},"formatting":{"dynamicRegistration":true},"hover":{"contentFormat":["markdown","plaintext"],"dynamicRegistration":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"linkedEditingRange":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"publishDiagnostics":{"codeDescriptionSupport":true,"dataSupport":true,"relatedInformation":true,"tagSupport":{"valueSet":[1,2]},"versionSupport":false},"rangeFormatting":{"dynamicRegistration":true},"references":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"honorsChangeAnnotations":true,"prepareSupport":true,"prepareSupportDefaultBehavior":1},"selectionRange":{"dynamicRegistration":true},"semanticTokens":{"dynamicRegistration":true,"formats":["relative"],"multilineTokenSupport":false,"overlappingTokenSupport":false,"requests":{"full":{"delta":true},"range":true},"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator"]},"signatureHelp":{"contextSupport":true,"dynamicRegistration":true,"signatureInformation":{"activeParameterSupport":true,"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}}},"synchronization":{"didSave":true,"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true}},"window":{"showDocument":{"support":true},"showMessage":{"messageActionItem":{"additionalPropertiesSupport":true}},"workDoneProgress":true},"workspace":{"applyEdit":true,"codeLens":{"refreshSupport":true},"configuration":true,"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"executeCommand":{"dynamicRegistration":true},"fileOperations":{"didCreate":true,"didDelete":true,"didRename":true,"dynamicRegistration":true,"willCreate":true,"willDelete":true,"willRename":true},"semanticTokens":{"refreshSupport":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"workspaceEdit":{"changeAnnotationSupport":{"groupsOnLabel":true},"documentChanges":true,"failureHandling":"textOnlyTransactional","normalizesLineEndings":true,"resourceOperations":["create","rename","delete"]},"workspaceFolders":true}},"clientInfo":{"name":"Visual Studio Code","version":"1.52.1"},"initializationOptions":{"assist":{"importMergeBehaviour":"full","importPrefix":"plain"},"callInfo":{"full":true},"cargo":{"allFeatures":false,"autoreload":true,"features":[],"loadOutDirsFromCheck":false,"noDefaultFeatures":false,"noSysroot":false,"target":null},"cargoRunner":null,"checkOnSave":{"allFeatures":null,"allTargets":true,"command":"check","enable":true,"extraArgs":[],"features":null,"noDefaultFeatures":null,"overrideCommand":null,"target":null},"completion":{"addCallArgumentSnippets":true,"addCallParenthesis":true,"autoimport":{"enable":true},"postfix":{"enable":true}},"debug":{"engine":"auto","engineSettings":{},"openDebugPane":false,"sourceFileMap":{"/rustc/<id>":"${env:USERPROFILE}/.rustup/toolchains/<toolchain-id>/lib/rustlib/src/rust"}},"diagnostics":{"disabled":[],"enable":true,"enableExperimental":true,"warningsAsHint":[],"warningsAsInfo":[]},"files":{"watcher":"client"},"hoverActions":{"debug":true,"enable":true,"gotoTypeDef":true,"implementations":true,"linksInHover":true,"run":true},"inlayHints":{"chainingHints":true,"enable":true,"maxLength":null,"parameterHints":true,"typeHints":true},"lens":{"debug":true,"enable":true,"implementations":true,"methodReferences":false,"run":true},"linkedProjects":[],"lruCapacity":null,"notifications":{"cargoTomlNotFound":true},"procMacro":{"enable":false},"runnableEnv":null,"runnables":{"cargoExtraArgs":[],"overrideCargo":null},"rustcSource":null,"rustfmt":{"extraArgs":[],"overrideCommand":null},"serverPath":"/Users/decades/Documents/Rust/rust-analyzer/target/release/rust-analyzer","trace":{"extension":false,"server":"off"},"updates":{"askBeforeDownload":true,"channel":"stable"}},"locale":"en-us","processId":28382,"rootPath":"/Users/decades/Documents/dragonfly2rust","rootUri":"file:///Users/decades/Documents/dragonfly2rust","trace":"off","workspaceFolders":[{"name":"dragonfly2rust","uri":"file:///Users/decades/Documents/dragonfly2rust"}]}
[Info  - 17:30:44] Connection to server got closed. Server will restart.
Failed to deserialize InitializeParams: invalid type: integer `1`, expected a boolean; {"capabilities":{"experimental":{"codeActionGroup":true,"hoverActions":true,"snippetTextEdit":true,"statusNotification":true},"general":{"markdown":{"parser":"marked","version":"1.1.0"},"regularExpressions":{"engine":"ECMAScript","version":"ES2020"}},"textDocument":{"callHierarchy":{"dynamicRegistration":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dataSupport":true,"disabledSupport":true,"dynamicRegistration":true,"honorsChangeAnnotations":false,"isPreferredSupport":true,"resolveSupport":{"properties":["edit"]}},"codeLens":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"completion":{"completionItem":{"commitCharactersSupport":true,"deprecatedSupport":true,"documentationFormat":["markdown","plaintext"],"insertReplaceSupport":true,"insertTextModeSupport":{"valueSet":[1,2]},"preselectSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"snippetSupport":true,"tagSupport":{"valueSet":[1]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]},"contextSupport":true,"dynamicRegistration":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"documentHighlight":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"documentSymbol":{"dynamicRegistration":true,"hierarchicalDocumentSymbolSupport":true,"labelSupport":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"foldingRange":{"dynamicRegistration":true,"lineFoldingOnly":true,"rangeLimit":5000},"formatting":{"dynamicRegistration":true},"hover":{"contentFormat":["markdown","plaintext"],"dynamicRegistration":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"linkedEditingRange":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"publishDiagnostics":{"codeDescriptionSupport":true,"dataSupport":true,"relatedInformation":true,"tagSupport":{"valueSet":[1,2]},"versionSupport":false},"rangeFormatting":{"dynamicRegistration":true},"references":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"honorsChangeAnnotations":true,"prepareSupport":true,"prepareSupportDefaultBehavior":1},"selectionRange":{"dynamicRegistration":true},"semanticTokens":{"dynamicRegistration":true,"formats":["relative"],"multilineTokenSupport":false,"overlappingTokenSupport":false,"requests":{"full":{"delta":true},"range":true},"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator"]},"signatureHelp":{"contextSupport":true,"dynamicRegistration":true,"signatureInformation":{"activeParameterSupport":true,"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}}},"synchronization":{"didSave":true,"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true}},"window":{"showDocument":{"support":true},"showMessage":{"messageActionItem":{"additionalPropertiesSupport":true}},"workDoneProgress":true},"workspace":{"applyEdit":true,"codeLens":{"refreshSupport":true},"configuration":true,"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"executeCommand":{"dynamicRegistration":true},"fileOperations":{"didCreate":true,"didDelete":true,"didRename":true,"dynamicRegistration":true,"willCreate":true,"willDelete":true,"willRename":true},"semanticTokens":{"refreshSupport":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"workspaceEdit":{"changeAnnotationSupport":{"groupsOnLabel":true},"documentChanges":true,"failureHandling":"textOnlyTransactional","normalizesLineEndings":true,"resourceOperations":["create","rename","delete"]},"workspaceFolders":true}},"clientInfo":{"name":"Visual Studio Code","version":"1.52.1"},"initializationOptions":{"assist":{"importMergeBehaviour":"full","importPrefix":"plain"},"callInfo":{"full":true},"cargo":{"allFeatures":false,"autoreload":true,"features":[],"loadOutDirsFromCheck":false,"noDefaultFeatures":false,"noSysroot":false,"target":null},"cargoRunner":null,"checkOnSave":{"allFeatures":null,"allTargets":true,"command":"check","enable":true,"extraArgs":[],"features":null,"noDefaultFeatures":null,"overrideCommand":null,"target":null},"completion":{"addCallArgumentSnippets":true,"addCallParenthesis":true,"autoimport":{"enable":true},"postfix":{"enable":true}},"debug":{"engine":"auto","engineSettings":{},"openDebugPane":false,"sourceFileMap":{"/rustc/<id>":"${env:USERPROFILE}/.rustup/toolchains/<toolchain-id>/lib/rustlib/src/rust"}},"diagnostics":{"disabled":[],"enable":true,"enableExperimental":true,"warningsAsHint":[],"warningsAsInfo":[]},"files":{"watcher":"client"},"hoverActions":{"debug":true,"enable":true,"gotoTypeDef":true,"implementations":true,"linksInHover":true,"run":true},"inlayHints":{"chainingHints":true,"enable":true,"maxLength":null,"parameterHints":true,"typeHints":true},"lens":{"debug":true,"enable":true,"implementations":true,"methodReferences":false,"run":true},"linkedProjects":[],"lruCapacity":null,"notifications":{"cargoTomlNotFound":true},"procMacro":{"enable":false},"runnableEnv":null,"runnables":{"cargoExtraArgs":[],"overrideCargo":null},"rustcSource":null,"rustfmt":{"extraArgs":[],"overrideCommand":null},"serverPath":"/Users/decades/Documents/Rust/rust-analyzer/target/release/rust-analyzer","trace":{"extension":false,"server":"off"},"updates":{"askBeforeDownload":true,"channel":"stable"}},"locale":"en-us","processId":28382,"rootPath":"/Users/decades/Documents/dragonfly2rust","rootUri":"file:///Users/decades/Documents/dragonfly2rust","trace":"off","workspaceFolders":[{"name":"dragonfly2rust","uri":"file:///Users/decades/Documents/dragonfly2rust"}]}
[Info  - 17:30:44] Connection to server got closed. Server will restart.
Failed to deserialize InitializeParams: invalid type: integer `1`, expected a boolean; {"capabilities":{"experimental":{"codeActionGroup":true,"hoverActions":true,"snippetTextEdit":true,"statusNotification":true},"general":{"markdown":{"parser":"marked","version":"1.1.0"},"regularExpressions":{"engine":"ECMAScript","version":"ES2020"}},"textDocument":{"callHierarchy":{"dynamicRegistration":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dataSupport":true,"disabledSupport":true,"dynamicRegistration":true,"honorsChangeAnnotations":false,"isPreferredSupport":true,"resolveSupport":{"properties":["edit"]}},"codeLens":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"completion":{"completionItem":{"commitCharactersSupport":true,"deprecatedSupport":true,"documentationFormat":["markdown","plaintext"],"insertReplaceSupport":true,"insertTextModeSupport":{"valueSet":[1,2]},"preselectSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"snippetSupport":true,"tagSupport":{"valueSet":[1]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]},"contextSupport":true,"dynamicRegistration":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"documentHighlight":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"documentSymbol":{"dynamicRegistration":true,"hierarchicalDocumentSymbolSupport":true,"labelSupport":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"foldingRange":{"dynamicRegistration":true,"lineFoldingOnly":true,"rangeLimit":5000},"formatting":{"dynamicRegistration":true},"hover":{"contentFormat":["markdown","plaintext"],"dynamicRegistration":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"linkedEditingRange":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"publishDiagnostics":{"codeDescriptionSupport":true,"dataSupport":true,"relatedInformation":true,"tagSupport":{"valueSet":[1,2]},"versionSupport":false},"rangeFormatting":{"dynamicRegistration":true},"references":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"honorsChangeAnnotations":true,"prepareSupport":true,"prepareSupportDefaultBehavior":1},"selectionRange":{"dynamicRegistration":true},"semanticTokens":{"dynamicRegistration":true,"formats":["relative"],"multilineTokenSupport":false,"overlappingTokenSupport":false,"requests":{"full":{"delta":true},"range":true},"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator"]},"signatureHelp":{"contextSupport":true,"dynamicRegistration":true,"signatureInformation":{"activeParameterSupport":true,"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}}},"synchronization":{"didSave":true,"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true}},"window":{"showDocument":{"support":true},"showMessage":{"messageActionItem":{"additionalPropertiesSupport":true}},"workDoneProgress":true},"workspace":{"applyEdit":true,"codeLens":{"refreshSupport":true},"configuration":true,"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"executeCommand":{"dynamicRegistration":true},"fileOperations":{"didCreate":true,"didDelete":true,"didRename":true,"dynamicRegistration":true,"willCreate":true,"willDelete":true,"willRename":true},"semanticTokens":{"refreshSupport":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"workspaceEdit":{"changeAnnotationSupport":{"groupsOnLabel":true},"documentChanges":true,"failureHandling":"textOnlyTransactional","normalizesLineEndings":true,"resourceOperations":["create","rename","delete"]},"workspaceFolders":true}},"clientInfo":{"name":"Visual Studio Code","version":"1.52.1"},"initializationOptions":{"assist":{"importMergeBehaviour":"full","importPrefix":"plain"},"callInfo":{"full":true},"cargo":{"allFeatures":false,"autoreload":true,"features":[],"loadOutDirsFromCheck":false,"noDefaultFeatures":false,"noSysroot":false,"target":null},"cargoRunner":null,"checkOnSave":{"allFeatures":null,"allTargets":true,"command":"check","enable":true,"extraArgs":[],"features":null,"noDefaultFeatures":null,"overrideCommand":null,"target":null},"completion":{"addCallArgumentSnippets":true,"addCallParenthesis":true,"autoimport":{"enable":true},"postfix":{"enable":true}},"debug":{"engine":"auto","engineSettings":{},"openDebugPane":false,"sourceFileMap":{"/rustc/<id>":"${env:USERPROFILE}/.rustup/toolchains/<toolchain-id>/lib/rustlib/src/rust"}},"diagnostics":{"disabled":[],"enable":true,"enableExperimental":true,"warningsAsHint":[],"warningsAsInfo":[]},"files":{"watcher":"client"},"hoverActions":{"debug":true,"enable":true,"gotoTypeDef":true,"implementations":true,"linksInHover":true,"run":true},"inlayHints":{"chainingHints":true,"enable":true,"maxLength":null,"parameterHints":true,"typeHints":true},"lens":{"debug":true,"enable":true,"implementations":true,"methodReferences":false,"run":true},"linkedProjects":[],"lruCapacity":null,"notifications":{"cargoTomlNotFound":true},"procMacro":{"enable":false},"runnableEnv":null,"runnables":{"cargoExtraArgs":[],"overrideCargo":null},"rustcSource":null,"rustfmt":{"extraArgs":[],"overrideCommand":null},"serverPath":"/Users/decades/Documents/Rust/rust-analyzer/target/release/rust-analyzer","trace":{"extension":false,"server":"off"},"updates":{"askBeforeDownload":true,"channel":"stable"}},"locale":"en-us","processId":28382,"rootPath":"/Users/decades/Documents/dragonfly2rust","rootUri":"file:///Users/decades/Documents/dragonfly2rust","trace":"off","workspaceFolders":[{"name":"dragonfly2rust","uri":"file:///Users/decades/Documents/dragonfly2rust"}]}
[Info  - 17:30:44] Connection to server got closed. Server will restart.
Failed to deserialize InitializeParams: invalid type: integer `1`, expected a boolean; {"capabilities":{"experimental":{"codeActionGroup":true,"hoverActions":true,"snippetTextEdit":true,"statusNotification":true},"general":{"markdown":{"parser":"marked","version":"1.1.0"},"regularExpressions":{"engine":"ECMAScript","version":"ES2020"}},"textDocument":{"callHierarchy":{"dynamicRegistration":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dataSupport":true,"disabledSupport":true,"dynamicRegistration":true,"honorsChangeAnnotations":false,"isPreferredSupport":true,"resolveSupport":{"properties":["edit"]}},"codeLens":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"completion":{"completionItem":{"commitCharactersSupport":true,"deprecatedSupport":true,"documentationFormat":["markdown","plaintext"],"insertReplaceSupport":true,"insertTextModeSupport":{"valueSet":[1,2]},"preselectSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"snippetSupport":true,"tagSupport":{"valueSet":[1]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]},"contextSupport":true,"dynamicRegistration":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"documentHighlight":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"documentSymbol":{"dynamicRegistration":true,"hierarchicalDocumentSymbolSupport":true,"labelSupport":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"foldingRange":{"dynamicRegistration":true,"lineFoldingOnly":true,"rangeLimit":5000},"formatting":{"dynamicRegistration":true},"hover":{"contentFormat":["markdown","plaintext"],"dynamicRegistration":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"linkedEditingRange":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"publishDiagnostics":{"codeDescriptionSupport":true,"dataSupport":true,"relatedInformation":true,"tagSupport":{"valueSet":[1,2]},"versionSupport":false},"rangeFormatting":{"dynamicRegistration":true},"references":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"honorsChangeAnnotations":true,"prepareSupport":true,"prepareSupportDefaultBehavior":1},"selectionRange":{"dynamicRegistration":true},"semanticTokens":{"dynamicRegistration":true,"formats":["relative"],"multilineTokenSupport":false,"overlappingTokenSupport":false,"requests":{"full":{"delta":true},"range":true},"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator"]},"signatureHelp":{"contextSupport":true,"dynamicRegistration":true,"signatureInformation":{"activeParameterSupport":true,"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}}},"synchronization":{"didSave":true,"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true}},"window":{"showDocument":{"support":true},"showMessage":{"messageActionItem":{"additionalPropertiesSupport":true}},"workDoneProgress":true},"workspace":{"applyEdit":true,"codeLens":{"refreshSupport":true},"configuration":true,"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"executeCommand":{"dynamicRegistration":true},"fileOperations":{"didCreate":true,"didDelete":true,"didRename":true,"dynamicRegistration":true,"willCreate":true,"willDelete":true,"willRename":true},"semanticTokens":{"refreshSupport":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"workspaceEdit":{"changeAnnotationSupport":{"groupsOnLabel":true},"documentChanges":true,"failureHandling":"textOnlyTransactional","normalizesLineEndings":true,"resourceOperations":["create","rename","delete"]},"workspaceFolders":true}},"clientInfo":{"name":"Visual Studio Code","version":"1.52.1"},"initializationOptions":{"assist":{"importMergeBehaviour":"full","importPrefix":"plain"},"callInfo":{"full":true},"cargo":{"allFeatures":false,"autoreload":true,"features":[],"loadOutDirsFromCheck":false,"noDefaultFeatures":false,"noSysroot":false,"target":null},"cargoRunner":null,"checkOnSave":{"allFeatures":null,"allTargets":true,"command":"check","enable":true,"extraArgs":[],"features":null,"noDefaultFeatures":null,"overrideCommand":null,"target":null},"completion":{"addCallArgumentSnippets":true,"addCallParenthesis":true,"autoimport":{"enable":true},"postfix":{"enable":true}},"debug":{"engine":"auto","engineSettings":{},"openDebugPane":false,"sourceFileMap":{"/rustc/<id>":"${env:USERPROFILE}/.rustup/toolchains/<toolchain-id>/lib/rustlib/src/rust"}},"diagnostics":{"disabled":[],"enable":true,"enableExperimental":true,"warningsAsHint":[],"warningsAsInfo":[]},"files":{"watcher":"client"},"hoverActions":{"debug":true,"enable":true,"gotoTypeDef":true,"implementations":true,"linksInHover":true,"run":true},"inlayHints":{"chainingHints":true,"enable":true,"maxLength":null,"parameterHints":true,"typeHints":true},"lens":{"debug":true,"enable":true,"implementations":true,"methodReferences":false,"run":true},"linkedProjects":[],"lruCapacity":null,"notifications":{"cargoTomlNotFound":true},"procMacro":{"enable":false},"runnableEnv":null,"runnables":{"cargoExtraArgs":[],"overrideCargo":null},"rustcSource":null,"rustfmt":{"extraArgs":[],"overrideCommand":null},"serverPath":"/Users/decades/Documents/Rust/rust-analyzer/target/release/rust-analyzer","trace":{"extension":false,"server":"off"},"updates":{"askBeforeDownload":true,"channel":"stable"}},"locale":"en-us","processId":28382,"rootPath":"/Users/decades/Documents/dragonfly2rust","rootUri":"file:///Users/decades/Documents/dragonfly2rust","trace":"off","workspaceFolders":[{"name":"dragonfly2rust","uri":"file:///Users/decades/Documents/dragonfly2rust"}]}
[Error - 17:30:45] Connection to server got closed. Server will not be restarted.


@neilyoung
Copy link
Author

image

@lnicola
Copy link
Member

lnicola commented Dec 21, 2020

Yeah, you'll need 1.52 due to an incompatibility (#6979).

@neilyoung
Copy link
Author

Oh. Then I would rater wait for your fix. I never downgraded VSCode so far...

@lnicola
Copy link
Member

lnicola commented Dec 21, 2020

Oh, 1.52 is the November release (from December). Hmm..

@neilyoung
Copy link
Author

I'm having 1.52.1 on macOS

@lnicola
Copy link
Member

lnicola commented Dec 21, 2020

Which extension version are you using? The one released today?

@neilyoung
Copy link
Author

image

@neilyoung
Copy link
Author

0.2.424

@neilyoung
Copy link
Author

Is that the latest you are referring too?

@lnicola
Copy link
Member

lnicola commented Dec 21, 2020

Yes, it's the one from today. I'm not sure why you're getting that error.

@flodiebold
Copy link
Member

@neilyoung triage ping, does it work with the newest weekly release?

@neilyoung
Copy link
Author

@flodiebold Sorry, right now I can't even tell. If you mean the "Initial parameter" issue, then this was fixed as commented in #6983. For the initial issue posted here I'm trying to get an answer, but my VSCode surprised me with the message, that I have to install rust-analyzer-server. And this fails since two days now already (I recently upgraded to Big Sur, not sure if this matters).

@neilyoung
Copy link
Author

Right now it finished. It seems that my "double whopper" is also gone. :)

Can be closed

@neilyoung
Copy link
Author

Hmm... Wait. There is still a problem.

The SoftwareUpdateInfo is declared like so:

image

However, hovering over any mentioning of it tells me, that there are 3 implementations. What does this mean?

image

@neilyoung neilyoung reopened this Dec 29, 2020
@bjorn3
Copy link
Member

bjorn3 commented Dec 29, 2020

There are implementations of Default, Debug and Clone derived for that type. The Serialize and Deserialize derives couldn't be expanded. Likely because proc-macro support isn't enabled by you.

@neilyoung
Copy link
Author

Ah. Thanks. Can be closed. How could I enable "pro-macro" support?

@bjorn3
Copy link
Member

bjorn3 commented Dec 29, 2020

You can enable proc-macro support using

{
    "rust-analyzer.cargo.loadOutDirsFromCheck": true,
    "rust-analyzer.procMacro.enable": true,
}

@neilyoung
Copy link
Author

neilyoung commented Dec 29, 2020

Thanks!

EDIT: One observation: The latest version of RA is all the time indexing my project after each start. I never noticed that, at least not, if I didn't make any change to my Cargo.toml. Is that "normal"?

EDIT2: The settings above don't change my inability to follow the derivates.

@bjorn3
Copy link
Member

bjorn3 commented Dec 29, 2020

Yes, it is normal for it to start indexing every time it is started. No parts of the analysis are stored in between runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-unactionable Issue requires feedback, design decisions or is blocked on other work
Projects
None yet
Development

No branches or pull requests

4 participants