Browse Source

Move syntaxes around to make packing a two step process

Closes #1268
pull/1272/merge
Vincent Prouillet 5 months ago
parent
commit
2362cf2415
46 changed files with 44 additions and 21 deletions
  1. +23
    -20
      .gitmodules
  2. +17
    -1
      components/config/examples/generate_sublime.rs
  3. +3
    -0
      docs/content/documentation/content/syntax-highlighting.md
  4. +0
    -0
      sublime/syntaxes/extra/Assembly x86.sublime-syntax
  5. +0
    -0
      sublime/syntaxes/extra/CSV.sublime-syntax
  6. +0
    -0
      sublime/syntaxes/extra/Crystal.sublime-syntax
  7. +0
    -0
      sublime/syntaxes/extra/Dart.sublime-syntax
  8. +0
    -0
      sublime/syntaxes/extra/Docker.tmbundle
  9. +0
    -0
      sublime/syntaxes/extra/GDScript-sublime
  10. +0
    -0
      sublime/syntaxes/extra/GraphQL-SublimeText3
  11. +0
    -0
      sublime/syntaxes/extra/Handlebars.sublime-syntax
  12. +0
    -0
      sublime/syntaxes/extra/Julia-sublime
  13. +0
    -0
      sublime/syntaxes/extra/Kotlin.sublime-syntax
  14. +0
    -0
      sublime/syntaxes/extra/LESS-sublime
  15. +0
    -0
      sublime/syntaxes/extra/MZN.sublime-syntax
  16. +0
    -0
      sublime/syntaxes/extra/Nim.sublime-syntax
  17. +0
    -0
      sublime/syntaxes/extra/Nix.sublime-syntax
  18. +0
    -0
      sublime/syntaxes/extra/PowerShell.sublime-syntax
  19. +0
    -0
      sublime/syntaxes/extra/Prolog.sublime-syntax
  20. +0
    -0
      sublime/syntaxes/extra/README.md
  21. +0
    -0
      sublime/syntaxes/extra/Racket.sublime-syntax
  22. +0
    -0
      sublime/syntaxes/extra/Reason.sublime-syntax
  23. +0
    -0
      sublime/syntaxes/extra/Stylus.sublime-syntax
  24. +0
    -0
      sublime/syntaxes/extra/Sublime-CMakeLists
  25. +0
    -0
      sublime/syntaxes/extra/Sublime-GenericConfig
  26. +0
    -0
      sublime/syntaxes/extra/SublimeElmLanguageSupport
  27. +0
    -0
      sublime/syntaxes/extra/SublimeFortran
  28. +0
    -0
      sublime/syntaxes/extra/SublimeSass
  29. +0
    -0
      sublime/syntaxes/extra/SublimeTextLinkerSyntax
  30. +0
    -0
      sublime/syntaxes/extra/Swift.sublime-syntax
  31. +0
    -0
      sublime/syntaxes/extra/TypeScript.sublime-syntax
  32. +0
    -0
      sublime/syntaxes/extra/TypeScriptReact.sublime-syntax
  33. +0
    -0
      sublime/syntaxes/extra/VimL.sublime-syntax
  34. +0
    -0
      sublime/syntaxes/extra/awk-sublime
  35. +0
    -0
      sublime/syntaxes/extra/elixir-sublime-syntax
  36. +0
    -0
      sublime/syntaxes/extra/lrc.sublime-syntax
  37. +0
    -0
      sublime/syntaxes/extra/srt.sublime-syntax
  38. +1
    -0
      sublime/syntaxes/extra/sublime-clojure
  39. +0
    -0
      sublime/syntaxes/extra/sublime-fish
  40. +0
    -0
      sublime/syntaxes/extra/sublime-glsl
  41. +0
    -0
      sublime/syntaxes/extra/sublime-jinja2
  42. +0
    -0
      sublime/syntaxes/extra/sublime-purescript-syntax
  43. +0
    -0
      sublime/syntaxes/extra/sublime_toml_highlighting
  44. +0
    -0
      sublime/syntaxes/extra/sublimetext-fsharp
  45. +0
    -0
      sublime/syntaxes/extra/vue-syntax-highlight
  46. BIN
      sublime/syntaxes/newlines.packdump

+ 23
- 20
.gitmodules View File

