Skip to content

Does not color sexp after #; as comment #104

Open

Description

@Release-Candidate

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

Activity

  1. jryans commented on Apr 3, 2023

    @jryans
    Collaborator

    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.

  2. Release-Candidate commented on Apr 3, 2023

    @Release-Candidate
    Author

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions