You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
Additionally, could you make such comments collapsible, please. I know that for other languages, Atom doesn't make all inline comments collapsible; but for some of them it does. For example, following comment is collapsible in PHP:
/* any multiline
comment with code right after*/ $v= 1;
I took a quick look into this, but I am far from an expert on the subject of atom languages. But atom uses Tree-sitter to parse the content of the file. It parses line by line and not with multi-line support (this is an underlying assumption that is important to my argument). It relies on regex to match the opening and closing of multi-line comments (and other parameters). Other block commented languages often have a unique opening and closing statement such as /* and */ make it easier to find the closing statement. The reader macro is only closed by a paren.
We could implement the reader macro (#_()) in a number of different places which would need to select different closing parens. I'll indicate where the comment should stop with the | character.
There are regex ways (using recursion) to find the opening and closing matching parens, but given that tree-sitter doesn't have knowledge of the previous lines this becomes challening to identify the right closing paren using just the built in regex tree-sitter formatting.
Needless, I've given up modifying the simple grammar/clojure.cson
@eskemojoe007 mostly right; but Tree-sitter does work across multiple lines.
The grammar you were looking at was a TextMate grammar. Clojure does not have a Tree sitter grammar in Atom yet though, so your argument doesn’t change.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
From the Clojure reader reference
grammar guides for other editors will highlight the affected forms as comments.
Steps to Reproduce
#_
in front of any form, with any amount of whitespace preceding itExpected behavior: The following form should be interpreted as a comment
Actual behavior: The following form is not interpreted as a comment
Reproduces how often: always
Versions
This has happened on every version of Atom I've used, including 1.19.0
The text was updated successfully, but these errors were encountered: