-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Formatting gets overridden in some cases by HTML formatting #66
Comments
Hey @V13Axel sorry for the delay! Very likely could be whatever theme or plugin that underlines, make things bold that is causing the issue? Can you change the theme and see if it works? I had a similar issue with the plugin i was developing for Nova a while back, the brackets can be picked up by the themes if needed #36 Do you get any parsing error? See if you can exclude the |
Interestingly, I also use Catppuccin Mocha, just in Neovim (and everywhere else I can) I'll see if I can give it a closer look later on - It looks to me like it's an attempt at making the text bold, so there's probably some configuration option there I need to manage |
Yea, see what plugin is responsible for the underline/bolding. Also as you can see in my example the brackets are not highlighted correctly. I just haven't had a chance to mess with the theming in Helix, but if you are interested you can try to grab the brackets and apply the correct theme to them. The nodes are This was the case in Nova, and it is now highlighting correctly. |
Ok so for posterity in case anyone else hits this - The bold/red coloration was definitely from something trying to make the text bold. In my case, I just disabled that in Catppuccin's configuration as such: require("catppuccin").setup({
-- {snip} --
no_bold = true,
}) and that solved the red+bold. However, despite setting overrides for the Running
and the closing brackets just says However, the |
@V13Axel Mmm, maybe it is a precedence thing, are the queries in the I actually just fixed that for the Helix editor as it was doing my head, which just got merged a few minutes ago! Have a look and see if Neovim is similar? Make sure you are grabbing the brackets in the |
Only just got back around to this, and it looks like adding the brackets to My final (directive) @tag
(directive_start) @tag
(directive_end) @tag
(comment) @comment @spell
[
(bracket_start)
(bracket_end)
] @punctuation.bracket
Thanks again! |
Highlighting is working great just about everywhere, but seems to be overridden by formatting from HTML when the blade syntax is contained within a
strong
tag.A file containing the following:
Shows up like this in my editor (neovim, config here):
On some further inspection, the same appears to happen for the contents of
<a>
tags andhref
attributes:I would expect the PHP in those cases to be highlighted as simple PHP, but it appears that the HTML parser is trying to underline anything it considers a link, and make the contents of the
strong
tag as bold (and red in my case). Then, to complicate matters further, it seems encountering any>
confuses it further.That said, I'm not familiar enough with the interplay between tree-sitter parsers to know if that's something the
tree-sitter-blade
can/should change.The text was updated successfully, but these errors were encountered: