-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request : add custom markup comments #23617
Comments
Hi @hprodh thank you for the feedback! Just in case, I think the current logic to handle the markers is based on a regular expression at spyder/spyder/plugins/editor/utils/findtasks.py Lines 18 to 23 in 9de131c
Also, checking this I remembered another related issue #22341 Maybe a way to let people customize the markers could be by allowing them to define a custom pattern besides the default hardcoded one or even making possible defining in the preferences only one pattern and leaving the current hardcoded pattern value as the default value for that new preference? What do you think @spyder-ide/core-developers ? |
I think we should be able to extend the regexp pattern by
What do you think? |
That should work but then the patterns in the lineedit will be separated by some character like I was thinking that the preference to be added could probably be a string that has the patterns you would like, with their characters escaped if needed (since the value will be used as part of a regular expression - i.e ??? -> ???), and separated with
|
I think the separator And also I don't think the hardcoded markups should be modifiable. |
I agree with @hprodh: a single line edit with comma separated patterns should be enough.
Ok, that would make composing the regexp easier. @dalthviz, we'd need to validate the extra patterns introduced by users and report to them in case some don't follow this convention.
Ok, that's a good point too because it'd make the experience consistent between different Spyder installations (instead of showing markup comments in some installations and not in others). |
... Also, a little checkbox ☑ to enable/disable custom markups could be convenient. |
I sometimes use comments beginning with
![Image](https://private-user-images.githubusercontent.com/58696783/408804604-1bc5ebe8-a3d9-4860-8373-627aa745f42c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNDE1MzcsIm5iZiI6MTczOTE0MTIzNywicGF0aCI6Ii81ODY5Njc4My80MDg4MDQ2MDQtMWJjNWViZTgtYTNkOS00ODYwLTgzNzMtNjI3YWE3NDVmNDJjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDIyNDcxN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM2ZTYyZWFlZWZkMmQ4OTE0YWU1ZGJjOTg5YjFlNDMyNWUwMzRhMmM4N2JlOTVkYjQ5NjI2YzYzNGJjOTkyZGEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.s3ReYaJNwSbGHtKthsBV0W5L4ek2NKR7pItTCnvmQvc)
#NOTE : ...
.These are not highlighted by default as markup comments, and this is actually OK. But sometimes, I would like to temporarily highlight them. Could it be possible to add entries to the list of markup comments in Preferences -> Editor -> Advanced Settings -> Annotations ?
Quick visual example :
The text was updated successfully, but these errors were encountered: