jeapostrophe / racket-langserver

Other
262 stars 24 forks source link

LSP does not like anything 'above' `#lang` #101

Closed Release-Candidate closed 1 year ago

Release-Candidate commented 1 year ago

Anything before #lang in a file causes an exception. It does not matter whether there is a comment, an empty line,... -

Example - adding an empty line (which isn't visible in the rendered Markdown) above #lang:


#lang racket

Exception:

Caught exn in request "textDocument/documentSymbol"
rest: contract violation
  expected: (and/c list? (not/c empty?))
  given: #<void>
  context...:
   /Users/roland/Library/Racket/8.8/pkgs/racket-langserver/text-document.rkt:232:0: get-symbols
   /Users/roland/Library/Racket/8.8/pkgs/racket-langserver/text-document.rkt:463:0: document-symbol
   /Applications/Racket v8.8/collects/racket/contract/private/arrow-val-first.rkt:486:18
   /Users/roland/Library/Racket/8.8/pkgs/racket-langserver/methods.rkt:26:0: process-message
   /Applications/Racket v8.8/collects/racket/contract/private/arrow-val-first.rkt:486:18
   /Users/roland/Library/Racket/8.8/pkgs/racket-langserver/main.rkt:60:2: consume

[Error - 21:37:57] Request textDocument/documentSymbol failed.
  Message: internal error in method "textDocument/documentSymbol"
  Code: -32603 
dannypsnl commented 1 year ago

This should be fixed, @Release-Candidate would you like to check it?

Release-Candidate commented 1 year ago

Yes, thanks. This works for me with the latest LSP version.