@ -2,68 +2,71 @@
path = sublime/syntaxes/Packages
url = https://github.com/sublimehq/Packages.git
[submodule "sublime/syntaxes/awk-sublime"]
path = sublime/syntaxes/awk-sublime
path = sublime/syntaxes/extra/awk-sublime
url = https://github.com/JohnNilsson/awk-sublime.git
[submodule "sublime/syntaxes/AsciiDoc"]
path = sublime/syntaxes/AsciiDoc
url = https://github.com/SublimeText/AsciiDoc.git
[submodule "sublime/syntaxes/Sublime-CMakeLists"]
path = sublime/syntaxes/Sublime-CMakeLists
path = sublime/syntaxes/extra/Sublime-CMakeLists
url = https://github.com/zyxar/Sublime-CMakeLists.git
[submodule "sublime/syntaxes/SublimeTextLinkerSyntax"]
path = sublime/syntaxes/SublimeTextLinkerSyntax
path = sublime/syntaxes/extra/SublimeTextLinkerSyntax
url = https://github.com/jbw3/SublimeTextLinkerSyntax
[submodule "sublime/syntaxes/Docker.tmbundle"]
path = sublime/syntaxes/Docker.tmbundle
path = sublime/syntaxes/extra/Docker.tmbundle
url = https://github.com/asbjornenge/Docker.tmbundle.git
[submodule "sublime/syntaxes/Sublime-VimL"]
path = sublime/syntaxes/Sublime-VimL
url = https://github.com/SalGnt/Sublime-VimL.git
[submodule "sublime/syntaxes/elixir-sublime-syntax"]
path = sublime/syntaxes/elixir-sublime-syntax
path = sublime/syntaxes/extra/elixir-sublime-syntax
url = https://github.com/princemaple/elixir-sublime-syntax.git
[submodule "sublime/syntaxes/SublimeElmLanguageSupport"]
path = sublime/syntaxes/SublimeElmLanguageSupport
path = sublime/syntaxes/extra/SublimeElmLanguageSupport
url = https://github.com/elm-community/SublimeElmLanguageSupport.git
[submodule "sublime/syntaxes/sublimetext-fsharp"]
path = sublime/syntaxes/sublimetext-fsharp
path = sublime/syntaxes/extra/sublimetext-fsharp
url = https://github.com/hoest/sublimetext-fsharp.git
[submodule "sublime/syntaxes/sublime-fish"]
path = sublime/syntaxes/sublime-fish
path = sublime/syntaxes/extra/sublime-fish
url = https://github.com/Phidica/sublime-fish.git
[submodule "sublime/syntaxes/SublimeFortran"]
path = sublime/syntaxes/SublimeFortran
path = sublime/syntaxes/extra/SublimeFortran
url = https://github.com/315234/SublimeFortran.git
[submodule "sublime/syntaxes/GraphQL-SublimeText3"]
path = sublime/syntaxes/GraphQL-SublimeText3
path = sublime/syntaxes/extra/GraphQL-SublimeText3
url = https://github.com/dncrews/GraphQL-SublimeText3.git
[submodule "sublime/syntaxes/Sublime-GenericConfig"]
path = sublime/syntaxes/Sublime-GenericConfig
path = sublime/syntaxes/extra/Sublime-GenericConfig
url = https://github.com/skozlovf/Sublime-GenericConfig.git
[submodule "sublime/syntaxes/sublime-jinja2"]
path = sublime/syntaxes/sublime-jinja2
path = sublime/syntaxes/extra/sublime-jinja2
url = https://github.com/Martin819/sublime-jinja2.git
[submodule "sublime/syntaxes/Julia-sublime"]
path = sublime/syntaxes/Julia-sublime
path = sublime/syntaxes/extra/Julia-sublime
url = https://github.com/JuliaEditorSupport/Julia-sublime.git
[submodule "sublime/syntaxes/LESS-sublime"]
path = sublime/syntaxes/LESS-sublime
path = sublime/syntaxes/extra/LESS-sublime
url = https://github.com/danro/LESS-sublime.git
[submodule "sublime/syntaxes/sublime-purescript-syntax"]
path = sublime/syntaxes/sublime-purescript-syntax
path = sublime/syntaxes/extra/sublime-purescript-syntax
url = https://github.com/tellnobody1/sublime-purescript-syntax.git
[submodule "sublime/syntaxes/SublimeSass"]
path = sublime/syntaxes/SublimeSass
path = sublime/syntaxes/extra/SublimeSass
url = https://github.com/braver/SublimeSass.git
[submodule "sublime/syntaxes/sublime_toml_highlighting"]
path = sublime/syntaxes/sublime_toml_highlighting
path = sublime/syntaxes/extra/sublime_toml_highlighting
url = https://github.com/jasonwilliams/sublime_toml_highlighting.git
[submodule "sublime/syntaxes/vue-syntax-highlight"]
path = sublime/syntaxes/vue-syntax-highlight
path = sublime/syntaxes/extra/vue-syntax-highlight
url = https://github.com/vuejs/vue-syntax-highlight.git
[submodule "sublime/syntaxes/sublime-glsl"]
path = sublime/syntaxes/sublime-glsl
path = sublime/syntaxes/extra/sublime-glsl
url = https://github.com/euler0/sublime-glsl.git
[submodule "sublime/syntaxes/GDScript-sublime"]
path = sublime/syntaxes/GDScript-sublime
path = sublime/syntaxes/extra/GDScript-sublime
url = https://github.com/beefsack/GDScript-sublime.git
[submodule "sublime/syntaxes/extra/sublime-clojure"]
path = sublime/syntaxes/extra/sublime-clojure
url = https://github.com/tonsky/sublime-clojure.git

