-
Notifications
You must be signed in to change notification settings - Fork 59
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
Substantial reorganization of syntax highlighting file #80
base: master
Are you sure you want to change the base?
Conversation
This commit is a substantial reorganization and general cleanup of existing keywords. Several highlight groups have been adjusted and compiler builtins that no longer exist have been removed.
The previous syntax highlighting did not match all valid arbitrary bit-width integer types. This commit allows those with leading zeros to be highlighted as well.
This commit heavily reorganizes the syntax highlighting for strings and characters and adds new support for format strings.
This commit reorganizes the syntax file into several sections. The heading of each section can be folded with :set foldmethod=marker.
@rsaihe I forgot where we left off on this, I know the last time I had asked there hasn't been much progress. I want to ask, does this fix some of the weird indentation rules for zig? Also, if you no longer want to work on this or can't, is it okay if I finish up? |
This is only syntax highlighting, but I did manage to fix a lot of cases of incorrect indentation in my personal Vim plugin for Zig (found here). I don't have much energy right now to move my indentation changes into a pull request but you are totally free to use what I have there. |
@haze What is the status of this? I'd like to lookup the color rules to document necessary changes for semantic tokens and treesitter color rules by zls and treesitter-zig to match the provided colors here. Specifically I am annoyed that control flow instructions do not have a special rule within semantic tokens to highlight it properly. |
I’ve incorporated some of the standout features of #80 minus the reorg in the develop branch at https://github.com/atweiden/zig.vim, in addition to a few recent pull requests. IIRC I haven’t done anything with #80’s string handling yet. As a point of differentiation compared to #80, besides not reorging, it handles |
As discussed in the Zig Programming Language Discord, I have been working on rewriting the entire zig.vim plugin from scratch. This pull request contains all of the improvements I have made to syntax highlighting and heavily reorganizes the syntax file to hopefully make it more maintainable for the future.