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

Does not color sexp after #; as comment #104

Open
Release-Candidate opened this issue Apr 2, 2023 · 2 comments
Open

Does not color sexp after #; as comment #104

Release-Candidate opened this issue Apr 2, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@Release-Candidate
Copy link

A S-expression following #; is not colored as a comment, but is recognized as comment by the LSP. It does not matter if the #; is on the same line or the following.

Example:

#;
(define test 5)

(test)

yields the LSP error:
... test: unbound identifier in: testRacket, so the define of test is comment out.

Btw. entering a #; in the last line of a file results in an unrecoverable error, the extension/window has to be restarted.
I don't know if this is a problem of the LSP or the extension.

like:

#lang racket

#;

Output tab of Racket Language Client:

sub1: contract violation
  expected: number?
  given: #f
  context...:
   /Users/roland/Library/Racket/8.8/pkgs/racket-langserver/check-syntax.rkt:19:0
   /Applications/Racket v8.8/collects/racket/private/more-scheme.rkt:163:2: select-handler/no-breaks
   /Applications/Racket v8.8/collects/racket/logging.rkt:43:0: with-intercepted-logging
   /Users/roland/Library/Racket/8.8/pkgs/racket-langserver/check-syntax.rkt:77:0: check-syntax
   /Applications/Racket v8.8/collects/racket/contract/private/arrow-val-first.rkt:486:18
   /Users/roland/Library/Racket/8.8/pkgs/racket-langserver/queue-only-latest.rkt:9:0: do-check-and-stuff!
   /Users/roland/Library/Racket/8.8/pkgs/racket-langserver/queue-only-latest.rkt:33:0: check
@Release-Candidate Release-Candidate added the bug Something isn't working label Apr 2, 2023
@jryans
Copy link
Collaborator

jryans commented Apr 3, 2023

Thanks for the report! Indeed, #; highlighting is not currently handled. This one is a bit trickier to handle than other comment styles, so I'll have to think about this one for a bit.

As for the part related to entering #; at the end of a file causing an error that needs a reload to recover, that's a langserver issue, so it would be great if you could report that portion over in that repo.

@Release-Candidate
Copy link
Author

Release-Candidate commented Apr 3, 2023

Thank you. Yes, I can imagine that isn't the easiest comment to handle.

And done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants