What's the purpose of specifically coloring %s*([_%w]+:)
in Python?
#1290
-
Forgive me for this silly question, but I've just started learning a bit of Python for configuring Kitty and have almost zero prior knowledge of this language 😢 I noticed that in our config, we have this pattern <1> space characters (0 or more repetitions)
<2> alphanumeric characters or underscores (1 or more repetitions)
<3> literal `:` which, in my file, highlights statements such as @CharlesChiuGit I saw you attributed those changes. Could you please kindly give me some hints about what this pattern is useful for? Thanks a ton lmao |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Sorry for the late reply! kinda busy on the weekend. it's indeed a side effect of setting
and In python, we sometime wrote docstrings like so: def SetDeviceIndex(self, index: int) -> None:
"""
Set index for device
Parameters: <- notice this line
index (int): Index of device.
"""
foo(index) as u can see Footnotes |
Beta Was this translation helpful? Give feedback.
Sorry for the late reply! kinda busy on the weekend.
it's indeed a side effect of setting
%s*([_%w]+:)
for python inpaint.nvim
.the reason of adding
paint.nvim
:and
paint.nvim
just grep text pattern instead of usingts-comment
to detect comments.In python, we sometime wrote docstrings like so: