-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: experimental "Magika" syntax detect method
https://github.com/google/magika Signed-off-by: Jack Cherng <[email protected]>
- Loading branch information
Showing
23 changed files
with
567 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Deep Learning Based Syntax Detection | ||
|
||
--8<-- "refs.md" | ||
|
||
!!! warning "This feature is experimental and disabled by default." | ||
|
||
## Overview | ||
|
||
It uses Google's [Magika](https://github.com/google/magika) library to detect the file syntax. | ||
|
||
## Prerequisites | ||
|
||
1. If you are using MacOS, the minimum supported OS version is MacOS 11 (Big Sur). | ||
|
||
1. Install dependencies. | ||
|
||
Run `AutoSetSyntax: Download Dependencies` from the command palette. | ||
The dependencies can be up to 50 MB in size, so it may take a while. | ||
When it's done, there will be a popup dialogue. | ||
|
||
1. Enable the feature. | ||
|
||
Set `"magika.enabled"` to `true` in AutoSetSyntax's settings. | ||
|
||
After you've done all steps above, it should just work without restarting Sublime Text. | ||
|
||
## Demo | ||
|
||
<video controls="controls" style="max-width:100%"> | ||
<source type="video/mp4" src="https://user-images.githubusercontent.com/6594915/133069990-ea6eaf22-f341-4c0c-9b74-1931f96c7183.mp4"></source> | ||
<p>Your browser does not support the video element.</p> | ||
</video> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.