Inline comments (e.g., gcw
) in Python
#235
Unanswered
IamGianluca
asked this question in
Q&A
Replies: 2 comments
-
Yes, this is expected because python doesn't have block commentstring. And I am not sure, how is this achievable? Maybe using treesitter? But that being said, this is certainly out of scope for the plugin to support this OOTB. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I thought this could have been possible by leveraging treesitter. I'm not super familiar with what treesitter exposes and how comment.nvim interfaces with it. Perhaps I can look into that and resume the discussion later on. Thank you for now! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I just discovered the plugin and getting up to speed. I've seen that with some languages, the plugin is smart enough to comment out an argument in a function call:
In Python, however, the plugin doesn't return a valid syntax if we comment out an argument.
I would have expected it to return something like this...
I'm assuming this is because Python doesn't have inline comments, but I was wondering if there was a way to achieve something similar to what I described. It would be particularly useful when refactoring code.
Beta Was this translation helpful? Give feedback.
All reactions