Skip to content
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

Show-Paren minor mode doesn't highlight parentheses with yaml-mode #84

Open
hamelg opened this issue Jan 15, 2021 · 1 comment
Open

Comments

@hamelg
Copy link

hamelg commented Jan 15, 2021

Show-Paren is very useful when editing code in Yaml Block scalars. Unfortunately, it doesn't display the parenthesis matches.

Is there any reason to modify the yaml-mode syntax table with these 2 characters :

(modify-syntax-entry ?\( "." syntax-table)
(modify-syntax-entry ?\) "." syntax-table)

Show-Paren needs this syntax to highlight parentheses :

(modify-syntax-entry ?\( "()" yaml-mode-syntax-table)
(modify-syntax-entry ?\) ")(" yaml-mode-syntax-table)

Thanks

@wasamasa
Copy link
Collaborator

As per the YAML specification 1.2 section 7.4 only [] and {} have special delimiter-like meaning: https://yaml.org/spec/1.2/spec.html#id2790088

That being said, I don't see the harm in adding () to the list. These characters are only mentioned in the standard as valid URI characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants