It would be useful to be able to disable Cursor Tab completions when the editor cursor is inside a comment. I often use comments for “thinking out loud”, and the LLM’s confabulations are distracting in that context.
This is available under Cursor Settings
Thank you Aman, indeed it is! I feel like an idiot now - I don’t know how many times Iooked there and my eyes passed over it.
For anyone who finds this via search, it’s the dropdown labelled “Trigger in Comments” under Cursor Settings > Features > Cursor Tab.
Might be nice to have this setting in the status bar popup for Cursor Tab too.
Is it just me or does disabling this in settings not work? I have disabled “Enable of disable Cursor Tab suggestions in comments”, but I still get suggestions in Python comments and docstrings.
I’ve tried restarting Cursor etc.
It works, but not very well.
It suppresses suggestions when the cursor is inside a comment token at the time the suggestion would have been requested, which is OK for C-style comments, but when starting a new line inside a line comment the suggestion has often been requested before the user has time to type the #
or //
, and there’s no suppression of an already-requested suggestion.
Docstrings are just string literal tokens as far as the python lexer is concerned so it doesn’t work at all there.
I’ve now disabled the Tab model altogether in Cursor settings and I still get in-line completions