question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Virtual text diagnostics is missing

See original GitHub issue

Plz have a look at the screenshot below, left-side is the source code without showing the virtual text diagnostics, on the right side is cargo watch result:

screenshot

Here is the result of :CocCommand rust-analyzer.serverVersion:

coc-rust-analzyer-server-version-result

Here is the result of :CocUpdate:

coc-update-result

Here is my :CocConfig:

{
    // make the completion automatically select the first completed item
    "suggest.noselect": false,

    // Hide the indicator as it looks weird
    "suggest.snippetIndicator": " ",

    // Not trigger completion on `string` and `comment`, but don't know why it doesn't work :(
    "coc.source.around.disableSyntaxes": [
        "string",
        "comment"
    ],

    // Auto update checking
    "coc.preferences.extensionUpdateCheck": "weekly",

    // Diagnostic settings
    "diagnostic.enable": true,                                
    "diagnostic.virtualText": true,                                
    "diagnostic.virtualTextCurrentLineOnly": false,                
    "diagnostic.checkCurrentLine": true,                           
    "diagnostic.messageTarget": "float",  

    // ----------------------------------------------------------------------------------------
    // `coc-rust-analyzer` related
    // ----------------------------------------------------------------------------------------
    "rust-analyzer.enable": true,
    "rust-analyzer.server.path": "/home/wison/my-shell/rust-analyzer",
    "rust-analyzer.updates.prompt": true,
    "rust-analyzer.diagnostics.enable": true,
    "rust-analyzer.cargo.loadOutDirsFromCheck": false,
    "rust-analyzer.inlayHints.enable": true,                    // Enable to show type hint on the right side
    "rust-analyzer.inlayHints.typeHints": true,                 // Enable to show variable type hint
    "rust-analyzer.inlayHints.typeHintsSeparator": ">> ",       // Variable type prefix symbol
    "rust-analyzer.inlayHints.chainingHints": true,             // Enable to show method chain type hint
    "rust-analyzer.inlayHints.chainingHintsSeparator": ">> ",   // Method chain type prefix symbol
    "rust-analyzer.procMacro.enable": false,
    "rust-analyzer.checkOnSave.enable": false,
    "rust-analyzer.checkOnSave.allTargets": true,
    "rust-analyzer.callInfo.full": true,                        // Show function name and docs in parameter hints
    "rust-analyzer.hoverActions.linksInHover": false,           // Show document links in hover
    "rust-analyzer.completion.addCallParenthesis": true,
    "rust-analyzer.completion.addCallArgumentSnippets": true,
    "rust-analyzer.completion.postfix.enable": true,

    // ----------------------------------------------------------------------------------------
    // `coc-tsserver` related
    // ----------------------------------------------------------------------------------------
    "typescript.format.enabled": true,
    "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
    "javascript.format.enabled": true,
    "javascript.suggestionActions.enabled": false
}

And the funny thing is that it can show mismatched-arg-count error…and seems only can show this kind of the error:

mismatched-arg-count-error

coc-rust-analyzer and rust-analyzer both are the latest version, and it works before, totally have no idea what’s happening.

Also, the diagnostics error can show for another language like TypeScript etc, only doesn’t work on Rust

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
fannheywardcommented, Feb 22, 2021

Caused by "rust-analyzer.checkOnSave.enable": false.

0reactions
fannheywardcommented, Feb 24, 2021

rust-analyzer.enableCargoWatchOnStartup

This is a very old configuration https://github.com/rust-analyzer/rust-analyzer/pull/2668/files#diff-00784dde03b1be151004f435a4ca74754cb674a9e789840e12760d8f3ac1728fL201

Any idea or suggestion that can get around that block & wait

Have no idea about this, maybe you can ask rust-analyzer team, coc-rust-analyzer does same as vscode-rust-analyzer.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Signs and virtual texts for diagnostics are not shown #19403
Signs and virtual texts for diagnostics are not shown #19403 ... The signs and virtual texts should be shown. ... The issue is...
Read more >
LSP Diagnostics Virtual Text Priority : r/neovim - Reddit
Hi, I was wondering if anyone knows a way to sort the diagnostics order for virtual text. For example, in the image below,...
Read more >
Diagnostic - Neovim docs
Nvim provides a framework for displaying errors or warnings from external tools, otherwise known as "diagnostics". These diagnostics can come from a variety ......
Read more >
Diagnostic 49426 - "The ERO's EFIN is missing or invalid," in ...
Full Diagnostic Text: "Electronic Filing. The ERO's EFIN is missing or invalid. Please verify the EFIN entered in Office Manager or Electronic Filing ......
Read more >
UltraTax CS: Cannot view Diagnostics window
Virtual Office CS: If you have multiple monitors and are having trouble seeing your diagnostics window when only using one monitor to display...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found