Reference codeLens action not working
See original GitHub issueI’m trying to use the build in command for editor.action.showReferences
and have it bound to a codeLens. But I can’t figure out, what I’m doing wrong.
[Trace - 12:51:43 AM] Received response 'codeLens/resolve - (25)' in 6ms.
Result: {
"range": {
"start": {
"line": 380,
"character": 8
},
"end": {
"line": 381,
"character": 50
}
},
"data": {
"codeLensType": "referenceCounter",
"references": [
{
"uri": "file:///home/razze/Development/elm-spa-example/src/Page/Article/Editor.elm",
"range": {
"start": {
"line": 380,
"character": 8
},
"end": {
"line": 380,
"character": 16
}
}
},
{
"uri": "file:///home/razze/Development/elm-spa-example/src/Page/Article/Editor.elm",
"range": {
"start": {
"line": 117,
"character": 30
},
"end": {
"line": 117,
"character": 38
}
}
},
{
"uri": "file:///home/razze/Development/elm-spa-example/src/Page/Article/Editor.elm",
"range": {
"start": {
"line": 152,
"character": 35
},
"end": {
"line": 152,
"character": 43
}
}
},
{
"uri": "file:///home/razze/Development/elm-spa-example/src/Page/Article/Editor.elm",
"range": {
"start": {
"line": 157,
"character": 35
},
"end": {
"line": 157,
"character": 43
}
}
},
{
"uri": "file:///home/razze/Development/elm-spa-example/src/Page/Article/Editor.elm",
"range": {
"start": {
"line": 350,
"character": 35
},
"end": {
"line": 350,
"character": 43
}
}
},
{
"uri": "file:///home/razze/Development/elm-spa-example/src/Page/Article/Editor.elm",
"range": {
"start": {
"line": 363,
"character": 33
},
"end": {
"line": 363,
"character": 41
}
}
},
{
"uri": "file:///home/razze/Development/elm-spa-example/src/Page/Article/Editor.elm",
"range": {
"start": {
"line": 385,
"character": 25
},
"end": {
"line": 385,
"character": 33
}
}
},
{
"uri": "file:///home/razze/Development/elm-spa-example/src/Page/Article/Editor.elm",
"range": {
"start": {
"line": 388,
"character": 23
},
"end": {
"line": 388,
"character": 31
}
}
},
{
"uri": "file:///home/razze/Development/elm-spa-example/src/Page/Article/Editor.elm",
"range": {
"start": {
"line": 479,
"character": 16
},
"end": {
"line": 479,
"character": 24
}
}
}
],
"uri": "file:///home/razze/Development/elm-spa-example/src/Page/Article/Editor.elm"
},
"command": {
"title": "9 references",
"command": "editor.action.showReferences",
"arguments": [
{
"$mid": 1,
"path": "/home/razze/Development/elm-spa-example/src/Page/Article/Editor.elm",
"scheme": "file"
},
{
"line": 380,
"character": 8
},
[
{
"uri": "file:///home/razze/Development/elm-spa-example/src/Page/Article/Editor.elm",
"range": {
"start": {
"line": 380,
"character": 8
},
"end": {
"line": 380,
"character": 16
}
}
},
{
"uri": "file:///home/razze/Development/elm-spa-example/src/Page/Article/Editor.elm",
"range": {
"start": {
"line": 117,
"character": 30
},
"end": {
"line": 117,
"character": 38
}
}
},
{
"uri": "file:///home/razze/Development/elm-spa-example/src/Page/Article/Editor.elm",
"range": {
"start": {
"line": 152,
"character": 35
},
"end": {
"line": 152,
"character": 43
}
}
},
{
"uri": "file:///home/razze/Development/elm-spa-example/src/Page/Article/Editor.elm",
"range": {
"start": {
"line": 157,
"character": 35
},
"end": {
"line": 157,
"character": 43
}
}
},
{
"uri": "file:///home/razze/Development/elm-spa-example/src/Page/Article/Editor.elm",
"range": {
"start": {
"line": 350,
"character": 35
},
"end": {
"line": 350,
"character": 43
}
}
},
{
"uri": "file:///home/razze/Development/elm-spa-example/src/Page/Article/Editor.elm",
"range": {
"start": {
"line": 363,
"character": 33
},
"end": {
"line": 363,
"character": 41
}
}
},
{
"uri": "file:///home/razze/Development/elm-spa-example/src/Page/Article/Editor.elm",
"range": {
"start": {
"line": 385,
"character": 25
},
"end": {
"line": 385,
"character": 33
}
}
},
{
"uri": "file:///home/razze/Development/elm-spa-example/src/Page/Article/Editor.elm",
"range": {
"start": {
"line": 388,
"character": 23
},
"end": {
"line": 388,
"character": 31
}
}
},
{
"uri": "file:///home/razze/Development/elm-spa-example/src/Page/Article/Editor.elm",
"range": {
"start": {
"line": 479,
"character": 16
},
"end": {
"line": 479,
"character": 24
}
}
}
]
]
}
}
This is the error that happens, when I click the code action.
https://github.com/microsoft/vscode-languageserver-node/issues/210
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (8 by maintainers)
Top Results From Across the Web
Codelens references not updating when making code ...
Codelens references are no longer updating as I change code within a different file. The only way to get them to update seems...
Read more >Codelens references not showing in Visual Studio ... - MSDN
Go to Tools -> Options... -> Text Editor -> All Languages -> CodeLens, uncheck and check this option; Close all programs and clean...
Read more >CodeLens not showing references - visual studio
Go to Tools -> Options -> Text Editor -> All Languages -> CodeLens then click the "Enable CodeLens" option if it is not...
Read more >Code Lens - PHP Tools for Visual Studio Documentation
This feature can be disabled/enabled in user-scope setting php.codeLens.enabled . References & Implementations. Every PHP declaration is decorated with ...
Read more >Language Server Protocol Specification - 3.17
Client Initiated Progress. Consider a client sending a textDocument/reference request to a server and the client accepts work done progress reporting on that ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, this is pretty OK workaround… but I kinda believe this behaviour should be fixed here in
vscode-languageclient
. Number-of-references CodeLenses is a feature supported by whole bunch of popular plugins (C#, F#, Powershell, Go to just name a few) and every single one of them needs to implement some type of workaroundYes sure it will require to specify ID + args command. It will give the capability to use standard structure for args on language server side. I think it can be a good idea.
Indeed and I think again it’s a good idea because for XML Language Server we do that with custom capability. If we have standard capability, it should be cleaner.