9
15
Fork
You've already forked zig.vim
2

Substantial reorganization of syntax highlighting file #80

Closed
rsaihe wants to merge 10 commits from master into master
pull from: master
merge into: ziglang:master
ziglang:hb/new-keywords
ziglang:mikdusan-zir
rsaihe commented 2022年08月16日 23:28:37 +02:00 (Migrated from github.com)
Copy link

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.

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.
haze commented 2022年10月31日 23:48:31 +01:00 (Migrated from github.com)
Copy link

@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?

@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?
rsaihe commented 2022年11月02日 03:32:46 +01:00 (Migrated from github.com)
Copy link

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.

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](https://git.sr.ht/~selene/zig.vim)). 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.
matu3ba commented 2022年12月30日 21:36:59 +01:00 (Migrated from github.com)
Copy link

@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.

@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.
atweiden commented 2023年02月28日 23:28:20 +01:00 (Migrated from github.com)
Copy link

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 @"" variables by |hl-Ignore|ing the @"" chars and highlighting the name of the variable the same as any other variable. Feedback has been negative on using hl-Ignore in the past, but I kind of don’t mind it. Not to digress too much, but it might be better for colorscheme authors to implement custom colouring for the @"" chars in Zig (similar to how many colorschemes implement custom handling of select filetypes already).

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 `@""` variables by `|hl-Ignore|`ing the `@""` chars and highlighting the name of the variable the same as any other variable. Feedback has been negative on using `hl-Ignore` in the past, but I kind of don’t mind it. Not to digress too much, but it might be better for colorscheme authors to implement custom colouring for the `@""` chars in Zig (similar to how many colorschemes implement custom handling of select filetypes already).
Techatrix commented 2025年09月26日 18:58:10 +02:00 (Migrated from github.com)
Copy link

Closing this PR as it has gone stale and now conflicts with master (#110). Feel free to rebase and submit a new PR.

Closing this PR as it has gone stale and now conflicts with master (#110). Feel free to rebase and submit a new PR.
selenebun commented 2025年09月27日 04:04:15 +02:00 (Migrated from github.com)
Copy link

Oh, excellent! I'm very glad to see new development happening.

As a complete coincidence, I actually started tinkering again with my own version of this plugin just a few weeks ago, using what I've learned from maintaining hare.vim. I hadn't touched it in a couple years (due to burnout), but I've been making very good progress and would be more than happy to send some new PRs incorporating some of those changes!

I'm also very much looking forward to the Vim runtime files finally being updated again too, once everything is in a good place.

Oh, excellent! I'm very glad to see new development happening. As a complete coincidence, I actually started tinkering again with my own version of this plugin just a few weeks ago, using what I've learned from maintaining [hare.vim](https://git.sr.ht/~sircmpwn/hare.vim). I hadn't touched it in a couple years (due to burnout), but I've been making very good progress and would be more than happy to send some new PRs incorporating some of those changes! I'm also very much looking forward to the Vim runtime files finally being updated again too, once everything is in a good place.

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ziglang/zig.vim!80
Reference in a new issue
ziglang/zig.vim
No description provided.
Delete branch "master"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?