jeapostrophe / racket-langserver

Other
263 stars 24 forks source link

Integrate with vim(vim-lsp) #21

Open gn0uchat opened 3 years ago

gn0uchat commented 3 years ago

Want to integrated with vim/vim-lsp. I have no idea how to use this package. May I ask where to start?

jeapostrophe commented 3 years ago

You install the package with raco pkg, then set racket -l racket-langserver as the LSP command.

Lazerbeak12345 commented 3 years ago

This command is also useful for nvim-lspconfig perhaps this command could be documented in the readme?

Lazerbeak12345 commented 3 years ago

Interesting note: when I run that command in my terminal, here's what I get:

/usr/racket/share/pkgs/gui-lib/framework/private/preferences.rkt:581:19: string-
constant: autoload-automatically-reload is not a known string constant
  in: (string-constant autoload-automatically-reload)
  location...:
   /usr/racket/share/pkgs/gui-lib/framework/private/preferences.rkt:581:19
  context...:
   do-raise-syntax-error
   /usr/racket/share/pkgs/string-constants-lib/string-constants/string-constant.
rkt:228:0: string-constant
   apply-transformer-in-context
   apply-transformer52
   dispatch-transformer41
   for-loop
   [repeats 2 more times]
   loop
   [repeats 3 more times]
   finish-expanding-body33
   lambda-clause-expander
   for-loop
   [repeats 1 more time]
   finish-bodys
   lambda-clause-expander
   loop
   ...

I believe this is preventing it from working at all. Should I make a seperate issue for this? (I'd be happy to) Or perhaps did I miss a configuration step?

EDIT: I was on racket 7.5 On racket 7.8 it's fine

jeapostrophe commented 3 years ago

That problem is a mismatch between the string-constants package and the gui-lib package. My guess is that on your Racket 7.5, just one of them got updated, but in your Racket 7.8, they were aligned.