Closed andys8 closed 4 years ago
I found a way to reliably get usages to work in a specific case. Hopefully that will help with debugging the actual cause.
Conduit.Root
(using module)mkArticlePage
[Trace - 10:34:53 PM] Sending request 'textDocument/definition - (1)'.
Params: {
"textDocument": {
"uri": "file:///home/andreas/dev/repository/purescript-react-realworld/src/Conduit/Root.purs"
},
"position": {
"line": 29,
"character": 20
}
}
[Trace - 10:34:53 PM] Received response 'textDocument/definition - (1)' in 29ms.
No result returned.
Conduit.Page.Article
[Trace - 10:36:12 PM] Sending request 'textDocument/definition - (2)'.
Params: {
"textDocument": {
"uri": "file:///home/andreas/dev/repository/purescript-react-realworld/src/Conduit/Root.purs"
},
"position": {
"line": 29,
"character": 17
}
}
[Trace - 10:36:12 PM] Received response 'textDocument/definition - (2)' in 9ms.
Result: {
"uri": "file:///home/andreas/dev/repository/purescript-react-realworld/src/Conduit/Page/Article.purs",
"range": {
"start": {
"line": 51,
"character": 0
},
"end": {
"line": 51,
"character": 0
}
}
}
mkArticlePage
[Trace - 10:38:26 PM] Sending request 'textDocument/references - (3)'.
Params: {
"textDocument": {
"uri": "file:///home/andreas/dev/repository/purescript-react-realworld/src/Conduit/Page/Article.purs"
},
"position": {
"line": 51,
"character": 0
},
"context": {
"includeDeclaration": false
}
}
[Trace - 10:38:26 PM] Received response 'textDocument/references - (3)' in 22ms.
Result: [
{
"uri": "file:///home/andreas/dev/repository/purescript-react-realworld/src/Conduit/Root.purs",
"range": {
"start": {
"line": 29,
"character": 17
},
"end": {
"line": 29,
"character": 30
}
}
}
]
Can you confirm the purs ide server
globs are the same in both cases, if that isn't so then there's not much hope
With
purescript-language-server
and Vim/CoC "Find references/usages" is not working in most cases.Example
https://github.com/jonasbuntinx/purescript-react-realworld/blob/d59eaf5c3431ea465db792f291eede42dc6190c7/src/Conduit/Page/Article.purs#L52
Vscode
Vscode is working
Vim
Vim is not working
Comparison with
purs ide
I tried if I could use
purs ide client
to show references or not.With
load
andusages
, the result is empty.But when building a file that's using it, before it'll work:
Debugging
I haven't looked into the code.
Versions
vim version: VIM - Vi IMproved 8.2 8021490 node version: v12.15.0 coc.nvim version: 0.0.78-9f9d8a32c4
purescript-language-server:
master
0fd2cdb17cea2c76efd13b2ea76482465bde2cce