porcupine
porcupine copied to clipboard
Line length marker in your face (opacity and Z-index)
As seen in the screenshot below, the line length marker covers the code, and the opacity 1 makes it way too prominent. This seems to be the same for all pyments styles I've tried.
~~Note: Potentially only an issue on Mac.~~
Some ways to disable the line length marker:
- Project-specific: set
max_line_length = 0
ormax_line_length = -1
in editorconfig (not sure what other editors do, this doesn't seem to be specified in editorconfig spec) - All Python files:
max_line_length = 0
ormax_line_length = -1
infiletypes.toml
- Always: Disable the plugin
Tkinter doesn't really know what opacity is, but we could change the color of the marker to be closer to the background color with e.g. utils.mix_colors()
(and make sure to update the color whenever the user changes their pygments style).
Maybe the entire marker is off by one pixel or so? Not sure. I'm looking at this part of your screenshot:
@Akuli Is there a Z-index in tkinter? Or can we in some way set the line behind the code?
As far as I know there's no good way to place a line between the background and the text, apart from turning the entire text widget into a Canvas
which is really not something I want to do.
The text widget doesn't really support anything marker-related at all. The marker is a 1px wide frame placed on top of the text widget.
Alpha?
Alpha is only a thing on Tk
and Toplevel
, so if we use that, the line length marker would work by creating a 1px wide window on top of the Porcupine window. The minimap plugin used to work this way, but it caused problems for some users and I don't want to try it again.
It definitely is one pixel to the right but otherwise it seems to be fine.
Another way to see it is the idea was to tell when a line is too long so if it's covering code that's your issue due to maintaining such long lines.