+ 17
- 1
components/config/examples/generate_sublime.rs View File

@ -10,6 +10,7 @@ use std::iter::FromIterator;
use syntect::dumps::*;
use syntect::highlighting::ThemeSet;
use syntect::parsing::SyntaxSetBuilder;
use std::path::Path;
fn usage_and_exit() -> ! {
println!("USAGE: cargo run --example generate_sublime synpack source-dir newlines.packdump nonewlines.packdump\n
@ -26,10 +27,25 @@ fn main() {
(Some(ref cmd), Some(ref package_dir), Some(ref packpath_newlines)) if cmd == "synpack" => {
let mut builder = SyntaxSetBuilder::new();
builder.add_plain_text_syntax();
match builder.add_from_folder(package_dir, true) {
let base_path = Path::new(&package_dir).to_path_buf();
// First the official Sublime packages
let mut default = base_path.clone();
default.push("Packages");
match builder.add_from_folder(&default, true) {
Ok(_) => (),
Err(e) => println!("Loading error: {:?}", e),
};
// and then the ones we add
let mut extra = base_path.clone();
extra.push("extra");
match builder.add_from_folder(&extra, true) {
Ok(_) => (),
Err(e) => println!("Loading error: {:?}", e),
};
let ss = builder.build();
dump_to_file(&ss, packpath_newlines).unwrap();
let mut syntaxes: HashMap<String, HashSet<String>> = HashMap::new();


+ 3
- 0
docs/content/documentation/content/syntax-highlighting.md View File

@ -36,6 +36,7 @@ Here is a full list of supported languages and their short names:
- C# -> ["cs", "csx"]
- C++ -> ["C", "c++", "cc", "cp", "cpp", "cxx", "h", "h++", "hh", "hpp", "hxx", "inl", "ipp"]
- Clojure -> ["clj", "cljc", "cljs", "edn"]
- ClojureC -> ["boot", "clj", "cljc", "cljs", "cljx"]
- CMake -> ["CMakeLists.txt", "cmake"]
- CMake C Header -> ["h.in"]
- CMake C++ Header -> ["h++.in", "hh.in", "hpp.in", "hxx.in"]
@ -46,6 +47,7 @@ Here is a full list of supported languages and their short names:
- Dart -> ["dart"]
- Diff -> ["diff", "patch"]
- Dockerfile -> ["Dockerfile", "dockerfile"]
- EDN -> ["edn"]
- Elixir -> ["ex", "exs"]
- Elm -> ["elm"]
- Erlang -> ["Emakefile", "emakefile", "erl", "escript", "hrl"]
@ -145,6 +147,7 @@ Here is a full list of supported languages and their short names:
```
Note: due to some issues with the JavaScript syntax, the TypeScript syntax will be used instead.
If
If you want to highlight a language not on this list, please open an issue or a pull request on the [Zola repo](https://github.com/getzola/zola).
Alternatively, the `extra_syntaxes` configuration option can be used to add additional syntax files.


sublime/syntaxes/Assembly x86.sublime-syntax → sublime/syntaxes/extra/Assembly x86.sublime-syntax View File


sublime/syntaxes/CSV.sublime-syntax → sublime/syntaxes/extra/CSV.sublime-syntax View File


sublime/syntaxes/Crystal.sublime-syntax → sublime/syntaxes/extra/Crystal.sublime-syntax View File


sublime/syntaxes/Dart.sublime-syntax → sublime/syntaxes/extra/Dart.sublime-syntax View File


sublime/syntaxes/Docker.tmbundle → sublime/syntaxes/extra/Docker.tmbundle View File


sublime/syntaxes/GDScript-sublime → sublime/syntaxes/extra/GDScript-sublime View File


sublime/syntaxes/GraphQL-SublimeText3 → sublime/syntaxes/extra/GraphQL-SublimeText3 View File


sublime/syntaxes/Handlebars.sublime-syntax → sublime/syntaxes/extra/Handlebars.sublime-syntax View File


sublime/syntaxes/Julia-sublime → sublime/syntaxes/extra/Julia-sublime View File


sublime/syntaxes/Kotlin.sublime-syntax → sublime/syntaxes/extra/Kotlin.sublime-syntax View File


sublime/syntaxes/LESS-sublime → sublime/syntaxes/extra/LESS-sublime View File


sublime/syntaxes/MZN.sublime-syntax → sublime/syntaxes/extra/MZN.sublime-syntax View File


sublime/syntaxes/Nim.sublime-syntax → sublime/syntaxes/extra/Nim.sublime-syntax View File


sublime/syntaxes/Nix.sublime-syntax → sublime/syntaxes/extra/Nix.sublime-syntax View File


sublime/syntaxes/PowerShell.sublime-syntax → sublime/syntaxes/extra/PowerShell.sublime-syntax View File


sublime/syntaxes/Prolog.sublime-syntax → sublime/syntaxes/extra/Prolog.sublime-syntax View File


sublime/syntaxes/README.md → sublime/syntaxes/extra/README.md View File


sublime/syntaxes/Racket.sublime-syntax → sublime/syntaxes/extra/Racket.sublime-syntax View File


sublime/syntaxes/Reason.sublime-syntax → sublime/syntaxes/extra/Reason.sublime-syntax View File


sublime/syntaxes/Stylus.sublime-syntax → sublime/syntaxes/extra/Stylus.sublime-syntax View File


sublime/syntaxes/Sublime-CMakeLists → sublime/syntaxes/extra/Sublime-CMakeLists View File


sublime/syntaxes/Sublime-GenericConfig → sublime/syntaxes/extra/Sublime-GenericConfig View File


sublime/syntaxes/SublimeElmLanguageSupport → sublime/syntaxes/extra/SublimeElmLanguageSupport View File


sublime/syntaxes/SublimeFortran → sublime/syntaxes/extra/SublimeFortran View File


sublime/syntaxes/SublimeSass → sublime/syntaxes/extra/SublimeSass View File


sublime/syntaxes/SublimeTextLinkerSyntax → sublime/syntaxes/extra/SublimeTextLinkerSyntax View File


sublime/syntaxes/Swift.sublime-syntax → sublime/syntaxes/extra/Swift.sublime-syntax View File


sublime/syntaxes/TypeScript.sublime-syntax → sublime/syntaxes/extra/TypeScript.sublime-syntax View File


sublime/syntaxes/TypeScriptReact.sublime-syntax → sublime/syntaxes/extra/TypeScriptReact.sublime-syntax View File


sublime/syntaxes/VimL.sublime-syntax → sublime/syntaxes/extra/VimL.sublime-syntax View File


sublime/syntaxes/awk-sublime → sublime/syntaxes/extra/awk-sublime View File


sublime/syntaxes/elixir-sublime-syntax → sublime/syntaxes/extra/elixir-sublime-syntax View File


sublime/syntaxes/lrc.sublime-syntax → sublime/syntaxes/extra/lrc.sublime-syntax View File


sublime/syntaxes/srt.sublime-syntax → sublime/syntaxes/extra/srt.sublime-syntax View File


+ 1
- 0
sublime/syntaxes/extra/sublime-clojure

@ -0,0 +1 @@
Subproject commit c781793d87e0ebfe30ff9d162779abfe3c8a8a91

sublime/syntaxes/sublime-fish → sublime/syntaxes/extra/sublime-fish View File


sublime/syntaxes/sublime-glsl → sublime/syntaxes/extra/sublime-glsl View File


sublime/syntaxes/sublime-jinja2 → sublime/syntaxes/extra/sublime-jinja2 View File


sublime/syntaxes/sublime-purescript-syntax → sublime/syntaxes/extra/sublime-purescript-syntax View File


sublime/syntaxes/sublime_toml_highlighting → sublime/syntaxes/extra/sublime_toml_highlighting View File


sublime/syntaxes/sublimetext-fsharp → sublime/syntaxes/extra/sublimetext-fsharp View File


sublime/syntaxes/vue-syntax-highlight → sublime/syntaxes/extra/vue-syntax-highlight View File


BIN
sublime/syntaxes/newlines.packdump View File


Loading…
Cancel
Save