saem / vscode-nim

Other
177 stars 23 forks source link

change highlighting of static to match block, if #86

Closed morganholly closed 2 years ago

morganholly commented 2 years ago

i felt that having static highlighted like var, seq, ref, etc instead of block, if, for, (and at least in my case, proc and template) didn't make sense

RSDuck commented 2 years ago

static can appear in both kinds of contexts, is the highlighting in the other one still preserved?

morganholly commented 2 years ago

ah i should check that, thanks

morganholly commented 2 years ago

ok i changed the regex to require a colon, optionally after spaces. the second match for static doesn't have any other requirements for matching, if for some reason the matching order is flipped, static(?= *[a-zA-Z]|\\(|\\[) should work for the other one

morganholly commented 2 years ago

i added of to the changes as well. previously i had noticed of and elif being highlighted differently in the same case block and that seemed... odd

saem commented 2 years ago

Thanks for the improvements, very much appreciated.

Sorry, I think I did merged in the wrong order, would you mind rebasing?

morganholly commented 2 years ago

ok i think i fixed it. it's my first time doing so so hopefully i did it right

saem commented 2 years ago

Unfortunately it's a merge commit. I would revert that commit on your local. Then do a git rebase onto the main branch, you might have to deal with a few conflicts, but noticing too bad.

Before you do these operations I'd create a copy of your local so you have a backup. Then just copy from the backup if you need to restart. It took me a while to get the hang of it. Nothing that some stack overflow, YouTube, etc won't fix. I'm pretty lady so I often end up using the git lens extension in vs code for this.

morganholly commented 2 years ago

ah ok i’ll see what i can do

morganholly commented 2 years ago

you mean rebase on my fork's patch-1 branch to then get merged onto your repo, right?

morganholly commented 2 years ago

oops

morganholly commented 2 years ago

i think i rebased, but i seem to have messed up the branches

morganholly commented 2 years ago

i thought it didn't do that this time, i started over several times because i could tell it had done so

morganholly commented 2 years ago

hmm patch-1 seems to exist on github so maybe i should start a new PR? github won't let me reopen the PR

morganholly commented 2 years ago

lemme know if you'd like me to create a new PR or if there's a way to reopen this one with the new changes

morganholly commented 2 years ago

90