-
Notifications
You must be signed in to change notification settings - Fork 50
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
Feat: Undercurl #1390
Comments
I'm not sure if you're aware of it, or this is a different feature, but Porcupine already has support for underlines, if you enable the Can't capture the hover tooltips for some reason. As for the squiggly line, I tried to implement it once with a bitmap as bgstipple, but it's a hack, and it had all kinds of problems when selecting text. |
Gotcha, I haven't used Porcupine with a version of Python that works with the langserver 😅 (#1300) I would like to be able to register arbitrary linters to use the underline feature, and also to have them automatically refresh on save (also autoformat on save). Some of this will likely come with #1342 |
I downgraded my Porcupine venv just because of that :)) |
The way this look would be done is through |
What Python version are you using 🙂? |
3.11 |
Does 3.11 not work with the langserver? I use 3.11 too. |
That underline is the too long line warning that
I use 3.11 too, but I also have 3.8, 3.9 and 3.10 installed. I use Porcupine in a 3.10 venv. |
Already supported.
This too is already possible (search for
I have tried it too and it was a similar experience. I had trouble changing the color of the squiggle. Since everyone has had trouble with implementing squiggles, I think there's nothing we can really do here :) |
An undercurl is a type of styling applied to text or code to signify a particular state or issue. It's often used to highlight syntax errors, warnings, or typos in your code. It's typically represented as a wavy line, similar to a curly underline, beneath the code or text.
For instance, if you've made a syntax mistake in your code, the IDE might display an undercurl beneath the problematic section to alert you to the issue. The color of the undercurl could vary to indicate the severity of the issue, with red typically used for errors, and yellow for warnings.
Hovering the mouse cursor on undercurled text will show a tooltip with information and possibly buttons/links that can be clicked.
This is a very helpful feature, because it assists programmers in detecting defects in the early stages, allowing them to resolve problems during coding without having to first execute the code to discover the issues.
Linters are what provide undercurl and can specifically include:
In VSCode, it looks like this:
Things to note:
It is unclear if and to what extent tkinter supports undercurl:
https://stackoverflow.com/questions/65437742/how-to-do-custom-underlining-in-tkinter-text-widgets
https://stackoverflow.com/questions/61506470/is-it-possible-to-have-a-red-squiggly-line-appear-under-words-in-a-tkinter-text/61604625#61604625
The text was updated successfully, but these errors were encountered: