-
Notifications
You must be signed in to change notification settings - Fork 19
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
heredoc indentation/highlighting #15
Comments
see issue #4, basically same problem: improper indentation (and I wish I knew how to fix it!) |
This is really an irritating bug. I use heredocs a LOT and often find myself giving up and using vim to fix them! |
Reopened after accidentally closing the issue. |
I'm getting blurry vision. Sorry. |
A bit golfed down which works for me but with an error
use v6;
my Str $table = 'my-table';
my Int $count = 10;
my Str $x = qq:to/SELECT/;
SELECT exitcode, timed_out, output
FROM $table
WHERE jobname = ?
ORDER BY executed DESC
LIMIT $count
SELECT
note $x; |
If there is a blank line before the SELECT (I can't see clearly), try removing it. |
There is no blank line before any of the two SELECTs. The error is thrown because the last SELECT is 32 characters indented while the leftmost word is at char column 0. To get it right, the last SELECT should also be at col 0. |
Any progress on this? The issue seems to be that heredoc/qq quotes are effectively unsupported with any unmatched quotation or bracket (escaped or not) inside getting interpreted by raku-mode as raku code and not part of the quoted string. I'm working on a raku script that autogenerates C code, and I've had to disable raku-mode entirely instead of fighting the auto-correction and incorrect highlighting. ie the following will throw off both the indentation and paren-matching:
|
If I write the following (from Moritz Lentz's book)
perl6-mode does not recognize the here-doc and seams to indent and highlight its contents as perl6 code.
The text was updated successfully, but these errors were encountered: