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

Update repository support for ST4 #2

Merged
merged 5 commits into from
Aug 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
The MIT License (Expat)

Copyright (c) 2018 Jeff Fowler
Copyright (c) 2024 Aiden Fox Ivey

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
46 changes: 13 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,31 @@
Zig Language (unofficial fork)
============
[Zig](http://ziglang.org/) syntax highlighting for [Sublime Text](sublimetext.com/).
==

Note: I noticed that [http://github.com/ziglang/sublime-zig-language](http://github.com/ziglang/sublime-zig-language)
was unmaintained - I'm trying to make a fork to maintain with the hope of upstreaming over time.
Note: This is *not* the official package. That is [here](https://github.com/ziglang/sublime-zig-language). When I first made this repo, it was unmaintained. I think that Zig should have first class support in Sublime Text, so I'm starting here.

Syntax highlighting for [Zig](http://ziglang.org/)
for [Sublime Text](sublimetext.com/) editor.
Use [Package control](https://packagecontrol.io) to install this.
Auto-install
------------

Use [Package Control](https://packagecontrol.io) to install this.

Or add `Zig.tmLanguage` to the packages directory. On OSX This is usually
Manually
--------
Add `Zig.sublime-syntax` and `Zon.sublime-syntax` to the packages directory. On MacOS this is usually

```
~/Library/Application\ Support/Sublime\ Text/
```

But to find the path on your machine go to `Preferences > Browse Packages` from
within Sublime Text.
=======
Otherwise use `Preferences > Browse Packages` from within Sublime Text.

TextMate Installation
---------------------

The `Zig.tmLanguage` is also compatible with TextMate.
To install in TextMate clone or download this repository.
Then rename the repository directory to `Zig.tmBundle` and double-click it to install it into TextMate.
However, see [Zig.tmbundle](https://github.com/ziglang/Zig.tmbundle) for dedicated TextMate support.

Local Development
-----------------

Clone or copy this repository to your local Sublime Text folder. e.g.

```
git clone https://github.com/ziglang/sublime-zig-language.git "/Users/$USER/Library/Application Support/Sublime Text 3/Packages/Zig Language"
git clone https://github.com/ziglang/sublime-zig-language.git "/Users/$USER/Library/Application Support/Sublime\ Text/Packages/Zig Language"
```

For working on ST3+ support, you can edit the `.sublime-syntax` directly.
Expand All @@ -41,22 +34,9 @@ will provide some syntax highlighting.
You can run the tests in [syntax_test.zig](./Syntaxes/syntax_test.zig)
with the "Syntax Tests" builtin build system.
Sublime Text will automatically reload the syntax on save.
If you have a big Zig project open this can make your CPU spin while Sublime reindex everything.


For working on the old `.tmLanguage` syntax, work on the `Zig.YAML-tmLanguage` file.
**Important** Github Linguist's source of truth is `Zig.YAML-tmLanguage`.
Work on `Zig.YAML-tmLanguage` the use PackageDev command: `Convert (YAML, JSON, PList) to...`
to generate the `.tmLanguage`.
Sublime Text should also automatically reload the plugin, but doesn't have unit tests for `tmLanguage`.

If you have a big Zig project open this can make your CPU spin while Sublime reindexes everything.

Build System
------------

The included Sublime Text build system comes with a few options for configuration and defining your own build targets. See [here](build.md) for more information.

LICENSE
-------

Provided under an MIT License
2 changes: 1 addition & 1 deletion Settings/Zig.sublime-settings
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"zig.build.on_save": false,

// automatically format the file/project on save
"zig.fmt.on_save": true,
"zig.fmt.on_save": false,

// format either file or project. the only valid options are "file" or "project"
"zig.fmt.mode": "file",
Expand Down
Loading
Loading