Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.9k
runtime(swayconfig): accept bar id passed as an argument#18814
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Conversation
chrisbra commentedNov 26, 2025
litoj commentedNov 27, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I think a couple small changes should be done:
My suggestion: synregionswayConfigBarBlockAfterIdstart=/{$/end=/^\s*}\zs$/containedcontains=i3ConfigBarOpts,i3ConfigComment,i3ConfigParen,i3ConfigBindKeyword,i3ConfigColorsBlockfoldkeependextendsynmatchswayConfigBarId/[^{]*/containedcontains=@i3ConfigStrVarsynregioni3ConfigBarBlockmatchgroup=i3ConfigKeywordstart=/bar\ze [^{]/end=/\ze{$/containedcontains=swayConfigBarIdnextgroup=swayConfigBarBlockAfterId...hideflinkswayConfigBarIdi3ConfigString It is a little more convoluted but it ensures only the id is allowed to be a string or a variable and not the contents of the block while highlighting the ID as a string by default. |
Unlike i3, sway supports passing an optional bar idas an argument for `bar`.
kupospelov commentedNov 27, 2025
Those are good points, thanks! Actually, what we need here is kind of similar to other regions like |
litoj commentedNov 28, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
We could do it that way, but that requires other changes as well:
Note: my previous solution doesn't work with the fonts either, so we have to change them to a separate highlight group anyway (and add them to top-level directive) |
This is an implementation ofvim/vim#18814.All code regarding identifiers was updated to have a unanymous style.All identifiers are now highlighted with their own group, linking to`i3ConfigIdent`.
litoj commentedNov 28, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Since the way identifiers were highlighted was a little confusing overall I decided to apply the approach here from@kupospelov to all i3/sway identifier matchers across both syntax files. I updated it in the plugin repo -litoj/i3config.vim@e665b92 @kupospelov Could you please mirror it into your PR to merge those changes? |
Unlike i3, sway supports passing an optional bar id as an argument for
bar.