grammarly
grammarly copied to clipboard
Grammarly for VSCode - Add Option to Only Check Comments and Strings in Python Code
I love being able to use Grammarly for VSCode, works awesome! However I do have a feature request.
It would be cool if there was a checkbox in the settings that could allow the user to ignore Python (or other languages) code, and only check grammar for comments or strings. Here's an example:
This is getting a grammar related red underline, but there's nothing "wrong" with it, it's just Python code. The red marks on the left nav panel of the project are annoying as well as it makes me think there's a code related error in those files when there isn't. So could there be a way in the future to ignore code and only check for grammar in the comments and strings only?
For comments, the program could just look at the first character in the current line, and if it starts with a # (in the case of Python), then check that line for grammar, and maybe check the next line to see if there's "more" comments that would feed into the previous for sentence's grammar check.
Strings are always encased in single or double quotes. Note that this part wouldn't be "perfect" because there are other uses for encasing code in single and double quotes that aren't related to strings, but it would be a HUGE help. Some strings are quite long and "client facing" so checking those for grammar related issues would be important, but not code (and really, not even comments either as those are for developers only, but it might help with creating better comments in the future).
Anyway, just thought I'd propose that. Thanks!
Yes, it meets issues https://github.com/znck/grammarly/issues/17, https://github.com/znck/grammarly/issues/159, https://github.com/znck/grammarly/issues/258 and https://github.com/znck/grammarly/issues/260. I do not know why these issues have been closed, but this feature seems essential.
I added stale automation and went on vacation 😝
+1 on this .. I get peer reviewed on my comments all the time .. would LOVE to have this feature built in
I want this feature so bad
I still want this feature! Haha hopefully it gets some traction and the devs see it!
It would be incredible if it were possible to define regular expressions that include/exclude specific patterns from spell-checking. That way, one could also, e.g., exclude markdown citations (starting with an @
symbol) or other special words or phrases - or only include strings and comments in a python file.
I was about to ask for this feature but saw this thread first. I just started using your extension and love it! But immediately I wanted to check my comments in my Python code. It would be a great feature to add. +1.
Dear all,
Is there any progress in this feature so far? Or do you know how to void grammar checks in Python code?
Thank you so much.
Any progress? Is there a way to altogether disable the extension for Python files in the worst case?
Or just use it for a list of file endings, such as .md
, .txt
, .tex
?
Would also love to see this feature get added, or an option to ignore parts of files that match a regex (like all code blocks in markdown)