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 }}
Repository navigation
would like to show syntax errors inline with the text #56
P.S. I haven't tested it for syntax error, I've stripped a function from my code since there was a lot of other functions involved. But it should highlight every line in yellow, while keeping syntax highlighting intact.
If you want to implement the method is to check the position of the characters you want to modify, iterate over the whole text to find them, split their current textspan, change the style, and put everything back together.
Do you have an example with a syntax checker using LSP?
Sorry, there is no need for code syntax analysis in my project. I think you can launch a LSP server, input the code, and build a custom TextSpan after getting the result, ref to #56 (comment)
Activity
hommes-doutant commentedon Mar 19, 2025
The CodeLineEditingController has a spanBuilder parameter that allow you to do just that.
You just have to build your syntax checker, and using the span builder you can add the red squiggles.
https://pub.dev/documentation/re_editor/latest/re_editor/CodeLineSpanBuilder.html
LUK3D commentedon Mar 19, 2025
I tried to do it this way, but its not showing the TextSpan inside the code editor:
hommes-doutant commentedon Mar 19, 2025
It's because it is not used in that way. Here's a small guide :
P.S. I haven't tested it for syntax error, I've stripped a function from my code since there was a lot of other functions involved. But it should highlight every line in yellow, while keeping syntax highlighting intact.
If you want to implement the method is to check the position of the characters you want to modify, iterate over the whole text to find them, split their current textspan, change the style, and put everything back together.
csells commentedon Mar 23, 2025
Do you have an example with a syntax checker using LSP?
MegatronKing commentedon Mar 23, 2025
Sorry, there is no need for code syntax analysis in my project. I think you can launch a LSP server, input the code, and build a custom TextSpan after getting the result, ref to #56 (comment)