Cursor is awesome, but too many times it messes with completely unrelated areas of my code. I’ve seen several issues posted here on the forum of the same problem, so I think a fix to this would be appreciated widely.
This problem has grown so bad for me that on every prompt, there are a dozen or so lines of code that I have to Reject every single time. It’s still usable, but it’s slowing me down greatly.
We need a method like code fences or compiler directive-type statements. Like a reserved phrase that would the same for everybody, as a comment in whatever language you’re using. The comment ensures you are not changing actual code!
e.g. for Python
# CURSOR_DISABLE
some_python_stuff()
# CURSOR_ENABLE
Or something like that. Sometimes I’ve seen other tools call these ‘NOTOUCH’ as well, that would be a fine naming convention too.
e.g. for JavaScript
// CURSOR_NO_TOUCH
let name = "John Doe"; // String
let age = 30; // Number
let isEmployed = true; // Boolean
let city = null; // Null
// END_CURSOR_NO_TOUCH
There are lot of ways you could do this, but the point would be:
- Line-specific is needed, .cursorrules that ignore a complete file are too broad.
- Comments in whatever language the file is using, so they don’t affect your code.
- Comments also so they don’t affect any other downstream tools.
Thanks!