Skip to content
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

error occurred when working with racket-langserver #3385

Closed
jetjinser opened this issue Sep 18, 2021 · 5 comments
Closed

error occurred when working with racket-langserver #3385

jetjinser opened this issue Sep 18, 2021 · 5 comments

Comments

@jetjinser
Copy link

jetjinser commented Sep 18, 2021

Result from CocInfo

versions

vim version: NVIM v0.5.0
node version: v16.8.0
coc.nvim version: 0.0.80-03c9add7cd
coc.nvim directory: /Users/jinserlin/.vim/plugged/coc.nvim
term: iTerm.app
platform: darwin

Log of coc.nvim

2021-09-19T00:30:03.613 INFO (pid:67044) [services] - registered service "languageserver.racket"
2021-09-19T00:30:03.622 INFO (pid:67044) [services] - racket state change: stopped => starting
2021-09-19T00:30:03.628 INFO (pid:67044) [plugin] - coc.nvim 0.0.80-03c9add7cd initialized with node: v16.8.0 after 164ms
2021-09-19T00:30:03.637 INFO (pid:67044) [language-client-index] - Language server "languageserver.racket" started with 67045
2021-09-19T00:30:09.938 INFO (pid:67044) [services] - racket state change: starting => running
2021-09-19T00:30:09.946 INFO (pid:67044) [services] - service languageserver.racket started
2021-09-19T00:30:10.287 INFO (pid:67044) [completion-complete] - Results from: languageserver.racket
2021-09-19T00:30:15.646 INFO (pid:67044) [completion-complete] - Results from: languageserver.racket
2021-09-19T00:30:17.590 INFO (pid:67044) [completion-complete] - Results from: around,languageserver.racket
2021-09-19T00:30:20.915 INFO (pid:67044) [completion-complete] - Results from: around,languageserver.racket
2021-09-19T00:30:21.453 ERROR (pid:67044) [node-client] - g.content.trim is not a function TypeError: g.content.trim is not a function
    at /Users/jinserlin/.vim/plugged/coc.nvim/build/index.js:146:2753
    at Array.filter (<anonymous>)
    at tr.createPopup (/Users/jinserlin/.vim/plugged/coc.nvim/build/index.js:146:2733)
    at tr.show (/Users/jinserlin/.vim/plugged/coc.nvim/build/index.js:146:2644)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Dw.showSignatureHelp (/Users/jinserlin/.vim/plugged/coc.nvim/build/index.js:263:25862)
    at async Dw._triggerSignatureHelp (/Users/jinserlin/.vim/plugged/coc.nvim/build/index.js:263:24604)
    at async /Users/jinserlin/.vim/plugged/coc.nvim/build/index.js:263:22814
2021-09-19T00:30:35.643 INFO (pid:67044) [attach] - receive notification: showInfo []

racket-langserver vsersion

$ raco pkg show -l racket-langserver:

Installation-wide:
 Package              Checksum                                    Source
 racket-langserver    962d9a337631ae0713bbdec3b4a1b35d6ff65294    (catalog "racket-langserver" "https://github.com/jeapostrophe/racket-langserver.git")
User-specific for installation "8.2":
 [none]

Describe the bug

when I typed space between brackets, like:

(substring )
          ^ I typed space here then the error occurred

Reproduce the bug

  • Create file mini.vim with:
call plug#begin('~/.vim/plugged')

Plug 'neoclide/coc.nvim', {'branch': 'release'}

call plug#end()
  • Config coc.nvim with:
{
  "languageserver": {
    "racket": {
      "command": "racket",
      "args": ["--lib", "racket-langserver"],
      "filetypes": ["scheme"]
    }
  }
}
  • Start (neo)vim with command: nvim foo.rkt -u mini.vim

  • Operate vim.

截屏2021-09-19 上午12 40 24

@fannheyward
Copy link
Member

Can you reproduce this with another language, for example coc-pyright for Python? I don't use racket and have no idea about how to setup this.

@jetjinser
Copy link
Author

Thanks for the reply! I also use cos-pyright, it works well. I don't know what is missing. Where else can I get help and what more information do I need to provide
87507E1C-F8E1-446C-8D6F-242FC536C2F1

@fannheyward
Copy link
Member

Please provide trace logs https://github.com/neoclide/coc.nvim/wiki/Debug-language-server#using-output-channel that you came this issue.

@qianlv
Copy link

qianlv commented Sep 26, 2021

@fannheyward same problem, trace logs log

@fannheyward
Copy link
Member

@qianlv from your logs, https://gist.github.com/qianlv/72fcfb5eb048824bbe9d521c13ed9ebf#file-racket-log-L8221-L8231, the racket-langserver ruturns signatures, but the label type is Array.

The LSP https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#signatureInformation defined the label should be string type, this made the g.content.trim is not a function error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants