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

Rainbow Bracket Issue #6

Open
EmranMR opened this issue Feb 18, 2022 · 8 comments
Open

Rainbow Bracket Issue #6

EmranMR opened this issue Feb 18, 2022 · 8 comments

Comments

@EmranMR
Copy link

EmranMR commented Feb 18, 2022

Hi, for some reason when the rainbow brackets are toggled on in Nova preference, the brackets never match in blade syntax.

to reproduce:

  • preferences -> editor -> tick "use rainbow brackets"
  • then open any blade file and for example type {} or {{}

Screenshot 2022-02-18 at 19 53 39

}

thanks
Emran

@benwittorf
Copy link

A quick fix:

  • open the extension library (Menu: ExtensionsExtension Library)
  • right click on Blade, select Show in Finder
  • open Syntaxes/Blade.xml and
  • change line 37 to <pair open="{" close="}" /> (which should be changing {{ and }} to { and })
  • restart Nova

There you go :)

@juancarlosso
Copy link

Thanks @benwittorf , but in my case, did not work...

@EmranMR
Copy link
Author

EmranMR commented Apr 1, 2023

@benwittorf Thanks for the reply!!

Thanks @benwittorf , but in my case, did not work...

The hack works. I would say, once you save the file, and restart nova, also tick and untick the extension in the extension menu, this will disable and re-parse the extension again. If not leave a comment here and we debug!

I am not sure if this project is active but I will do a pull request for this. as well as some other minor issues. If not I might fork and we take it from there. The API is there to make a super rich Laravel extension not just for syntax but other things as well. ✊ Just have to find the time! 😅

@benwittorf
Copy link

All for it! In the meantime, I just saw this PR. Haven't tested it yet, though.

@juancarlosso
Copy link

@EmranMR I appreciate the effort, but it doesn't work for me Screenshot
As you can see here, the chamge in the blade file is already done.
Thanks

@benwittorf
Copy link

It should be single brackets, like this:

<pair open="{" close="}" />

Hope this helps.

@juancarlosso
Copy link

HI @benwittorf ... Thanks but the problem persist.

@EmranMR
Copy link
Author

EmranMR commented Aug 18, 2023

Hi @juancarlosso and @benwittorf I finally managed to put something together, it was a hell of a challenge esp the tree-sitter-blade, god damn nightmare 😅 please try Laravel Suit extension and raise issue on that repo for features and problems

This issue is fully resolved by that extension. Unfortunately you can not have both {{ as the same colour due to shortcomings by Nova but was already reported in their forum. But at least you get a symmetrical colouring if you use rainbow brackets. Feel free to add your +1 or comment there to push them to support multiple characters 👀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants