From 4966337b1f90547587940350713e873171acc83a Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Fri, 13 Jun 2025 21:40:15 -0400 Subject: [PATCH] Initial slimming of source project --- .github/workflows/go.yml | 34 ----- .pre-commit-config.yaml | 11 -- README.md | 77 ++--------- examples/README.md | 3 - examples/syncat.go | 116 ---------------- ftdetect.go | 22 --- go.mod | 15 +-- go.sum | 10 -- helpers_test.go | 44 ------ highlighter_test.go | 30 ----- syntax_files/go.yaml => syntax/go.go | 11 +- syntax_files/README.md | 11 -- syntax_files/apacheconf.yaml | 59 -------- syntax_files/apt.yaml | 44 ------ syntax_files/asciidoc.yaml | 51 ------- syntax_files/awk.yaml | 44 ------ syntax_files/clojure.yaml | 38 ------ syntax_files/coffeescript.yaml | 29 ---- syntax_files/colortest.yaml | 19 --- syntax_files/conf.yaml | 17 --- syntax_files/conky.yaml | 17 --- syntax_files/crystal.yaml | 64 --------- syntax_files/cython.yaml | 52 -------- syntax_files/df.yaml | 31 ----- syntax_files/dot.yaml | 29 ---- syntax_files/dpkg.yaml | 18 --- syntax_files/du.yaml | 22 --- syntax_files/erb.yaml | 42 ------ syntax_files/gentoo-ebuild.yaml | 48 ------- syntax_files/gentoo-etc-portage.yaml | 23 ---- syntax_files/git-commit.yaml | 28 ---- syntax_files/git-rebase-todo.yaml | 28 ---- syntax_files/glsl.yaml | 26 ---- syntax_files/golo.yaml | 73 ---------- syntax_files/groff.yaml | 30 ----- syntax_files/haml.yaml | 16 --- syntax_files/history.yaml | 23 ---- syntax_files/html4.yaml | 25 ---- syntax_files/ifconfig.yaml | 31 ----- syntax_files/inputrc.yaml | 14 -- syntax_files/ip.yaml | 35 ----- syntax_files/js.yaml | 1 - syntax_files/js.yml | 1 - syntax_files/jsx.yaml | 1 - syntax_files/keymap.yaml | 27 ---- syntax_files/kickstart.yaml | 16 --- syntax_files/ledger.yaml | 14 -- syntax_files/lfe.yaml | 17 --- syntax_files/lilypond.yaml | 26 ---- syntax_files/mail.yaml | 25 ---- syntax_files/markdown.yaml | 50 ------- syntax_files/micro.yaml | 23 ---- syntax_files/mpdconf.yaml | 13 -- syntax_files/nanorc.yaml | 16 --- syntax_files/netstat.yaml | 30 ----- syntax_files/nginx.yaml | 22 --- syntax_files/nim.yaml | 27 ---- syntax_files/nmap.yaml | 39 ------ syntax_files/objc.yaml | 60 --------- syntax_files/ocaml.yaml | 26 ---- syntax_files/pascal.yaml | 45 ------- syntax_files/patch.yaml | 13 -- syntax_files/peg.yaml | 16 --- syntax_files/perl.yaml | 27 ---- syntax_files/perl6.yaml | 27 ---- syntax_files/ping.yaml | 28 ---- syntax_files/pkg-config.yaml | 13 -- syntax_files/po.yaml | 12 -- syntax_files/pony.yaml | 37 ----- syntax_files/pov.yaml | 21 --- syntax_files/privoxy-action.yaml | 14 -- syntax_files/privoxy-config.yaml | 10 -- syntax_files/privoxy-filter.yaml | 12 -- syntax_files/puppet.yaml | 22 --- syntax_files/python2.yaml | 60 --------- syntax_files/reST.yaml | 18 --- syntax_files/route.yaml | 24 ---- syntax_files/rpmlint.yaml | 54 -------- syntax_files/rpmspec.yaml | 43 ------ syntax_files/sed.yaml | 13 -- syntax_files/server-log.yaml | 15 --- syntax_files/sh.yaml | 45 ------- syntax_files/sls.yaml | 15 --- syntax_files/solidity.yaml | 41 ------ syntax_files/sql.yaml | 35 ----- syntax_files/syntax_checker.go | 30 ----- syntax_files/tcl.yaml | 18 --- syntax_files/tcpdump.yaml | 16 --- syntax_files/tex.yaml | 31 ----- syntax_files/traceroute.yaml | 23 ---- syntax_files/vala.yaml | 26 ---- syntax_files/vhdl.yaml | 37 ----- syntax_files/vi.yaml | 32 ----- syntax_files/xresources.yaml | 14 -- syntax_files/yml.yaml | 1 - syntax_files/yum.yaml | 12 -- .../arduino.yaml | 0 {syntax_files => syntax_files_todo}/asm.yaml | 0 {syntax_files => syntax_files_todo}/bash.yaml | 0 {syntax_files => syntax_files_todo}/c++.yaml | 0 {syntax_files => syntax_files_todo}/c.yaml | 0 .../caddyfile.yaml | 0 .../cmake.yaml | 0 {syntax_files => syntax_files_todo}/cpp.yaml | 0 .../csharp.yaml | 0 {syntax_files => syntax_files_todo}/css.yaml | 0 {syntax_files => syntax_files_todo}/d.yaml | 0 {syntax_files => syntax_files_todo}/dart.yaml | 0 {syntax_files => syntax_files_todo}/diff.yaml | 0 .../dockerfile.yaml | 0 {syntax_files => syntax_files_todo}/fish.yaml | 0 .../fortran.yaml | 0 .../gdscript.yaml | 0 .../haskell.yaml | 0 {syntax_files => syntax_files_todo}/html.yaml | 0 .../html5.yaml | 0 {syntax_files => syntax_files_todo}/ini.yaml | 0 {syntax_files => syntax_files_todo}/java.yaml | 0 .../js.yaml | 0 {syntax_files => syntax_files_todo}/json.yaml | 0 {syntax_files => syntax_files_todo}/lisp.yaml | 0 {syntax_files => syntax_files_todo}/lua.yaml | 0 .../makefile.yaml | 0 {syntax_files => syntax_files_todo}/man.yaml | 0 {syntax_files => syntax_files_todo}/php.yaml | 0 .../python3.yaml | 0 {syntax_files => syntax_files_todo}/r.yaml | 0 {syntax_files => syntax_files_todo}/ruby.yaml | 0 {syntax_files => syntax_files_todo}/rust.yaml | 0 .../scala.yaml | 0 .../swift.yaml | 0 .../systemd.yaml | 0 {syntax_files => syntax_files_todo}/toml.yaml | 0 .../typescript.yaml | 0 {syntax_files => syntax_files_todo}/xml.yaml | 0 {syntax_files => syntax_files_todo}/yaml.yaml | 0 {syntax_files => syntax_files_todo}/zsh.yaml | 0 test_inputs/1.c | 6 - test_inputs/1.cmake | 126 ------------------ test_inputs/1.df | 13 -- test_inputs/1.go | 16 --- test_inputs/1.ini | 3 - test_inputs/1.markdown | 69 ---------- test_inputs/1.netstat | 30 ----- test_inputs/1.nmap | 11 -- test_inputs/1.php | 5 - test_inputs/1.ping | 9 -- test_inputs/1.shell | 15 --- test_inputs/1.sql | 18 --- test_inputs/1.traceroute | 16 --- test_inputs/1.xml | 28 ---- test_inputs/1.yaml | 12 -- 152 files changed, 21 insertions(+), 3050 deletions(-) delete mode 100644 .github/workflows/go.yml delete mode 100644 .pre-commit-config.yaml delete mode 100644 examples/README.md delete mode 100644 examples/syncat.go delete mode 100644 ftdetect.go delete mode 100644 helpers_test.go delete mode 100644 highlighter_test.go rename syntax_files/go.yaml => syntax/go.go (93%) delete mode 100644 syntax_files/README.md delete mode 100644 syntax_files/apacheconf.yaml delete mode 100644 syntax_files/apt.yaml delete mode 100644 syntax_files/asciidoc.yaml delete mode 100644 syntax_files/awk.yaml delete mode 100644 syntax_files/clojure.yaml delete mode 100644 syntax_files/coffeescript.yaml delete mode 100644 syntax_files/colortest.yaml delete mode 100644 syntax_files/conf.yaml delete mode 100644 syntax_files/conky.yaml delete mode 100644 syntax_files/crystal.yaml delete mode 100644 syntax_files/cython.yaml delete mode 100644 syntax_files/df.yaml delete mode 100644 syntax_files/dot.yaml delete mode 100644 syntax_files/dpkg.yaml delete mode 100644 syntax_files/du.yaml delete mode 100644 syntax_files/erb.yaml delete mode 100644 syntax_files/gentoo-ebuild.yaml delete mode 100644 syntax_files/gentoo-etc-portage.yaml delete mode 100644 syntax_files/git-commit.yaml delete mode 100644 syntax_files/git-rebase-todo.yaml delete mode 100644 syntax_files/glsl.yaml delete mode 100644 syntax_files/golo.yaml delete mode 100644 syntax_files/groff.yaml delete mode 100644 syntax_files/haml.yaml delete mode 100644 syntax_files/history.yaml delete mode 100644 syntax_files/html4.yaml delete mode 100644 syntax_files/ifconfig.yaml delete mode 100644 syntax_files/inputrc.yaml delete mode 100644 syntax_files/ip.yaml delete mode 120000 syntax_files/js.yaml delete mode 120000 syntax_files/js.yml delete mode 120000 syntax_files/jsx.yaml delete mode 100644 syntax_files/keymap.yaml delete mode 100644 syntax_files/kickstart.yaml delete mode 100644 syntax_files/ledger.yaml delete mode 100644 syntax_files/lfe.yaml delete mode 100644 syntax_files/lilypond.yaml delete mode 100644 syntax_files/mail.yaml delete mode 100644 syntax_files/markdown.yaml delete mode 100644 syntax_files/micro.yaml delete mode 100644 syntax_files/mpdconf.yaml delete mode 100644 syntax_files/nanorc.yaml delete mode 100644 syntax_files/netstat.yaml delete mode 100644 syntax_files/nginx.yaml delete mode 100644 syntax_files/nim.yaml delete mode 100644 syntax_files/nmap.yaml delete mode 100644 syntax_files/objc.yaml delete mode 100644 syntax_files/ocaml.yaml delete mode 100644 syntax_files/pascal.yaml delete mode 100644 syntax_files/patch.yaml delete mode 100644 syntax_files/peg.yaml delete mode 100644 syntax_files/perl.yaml delete mode 100644 syntax_files/perl6.yaml delete mode 100644 syntax_files/ping.yaml delete mode 100644 syntax_files/pkg-config.yaml delete mode 100644 syntax_files/po.yaml delete mode 100644 syntax_files/pony.yaml delete mode 100644 syntax_files/pov.yaml delete mode 100644 syntax_files/privoxy-action.yaml delete mode 100644 syntax_files/privoxy-config.yaml delete mode 100644 syntax_files/privoxy-filter.yaml delete mode 100644 syntax_files/puppet.yaml delete mode 100644 syntax_files/python2.yaml delete mode 100644 syntax_files/reST.yaml delete mode 100644 syntax_files/route.yaml delete mode 100644 syntax_files/rpmlint.yaml delete mode 100644 syntax_files/rpmspec.yaml delete mode 100644 syntax_files/sed.yaml delete mode 100644 syntax_files/server-log.yaml delete mode 100644 syntax_files/sh.yaml delete mode 100644 syntax_files/sls.yaml delete mode 100644 syntax_files/solidity.yaml delete mode 100644 syntax_files/sql.yaml delete mode 100644 syntax_files/syntax_checker.go delete mode 100644 syntax_files/tcl.yaml delete mode 100644 syntax_files/tcpdump.yaml delete mode 100644 syntax_files/tex.yaml delete mode 100644 syntax_files/traceroute.yaml delete mode 100644 syntax_files/vala.yaml delete mode 100644 syntax_files/vhdl.yaml delete mode 100644 syntax_files/vi.yaml delete mode 100644 syntax_files/xresources.yaml delete mode 120000 syntax_files/yml.yaml delete mode 100644 syntax_files/yum.yaml rename {syntax_files => syntax_files_todo}/arduino.yaml (100%) rename {syntax_files => syntax_files_todo}/asm.yaml (100%) rename {syntax_files => syntax_files_todo}/bash.yaml (100%) rename {syntax_files => syntax_files_todo}/c++.yaml (100%) rename {syntax_files => syntax_files_todo}/c.yaml (100%) rename {syntax_files => syntax_files_todo}/caddyfile.yaml (100%) rename {syntax_files => syntax_files_todo}/cmake.yaml (100%) rename {syntax_files => syntax_files_todo}/cpp.yaml (100%) rename {syntax_files => syntax_files_todo}/csharp.yaml (100%) rename {syntax_files => syntax_files_todo}/css.yaml (100%) rename {syntax_files => syntax_files_todo}/d.yaml (100%) rename {syntax_files => syntax_files_todo}/dart.yaml (100%) rename {syntax_files => syntax_files_todo}/diff.yaml (100%) rename {syntax_files => syntax_files_todo}/dockerfile.yaml (100%) rename {syntax_files => syntax_files_todo}/fish.yaml (100%) rename {syntax_files => syntax_files_todo}/fortran.yaml (100%) rename {syntax_files => syntax_files_todo}/gdscript.yaml (100%) rename {syntax_files => syntax_files_todo}/haskell.yaml (100%) rename {syntax_files => syntax_files_todo}/html.yaml (100%) rename {syntax_files => syntax_files_todo}/html5.yaml (100%) rename {syntax_files => syntax_files_todo}/ini.yaml (100%) rename {syntax_files => syntax_files_todo}/java.yaml (100%) rename syntax_files/javascript.yaml => syntax_files_todo/js.yaml (100%) rename {syntax_files => syntax_files_todo}/json.yaml (100%) rename {syntax_files => syntax_files_todo}/lisp.yaml (100%) rename {syntax_files => syntax_files_todo}/lua.yaml (100%) rename {syntax_files => syntax_files_todo}/makefile.yaml (100%) rename {syntax_files => syntax_files_todo}/man.yaml (100%) rename {syntax_files => syntax_files_todo}/php.yaml (100%) rename {syntax_files => syntax_files_todo}/python3.yaml (100%) rename {syntax_files => syntax_files_todo}/r.yaml (100%) rename {syntax_files => syntax_files_todo}/ruby.yaml (100%) rename {syntax_files => syntax_files_todo}/rust.yaml (100%) rename {syntax_files => syntax_files_todo}/scala.yaml (100%) rename {syntax_files => syntax_files_todo}/swift.yaml (100%) rename {syntax_files => syntax_files_todo}/systemd.yaml (100%) rename {syntax_files => syntax_files_todo}/toml.yaml (100%) rename {syntax_files => syntax_files_todo}/typescript.yaml (100%) rename {syntax_files => syntax_files_todo}/xml.yaml (100%) rename {syntax_files => syntax_files_todo}/yaml.yaml (100%) rename {syntax_files => syntax_files_todo}/zsh.yaml (100%) delete mode 100644 test_inputs/1.c delete mode 100644 test_inputs/1.cmake delete mode 100644 test_inputs/1.df delete mode 100644 test_inputs/1.go delete mode 100644 test_inputs/1.ini delete mode 100644 test_inputs/1.markdown delete mode 100644 test_inputs/1.netstat delete mode 100644 test_inputs/1.nmap delete mode 100644 test_inputs/1.php delete mode 100644 test_inputs/1.ping delete mode 100644 test_inputs/1.shell delete mode 100644 test_inputs/1.sql delete mode 100644 test_inputs/1.traceroute delete mode 100644 test_inputs/1.xml delete mode 100644 test_inputs/1.yaml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml deleted file mode 100644 index 2188472..0000000 --- a/.github/workflows/go.yml +++ /dev/null @@ -1,34 +0,0 @@ ---- -name: Go - -on: [push, pull_request] - -defaults: - run: - shell: 'bash -Eeuo pipefail -x {0}' - -jobs: - - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: '1.23.0' - - - name: Build - run: go build -v - - name: Test - run: | - set -e - go install github.com/go-critic/go-critic/cmd/gocritic@latest - go install golang.org/x/tools/cmd/goimports@latest - go install golang.org/x/lint/golint@latest - go install github.com/gordonklaus/ineffassign@latest - pip install pre-commit - pre-commit install - pre-commit run --all-files - go test -v diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index 36a69ca..0000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,11 +0,0 @@ -repos: - - repo: https://github.com/jessp01/pre-commit-golang.git - rev: v0.5.5 - hooks: - - id: go-fmt - - id: go-imports - #- id: go-vet - - id: go-lint - - id: go-critic - - id: go-ineffassign - - id: shellcheck diff --git a/README.md b/README.md index 6b4a788..441db54 100644 --- a/README.md +++ b/README.md @@ -1,54 +1,38 @@ # Highlight -[![CI][badge-build]][build] -[![GoDoc][go-docs-badge]][go-docs] -[![GoReportCard][go-report-card-badge]][go-report-card] -[![License][badge-license]][license] - -`gohighlight` is a syntax highlighter of programming languages, config formats and UNIX commands. -It allows you to pass in a string and get back all the information you need to properly highlight it.. -This repo includes over a 100 different lexers and contributions are most welcome:) - -See [Revising and adding new lexers](#revising-and-adding-new-lexers) for more info. +`gohighlight-embedded` is a syntax highlighter of programming languages and config formats. +It allows you to pass in a string and get back all the information you need to properly highlight it. +This repo includes lexers for many common languages. ## A note about this repo -This is a fork of [zyedidia/highlight](https://github.com/zyedidia/highlight). -I originally submitted pulls against it but it seems to be unmaintained (last commit was in 2020). +This is a fork of [jessp01/gohighlight](https://github.com/jessp01/gohighlight). -Below is a recap of the main changes made since: -- Helper method to parse syntax files -- Better exception handling -- Corrections/additions to existing lexers -- Addition of new lexers -- Revisions to the code examples -- Basic unit tests (still more to do on that) +It is meant to be a more minimal version with the syntax files embedded in the Go code (no external .yaml files to load). ## Installation ```sh -$ go get github.com/jessp01/gohighlight +$ go get github.com/rwinkhart/gohighlight-embedded ``` Be sure to point your code to the correct path of `syntax_files`. ## Basic Usage -Below is a simple example for highlighting a string (a Go snippet in this case). +Below is a simple example for highlighting a string (a Go snippet in this case). It uses `github.com/fatih/color` to actually colorize the output to the console. -**NOTE: A more comprehensive example is [zaje](https://github.com/jessp01/zaje); a Syntax highlighter to cover all your shell needs (it can replace `cat` and `tail`).** - ```go package main import ( "fmt" - "io/ioutil" "strings" "github.com/fatih/color" - "github.com/jessp01/gohighlight" + "github.com/rwinkhart/gohighlight-embedded" + "github.com/rwinkhart/gohighlight-embedded/syntax" ) func main() { @@ -64,11 +48,7 @@ func helloWorld() { // Load the go syntax file // Make sure that the syntax_files directory is in the current directory - syntaxFile, lerr := ioutil.ReadFile("highlight/syntax_files/go.yaml") - if lerr != nil { - fmt.Println(lerr) - return - } + syntaxFile := syntax.GetGo() // Parse it into a `*highlight.Def` syntaxDef, err := highlight.ParseDef(syntaxFile) @@ -154,40 +134,3 @@ func helloWorld() { } } ``` - -If you would like to automatically detect the file type based on the filename, you can use the `DetectFiletype()` function: - -```go -// Name of the file -filename := ... -// The first line of the file (needed to check the filetype by header: e.g. `#!/bin/bash` means shell) -firstLine := ... - -// Parse all the syntax files in an array with type []*highlight.Def -var defs []*highlight.Def -... - -def := highlight.DetectFiletype(defs, filename, firstLine) -fmt.Println("Filetype is", def.FileType) -``` - -## Revising and adding new lexers - -Lexers are `YAML` files that live under the [syntax\_files](./syntax_files) dir. - -They can be loaded individually: -```go - syntaxFile, lerr := ioutil.ReadFile("highlight/syntax_files/go.yaml") - syntaxDef, err := highlight.ParseDef(syntaxFile) -``` - -Or, you can scan the dir and load them all using the `highlight.ParseSyntaxFiles(syn_dir, &defs)()` helper function. - -[license]: ./LICENSE -[badge-license]: https://img.shields.io/github/license/jessp01/gohighlight.svg -[go-docs-badge]: https://godoc.org/github.com/jessp01/gohighlight?status.svg -[go-docs]: https://godoc.org/github.com/jessp01/gohighlight -[go-report-card-badge]: https://goreportcard.com/badge/github.com/jessp01/gohighlight -[go-report-card]: https://goreportcard.com/report/github.com/jessp01/gohighlight -[badge-build]: https://github.com/jessp01/gohighlight/actions/workflows/go.yml/badge.svg -[build]: https://github.com/jessp01/gohighlight/actions/workflows/go.yml diff --git a/examples/README.md b/examples/README.md deleted file mode 100644 index 31b43ee..0000000 --- a/examples/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Examples - -These examples will find the `syntax_files` directory by using your `GOPATH` environment variable. diff --git a/examples/syncat.go b/examples/syncat.go deleted file mode 100644 index fb3c229..0000000 --- a/examples/syncat.go +++ /dev/null @@ -1,116 +0,0 @@ -package main - -import ( - "bytes" - "fmt" - "io/ioutil" - "log" - "os" - "strings" - - "github.com/fatih/color" - highlight "github.com/jessp01/gohighlight" -) - -func main() { - if len(os.Args) <= 1 { - fmt.Println("No input file") - return - } - - gopath := os.Getenv("GOPATH") - - var synDir string - if gopath == "" { - synDir = os.Getenv("HOME") + "/.config/zaje/syntax_files" - } else { - synDir = gopath + "/src/github.com/jessp01/gohighlight/syntax_files" - } - - var defs []*highlight.Def - warnings, err := highlight.ParseSyntaxFiles(synDir, &defs) - if err != nil { - log.Fatal(err) - } - - // it's up to you what to do with the warnings. You can print them or ignore them - fmt.Println(warnings) - - highlight.ResolveIncludes(defs) - - fileSrc, _ := ioutil.ReadFile(os.Args[1]) - def := highlight.DetectFiletype(defs, os.Args[1], bytes.Split(fileSrc, []byte("\n"))[0]) - - if def == nil { - fmt.Println(string(fileSrc)) - return - } - - h := highlight.NewHighlighter(def) - - matches := h.HighlightString(string(fileSrc)) - - lines := strings.Split(string(fileSrc), "\n") - for lineN, l := range lines { - colN := 0 - for _, c := range l { - if group, ok := matches[lineN][colN]; ok { - switch group { - case highlight.Groups["statement"]: - fallthrough - case highlight.Groups["green"]: - color.Set(color.FgGreen) - - case highlight.Groups["identifier"]: - fallthrough - case highlight.Groups["blue"]: - color.Set(color.FgHiBlue) - - case highlight.Groups["preproc"]: - color.Set(color.FgHiRed) - - case highlight.Groups["special"]: - fallthrough - case highlight.Groups["red"]: - color.Set(color.FgRed) - - case highlight.Groups["constant.string"]: - fallthrough - case highlight.Groups["constant"]: - fallthrough - case highlight.Groups["constant.number"]: - fallthrough - case highlight.Groups["cyan"]: - color.Set(color.FgCyan) - - case highlight.Groups["constant.specialChar"]: - fallthrough - case highlight.Groups["magenta"]: - color.Set(color.FgHiMagenta) - - case highlight.Groups["type"]: - fallthrough - case highlight.Groups["yellow"]: - color.Set(color.FgYellow) - - case highlight.Groups["comment"]: - fallthrough - case highlight.Groups["high.green"]: - color.Set(color.FgHiGreen) - default: - color.Unset() - } - } - fmt.Print(string(c)) - colN++ - } - if group, ok := matches[lineN][colN]; ok { - if group == highlight.Groups["default"] || group == highlight.Groups[""] { - color.Unset() - } - } - - color.Unset() - fmt.Print("\n") - } -} diff --git a/ftdetect.go b/ftdetect.go deleted file mode 100644 index e04130f..0000000 --- a/ftdetect.go +++ /dev/null @@ -1,22 +0,0 @@ -package highlight - -// DetectFiletype will use the list of syntax definitions provided and the filename and first line of the file -// to determine the filetype of the file -// It will return the corresponding syntax definition for the filetype -func DetectFiletype(defs []*Def, filename string, firstLine []byte) *Def { - for _, d := range defs { - if d.ftdetect[0].MatchString(filename) { - return d - } - if len(d.ftdetect) > 1 { - if d.ftdetect[1].MatchString(string(firstLine)) { - return d - } - } - } - - emptyDef := new(Def) - emptyDef.FileType = "Unknown" - emptyDef.rules = new(rules) - return emptyDef -} diff --git a/go.mod b/go.mod index cade106..31c73d9 100644 --- a/go.mod +++ b/go.mod @@ -1,14 +1,5 @@ -module github.com/jessp01/gohighlight +module github.com/rwinkhart/gohighlight-embedded -go 1.19 +go 1.24.4 -require ( - github.com/fatih/color v1.15.0 - gopkg.in/yaml.v2 v2.4.0 -) - -require ( - github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.17 // indirect - golang.org/x/sys v0.6.0 // indirect -) +require gopkg.in/yaml.v2 v2.4.0 diff --git a/go.sum b/go.sum index b069e00..dd0bc19 100644 --- a/go.sum +++ b/go.sum @@ -1,13 +1,3 @@ -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= diff --git a/helpers_test.go b/helpers_test.go deleted file mode 100644 index 84bd7cf..0000000 --- a/helpers_test.go +++ /dev/null @@ -1,44 +0,0 @@ -package highlight - -import ( - "bytes" - "io/ioutil" - "strings" - "testing" -) - -func getDefs(t *testing.T, filename string, data []byte, highlightLexer string) *Def { - var def *Def - synDir := "./syntax_files" - - var defs []*Def - warnings, lerr := ParseSyntaxFiles(synDir, &defs) - if lerr != nil { - t.Errorf("Couldn't get defs from '%s', error: %v\n", synDir, lerr) - } - if len(warnings) > 0 { - t.Errorf("Parsing ended with warnings: '%s'\n", strings.Join(warnings, ";")) - } - - ResolveIncludes(defs) - - // Always try to auto detect the best lexer:was - if def == nil { - def = DetectFiletype(defs, filename, bytes.Split(data, []byte("\n"))[0]) - } - - // if a specific lexer was requested by setting the ENV var, try to load it - if highlightLexer != "" { - syntaxFile, lerr := ioutil.ReadFile(synDir + "/" + highlightLexer + ".yaml") - if lerr == nil { - // Parse it into a `*highlight.Def` - def, _ = ParseDef(syntaxFile) - } - } - - if def == nil { - t.Errorf("Found no defs for '%s'\n", filename) - } - - return def -} diff --git a/highlighter_test.go b/highlighter_test.go deleted file mode 100644 index af6fdb2..0000000 --- a/highlighter_test.go +++ /dev/null @@ -1,30 +0,0 @@ -package highlight - -import ( - "fmt" - "io/ioutil" - "path/filepath" - "strings" - "testing" -) - -func TestInputs(t *testing.T) { - - testInputsDir := "./test_inputs/*" - files, err := filepath.Glob(testInputsDir) - if err != nil { - t.Errorf("Couldn't open '%s', error: %v\n", testInputsDir, err) - } - for _, filename := range files { - ext := strings.Split(filename, ".") - data, _ := ioutil.ReadFile(filename) - fmt.Println("Testing def detection for " + filename) - def := getDefs(t, filename, data, "") - exp := ext[len(ext)-1] - if def.FileType != exp { - t.Errorf("\nInput [%#v]\nExpected[%#v]\nGot [%#v]\n", - // string(data), exp, def.FileType) - filename, exp, def.FileType) - } - } -} diff --git a/syntax_files/go.yaml b/syntax/go.go similarity index 93% rename from syntax_files/go.yaml rename to syntax/go.go index 4ec3126..817ec09 100644 --- a/syntax_files/go.yaml +++ b/syntax/go.go @@ -1,4 +1,7 @@ -filetype: go +package syntax + +func GetGo() []byte { + return []byte(`filetype: go detect: filename: "\\.go$" @@ -48,8 +51,8 @@ rules: - constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})" - constant.string: - start: "`" - end: "`" + start: "` + "`" + `" + end: "` + "`" + `" rules: [] - comment: @@ -63,3 +66,5 @@ rules: end: "\\*/" rules: - todo: "(TODO|XXX|FIXME):?" +`) +} diff --git a/syntax_files/README.md b/syntax_files/README.md deleted file mode 100644 index f2ddef4..0000000 --- a/syntax_files/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Syntax Files - -Here are highlights's syntax files. - -Each yaml file specifies how to detect the filetype based on file extension or headers (first line of the file). -Then there are patterns and regions linked to highlight groups which tell micro how to highlight that filetype. - -Making your own syntax files is very simple. I recommend you check the file after you are finished with the -[`syntax_checker.go`](./syntax_checker.go) program (located in this directory). Just place your yaml syntax -file in the current directory and run `go run syntax_checker.go` and it will check every file. If there are no -errors it will print `No issues!`. diff --git a/syntax_files/apacheconf.yaml b/syntax_files/apacheconf.yaml deleted file mode 100644 index fe5b9a4..0000000 --- a/syntax_files/apacheconf.yaml +++ /dev/null @@ -1,59 +0,0 @@ -filetype: apacheconf - -detect: - filename: "httpd\\.conf|apache.*\\.conf|mime\\.types|vhosts\\.d\\\\*|\\.htaccess" - -rules: - - identifier: "(AcceptMutex|AcceptPathInfo|AccessFileName|Action|AddAlt|AddAltByEncoding|AddAltByType|AddCharset|AddDefaultCharset|AddDescription|AddEncoding)" - - identifier: "(AddHandler|AddIcon|AddIconByEncoding|AddIconByType|AddInputFilter|AddLanguage|AddModuleInfo|AddOutputFilter|AddOutputFilterByType|AddType|Alias|AliasMatch)" - - identifier: "(Allow|AllowCONNECT|AllowEncodedSlashes|AllowOverride|Anonymous|Anonymous_Authoritative|Anonymous_LogEmail|Anonymous_MustGiveEmail|Anonymous_NoUserID)" - - identifier: "(Anonymous_VerifyEmail|AssignUserID|AuthAuthoritative|AuthDBMAuthoritative|AuthDBMGroupFile|AuthDBMType|AuthDBMUserFile|AuthDigestAlgorithm)" - - identifier: "(AuthDigestDomain|AuthDigestFile|AuthDigestGroupFile|AuthDigestNcCheck|AuthDigestNonceFormat|AuthDigestNonceLifetime|AuthDigestQop|AuthDigestShmemSize)" - - identifier: "(AuthGroupFile|AuthLDAPAuthoritative|AuthLDAPBindDN|AuthLDAPBindPassword|AuthLDAPCharsetConfig|AuthLDAPCompareDNOnServer|AuthLDAPDereferenceAliases)" - - identifier: "(AuthLDAPEnabled|AuthLDAPFrontPageHack|AuthLDAPGroupAttribute|AuthLDAPGroupAttributeIsDN|AuthLDAPRemoteUserIsDN|AuthLDAPUrl|AuthName|AuthType|AuthUserFile)" - - identifier: "(BrowserMatch|BrowserMatchNoCase|BS2000Account|BufferedLogs|CacheDefaultExpire|CacheDirLength|CacheDirLevels|CacheDisable|CacheEnable|CacheExpiryCheck)" - - identifier: "(CacheFile|CacheForceCompletion|CacheGcClean|CacheGcDaily|CacheGcInterval|CacheGcMemUsage|CacheGcUnused|CacheIgnoreCacheControl|CacheIgnoreHeaders)" - - identifier: "(CacheIgnoreNoLastMod|CacheLastModifiedFactor|CacheMaxExpire|CacheMaxFileSize|CacheMinFileSize|CacheNegotiatedDocs|CacheRoot|CacheSize|CacheTimeMargin)" - - identifier: "(CGIMapExtension|CharsetDefault|CharsetOptions|CharsetSourceEnc|CheckSpelling|ChildPerUserID|ContentDigest|CookieDomain|CookieExpires|CookieLog|CookieName)" - - identifier: "(CookieStyle|CookieTracking|CoreDumpDirectory|CustomLog|Dav|DavDepthInfinity|DavLockDB|DavMinTimeout|DefaultIcon|DefaultLanguage|DefaultType)" - - identifier: "(DeflateBufferSize|DeflateCompressionLevel|DeflateFilterNote|DeflateMemLevel|DeflateWindowSize|Deny|Directory|DirectoryIndex|DirectoryMatch|DirectorySlash)" - - identifier: "(DocumentRoot|DumpIOInput|DumpIOOutput|EnableExceptionHook|EnableMMAP|EnableSendfile|ErrorDocument|ErrorLog|Example|ExpiresActive|ExpiresByType)" - - identifier: "(ExpiresDefault|ExtendedStatus|ExtFilterDefine|ExtFilterOptions|FileETag|Files|FilesMatch|ForceLanguagePriority|ForceType|ForensicLog|Group|Header)" - - identifier: "(HeaderName|HostnameLookups|IdentityCheck|IfDefine|IfModule|IfVersion|ImapBase|ImapDefault|ImapMenu|Include|IndexIgnore|IndexOptions|IndexOrderDefault)" - - identifier: "(ISAPIAppendLogToErrors|ISAPIAppendLogToQuery|ISAPICacheFile|ISAPIFakeAsync|ISAPILogNotSupported|ISAPIReadAheadBuffer|KeepAlive|KeepAliveTimeout)" - - identifier: "(LanguagePriority|LDAPCacheEntries|LDAPCacheTTL|LDAPConnectionTimeout|LDAPOpCacheEntries|LDAPOpCacheTTL|LDAPSharedCacheFile|LDAPSharedCacheSize)" - - identifier: "(LDAPTrustedCA|LDAPTrustedCAType|Limit|LimitExcept|LimitInternalRecursion|LimitRequestBody|LimitRequestFields|LimitRequestFieldSize|LimitRequestLine)" - - identifier: "(LimitXMLRequestBody|Listen|ListenBackLog|LoadFile|LoadModule|Location|LocationMatch|LockFile|LogFormat|LogLevel|MaxClients|MaxKeepAliveRequests)" - - identifier: "(MaxMemFree|MaxRequestsPerChild|MaxRequestsPerThread|MaxSpareServers|MaxSpareThreads|MaxThreads|MaxThreadsPerChild|MCacheMaxObjectCount|MCacheMaxObjectSize)" - - identifier: "(MCacheMaxStreamingBuffer|MCacheMinObjectSize|MCacheRemovalAlgorithm|MCacheSize|MetaDir|MetaFiles|MetaSuffix|MimeMagicFile|MinSpareServers|MinSpareThreads)" - - identifier: "(MMapFile|ModMimeUsePathInfo|MultiviewsMatch|NameVirtualHost|NoProxy|NumServers|NWSSLTrustedCerts|NWSSLUpgradeable|Options|Order|PassEnv|PidFile)" - - identifier: "(ProtocolEcho|Proxy|ProxyBadHeader|ProxyBlock|ProxyDomain|ProxyErrorOverride|ProxyIOBufferSize|ProxyMatch|ProxyMaxForwards|ProxyPass|ProxyPassReverse)" - - identifier: "(ProxyPreserveHost|ProxyReceiveBufferSize|ProxyRemote|ProxyRemoteMatch|ProxyRequests|ProxyTimeout|ProxyVia|ReadmeName|Redirect|RedirectMatch)" - - identifier: "(RedirectPermanent|RedirectTemp|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|RequestHeader)" - - identifier: "(Require|RewriteBase|RewriteCond|RewriteEngine|RewriteLock|RewriteLog|RewriteLogLevel|RewriteMap|RewriteOptions|RewriteRule|RLimitCPU|RLimitMEM|RLimitNPROC)" - - identifier: "(Satisfy|ScoreBoardFile|Script|ScriptAlias|ScriptAliasMatch|ScriptInterpreterSource|ScriptLog|ScriptLogBuffer|ScriptLogLength|ScriptSock|SecureListen)" - - identifier: "(SendBufferSize|ServerAdmin|ServerAlias|ServerLimit|ServerName|ServerPath|ServerRoot|ServerSignature|ServerTokens|SetEnv|SetEnvIf|SetEnvIfNoCase|SetHandler)" - - identifier: "(SetInputFilter|SetOutputFilter|SSIEndTag|SSIErrorMsg|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|SSLCACertificateFile|SSLCACertificatePath)" - - identifier: "(SSLCARevocationFile|SSLCARevocationPath|SSLCertificateChainFile|SSLCertificateFile|SSLCertificateKeyFile|SSLCipherSuite|SSLEngine|SSLMutex|SSLOptions)" - - identifier: "(SSLPassPhraseDialog|SSLProtocol|SSLProxyCACertificateFile|SSLProxyCACertificatePath|SSLProxyCARevocationFile|SSLProxyCARevocationPath|SSLProxyCipherSuite)" - - identifier: "(SSLProxyEngine|SSLProxyMachineCertificateFile|SSLProxyMachineCertificatePath|SSLProxyProtocol|SSLProxyVerify|SSLProxyVerifyDepth|SSLRandomSeed|SSLRequire)" - - identifier: "(SSLRequireSSL|SSLSessionCache|SSLSessionCacheTimeout|SSLUserName|SSLVerifyClient|SSLVerifyDepth|StartServers|StartThreads|SuexecUserGroup|ThreadLimit)" - - identifier: "(ThreadsPerChild|ThreadStackSize|TimeOut|TraceEnable|TransferLog|TypesConfig|UnsetEnv|UseCanonicalName|User|UserDir|VirtualDocumentRoot)" - - identifier: "(VirtualDocumentRootIP|VirtualHost|VirtualScriptAlias|VirtualScriptAliasIP|Win32DisableAcceptEx|XBitHack)" - - symbol.tag: "<[^>]+>" - - identifier: ")" - - - constant.string: - start: "\"" - end: "\"" - skip: "\\\\." - rules: - - constant.specialChar: "\\\\." - - - comment: - start: "#" - end: "$" - rules: - - todo: "(TODO|XXX|FIXME):?" - diff --git a/syntax_files/apt.yaml b/syntax_files/apt.yaml deleted file mode 100644 index 81c1807..0000000 --- a/syntax_files/apt.yaml +++ /dev/null @@ -1,44 +0,0 @@ -filetype: apt - -detect: - filename: "\\.apt" - -rules: - - constant.number: "(^[D|+].*)" - - preproc: "[0-9]+,?[0-9]*" - - preproc: "\\\\." - - preproc: "^(un.*)" - - constant: "^(ii.*)" - - comment: "^(rc.*)" - - type: "(i386|i486|i586|i686|amd64|\\|athlon|ia64|alpha|alphaev5|alphaev56|alphapca56|alphaev6|alphaev67|sparc|sparcv9|sparc64armv3l|armv4b|armv4lm|ips|mipsel|ppc|iseries|ppcpseries|ppc64|m68k|m68kmint|Sgi|rs6000|i370|s390x|s390|noarch)" - - comment: "(^|[[:space:]])#([^{].*)?$" - - preproc: "[[:space:]]+$" - - indent-char: " + +| + +" - - statement: "[[:space:]]([0-9~:.]{2,}[-+:.0-9a-z~]+)[[:space:]]" - - type: "(^| )!!(binary|bool|float|int|map|null|omap|seq|set|str) " - - constant: "\\b(YES|yes|Y|y|ON|on|NO|no|N|n|OFF|off)\\b" - - constant: "\\b(true|false)\\b" - - statement: "(:[[:space:]]|\\[|\\]|:[[:space:]]+[|>]|^[[:space:]]*- )" - - identifier: "[[:space:]][\\*&][A-Za-z0-9]+" - - type: "[-.\\w]+:" - - statement: ":" - - special: "(^---|^\\.\\.\\.|^%YAML|^%TAG)" - - - constant.string: - start: "\"" - end: "\"" - skip: "\\\\." - rules: - - constant.specialChar: "\\\\." - - - constant.string: - start: "'" - end: "'" - skip: "\\\\." - rules: - - constant.specialChar: "\\\\." - - - comment: - start: "#" - end: "$" - rules: [] diff --git a/syntax_files/asciidoc.yaml b/syntax_files/asciidoc.yaml deleted file mode 100644 index fcf5f28..0000000 --- a/syntax_files/asciidoc.yaml +++ /dev/null @@ -1,51 +0,0 @@ -filetype: asciidoc - -detect: - filename: "\\.(asc|asciidoc|adoc)$" - -rules: - # main header - - preproc: "^====+$" - # h1 - - statement: "^==[[:space:]].*$" - - statement: "^----+$" - # h2 - - symbol: "^===[[:space:]].*$" - - symbol: "^~~~~+$" - # h4 - - type: "^====[[:space:]].*$" - - type: "^\\^\\^\\^\\^+$" - # h5 - - constant: "^=====[[:space:]].*$" - - constant: "^\\+\\+\\+\\++$" - - # attributes - - type.keyword: ":.*:" - - identifier.macro: "\\{[a-z0-9]*\\}" - - identifier: "\\\\\\{[a-z0-9]*\\}" - - identifier: "\\+\\+\\+\\{[a-z0-9]*\\}\\+\\+\\+" - - # Paragraph Title - - statement: "^\\..*$" - - # source - - identifier: "^\\[(source,.+|NOTE|TIP|IMPORTANT|WARNING|CAUTION)\\]" - - # Other markup - - constant.string: ".*[[:space:]]\\+$" - - constant.string: "_[^_]+_" - - constant.string: "\\*[^\\*]+\\*" - - constant.string: "\\+[^\\+]+\\+" - - constant.string: "`[^`]+`" - - constant.string: "\\^[^\\^]+\\^" - - constant.string: "~[^~]+~" - - constant.string: "'[^']+'" - - - constant: "`{1,2}[^']+'{1,2}" - - # bullets - - symbol: "^[[:space:]]*[\\*\\.-]{1,5}[[:space:]]" - - # anchors - - "bold default": "\\[\\[.*\\]\\]" - - "bold default": "<<.*>>" diff --git a/syntax_files/awk.yaml b/syntax_files/awk.yaml deleted file mode 100644 index ff3f698..0000000 --- a/syntax_files/awk.yaml +++ /dev/null @@ -1,44 +0,0 @@ -filetype: awk - -detect: - filename: "\\.awk$" - header: "^#!.*bin/(env +)?awk( |$)" - -rules: - - preproc: "\\$[A-Za-z0-9_!@#$*?\\-]+" - - preproc: "\\b(ARGC|ARGIND|ARGV|BINMODE|CONVFMT|ENVIRON|ERRNO|FIELDWIDTHS)\\b" - - preproc: "\\b(FILENAME|FNR|FS|IGNORECASE|LINT|NF|NR|OFMT|OFS|ORS)\\b" - - preproc: "\\b(PROCINFO|RS|RT|RSTART|RLENGTH|SUBSEP|TEXTDOMAIN)\\b" - - identifier.class: "\\b(function|extension|BEGIN|END)\\b" - - symbol.operator: "[\\-+*/%^|!=&<>?;:]|\\\\|\\[|\\]" - - statement: "\\b(for|if|while|do|else|in|delete|exit)\\b" - - special: "\\b(break|continue|return)\\b" - - statement: "\\b(close|getline|next|nextfile|print|printf|system|fflush)\\b" - - statement: "\\b(atan2|cos|exp|int|log|rand|sin|sqrt|srand)\\b" - - statement: "\\b(asort|asorti|gensub|gsub|index|length|match)\\b" - - statement: "\\b(split|sprintf|strtonum|sub|substr|tolower|toupper)\\b" - - statement: "\\b(mktime|strftime|systime)\\b" - - statement: "\\b(and|compl|lshift|or|rshift|xor)\\b" - - statement: "\\b(bindtextdomain|dcgettext|dcngettext)\\b" - - special: "/.*[^\\\\]/" - - - constant.string: - start: "\"" - end: "\"" - skip: "\\\\." - rules: - - constant.specialChar: "\\\\." - - - constant.string: - start: "'" - end: "'" - skip: "\\\\." - rules: - - constant.specialChar: "\\\\." - - - comment: - start: "#" - end: "$" - rules: - - todo: "(TODO|XXX|FIXME):?" - diff --git a/syntax_files/clojure.yaml b/syntax_files/clojure.yaml deleted file mode 100644 index 588b43c..0000000 --- a/syntax_files/clojure.yaml +++ /dev/null @@ -1,38 +0,0 @@ -filetype: clojure - -detect: - filename: "\\.(clj)$" - -rules: - - # Constants - - constant.bool: "\\b(true|false)\\b" - - constant.macro: "\\b(nil)\\b" - # Valid numbers - - constant.number: "[\\-]?[0-9]+?\\b" - - constant.number: "0x[0-9][A-Fa-f]+?\\b" - - constant.number: "[\\-]?(3[0-6]|2[0-9]|1[0-9]|[2-9])r[0-9A-Z]+?\\b" - # Invalid numbers - - error: "[\\-]?([4-9][0-9]|3[7-9]|1|0)r[0-9A-Z]+?\\b" - - # Symbols - - symbol.operator: "[=>+\\-*/'?]" - - # Types/casting - - type: "\\b(byte|short|(big)?int(eger)?|long|float|num|bigdec|rationalize)\\b" - - # String highlighting - - constant.string: - start: "\"" - end: "\"" - skip: "\\\\." - rules: - - constant.specialChar: "(\\\\u[0-9A-fa-f]{4,4}|\\\\newline|\\\\space|\\\\tab|\\\\formfeed|\\\\backspace|\\\\return|\\\\.)" - - # Comments - - comment: - start: ";" - end: "$" - rules: - - todo: "(TODO|XXX|FIXME):?" - diff --git a/syntax_files/coffeescript.yaml b/syntax_files/coffeescript.yaml deleted file mode 100644 index d9b3748..0000000 --- a/syntax_files/coffeescript.yaml +++ /dev/null @@ -1,29 +0,0 @@ -filetype: coffeescript - -detect: - filename: "\\.coffee$" - -rules: - - symbol.operator: "[!&|=/*+-<>]|\\b(and|or|is|isnt|not)\\b" - - identifier.class: "([A-Za-z_][A-Za-z0-9_]*:[[:space:]]*(->|\\()|->)" - - symbol.brackets: "[()]" - - statement: "\\b(for|of|continue|break|isnt|null|unless|this|else|if|return)\\b" - - statement: "\\b(try|catch|finally|throw|new|delete|typeof|in|instanceof)\\b" - - statement: "\\b(debugger|switch|while|do|class|extends|super)\\b" - - statement: "\\b(undefined|then|unless|until|loop|of|by|when)\\b" - - constant.bool: "\\b(true|false|yes|no|on|off)\\b" - - identifier: "@[A-Za-z0-9_]*" - - - constant.string: - start: "\"" - end: "\"" - skip: "\\\\." - rules: - - constant.specialChar: "\\\\." - - - comment: - start: "#" - end: "$" - rules: - - todo: "(TODO|XXX|FIXME):?" - diff --git a/syntax_files/colortest.yaml b/syntax_files/colortest.yaml deleted file mode 100644 index c08dc47..0000000 --- a/syntax_files/colortest.yaml +++ /dev/null @@ -1,19 +0,0 @@ -filetype: colortest - -detect: - filename: "ColorTest$" - -rules: - - black: "\\bPLAIN\\b" - - red: "\\bred\\b" - - green: "\\bgreen\\b" - - yellow: "\\byellow\\b" - - blue: "\\bblue\\b" - - magenta: "\\bmagenta\\b" - - cyan: "\\bcyan\\b" - - brightred: "\\bbrightred\\b" - - brightgreen: "\\bbrightgreen\\b" - - brightyellow: "\\bbrightyellow\\b" - - brightblue: "\\bbrightblue\\b" - - brightmagenta: "\\bbrightmagenta\\b" - - brightcyan: "\\bbrightcyan\\b" diff --git a/syntax_files/conf.yaml b/syntax_files/conf.yaml deleted file mode 100644 index 0fbefa6..0000000 --- a/syntax_files/conf.yaml +++ /dev/null @@ -1,17 +0,0 @@ -filetype: conf - -detect: - filename: "\\.c[o]?nf$" - -rules: - - constant.string: - start: "\"" - end: "\"" - skip: "\\\\." - rules: [] - - - comment: - start: "#" - end: "$" - rules: [] - diff --git a/syntax_files/conky.yaml b/syntax_files/conky.yaml deleted file mode 100644 index 199efaf..0000000 --- a/syntax_files/conky.yaml +++ /dev/null @@ -1,17 +0,0 @@ -filetype: conky - -detect: - filename: "(\\.*conkyrc.*$|conky.conf)" - -rules: - - type: "\\b(alignment|append_file|background|border_inner_margin|border_outer_margin|border_width|color0|color1|color2|color3|color4|color5|color6|color7|color8|color9|colorN|cpu_avg_samples|default_bar_height|default_bar_width|default_color|default_gauge_height|default_gauge_width|default_graph_height|default_graph_width|default_outline_color|default_shade_color|diskio_avg_samples|display|double_buffer|draw_borders|draw_graph_borders|draw_outline|draw_shades|extra_newline|font|format_human_readable|gap_x|gap_y|http_refresh|if_up_strictness|imap|imlib_cache_flush_interval|imlib_cache_size|lua_draw_hook_post|lua_draw_hook_pre|lua_load|lua_shutdown_hook|lua_startup_hook|mail_spool|max_port_monitor_connections|max_text_width|max_user_text|maximum_width|minimum_height|minimum_width|mpd_host|mpd_password|mpd_port|music_player_interval|mysql_host|mysql_port|mysql_user|mysql_password|mysql_db|net_avg_samples|no_buffers|nvidia_display|out_to_console|out_to_http|out_to_ncurses|out_to_stderr|out_to_x|override_utf8_locale|overwrite_file|own_window|own_window_class|own_window_colour|own_window_hints|own_window_title|own_window_transparent|own_window_type|pad_percents|pop3|sensor_device|short_units|show_graph_range|show_graph_scale|stippled_borders|temperature_unit|template|template0|template1|template2|template3|template4|template5|template6|template7|template8|template9|text|text_buffer_size|times_in_seconds|top_cpu_separate|top_name_width|total_run_times|update_interval|update_interval_on_battery|uppercase|use_spacer|use_xft|xftalpha|xftfont)\\b" - - # Configuration item constants - - statement: "\\b(above|below|bottom_left|bottom_right|bottom_middle|desktop|dock|no|none|normal|override|skip_pager|skip_taskbar|sticky|top_left|top_right|top_middle|middle_left|middle_right|middle_middle|undecorated|yes)\\b" - - # Variables - - preproc: "\\b(acpiacadapter|acpifan|acpitemp|addr|addrs|alignc|alignr|apcupsd|apcupsd_cable|apcupsd_charge|apcupsd_lastxfer|apcupsd_linev|apcupsd_load|apcupsd_loadbar|apcupsd_loadgauge|apcupsd_loadgraph|apcupsd_model|apcupsd_name|apcupsd_status|apcupsd_temp|apcupsd_timeleft|apcupsd_upsmode|apm_adapter|apm_battery_life|apm_battery_time|audacious_bar|audacious_bitrate|audacious_channels|audacious_filename|audacious_frequency|audacious_length|audacious_length_seconds|audacious_main_volume|audacious_playlist_length|audacious_playlist_position|audacious_position|audacious_position_seconds|audacious_status|audacious_title|battery|battery_bar|battery_percent|battery_short|battery_time|blink|bmpx_album|bmpx_artist|bmpx_bitrate|bmpx_title|bmpx_track|bmpx_uri|buffers|cached|cmdline_to_pid|color|color0|color1|color2|color3|color4|color5|color6|color7|color8|color9|combine|conky_build_arch|conky_build_date|conky_version|cpu|cpubar|cpugauge|cpugraph|curl|desktop|desktop_name|desktop_number|disk_protect|diskio|diskio_read|diskio_write|diskiograph|diskiograph_read|diskiograph_write|distribution|downspeed|downspeedf|downspeedgraph|draft_mails|else|endif|entropy_avail|entropy_bar|entropy_perc|entropy_poolsize|eval|eve|exec|execbar|execgauge|execgraph|execi|execibar|execigauge|execigraph|execp|execpi|flagged_mails|font|format_time|forwarded_mails|freq|freq_g|fs_bar|fs_bar_free|fs_free|fs_free_perc|fs_size|fs_type|fs_used|fs_used_perc|goto|gw_iface|gw_ip|hddtemp|head|hr|hwmon|i2c|i8k_ac_status|i8k_bios|i8k_buttons_status|i8k_cpu_temp|i8k_left_fan_rpm|i8k_left_fan_status|i8k_right_fan_rpm|i8k_right_fan_status|i8k_serial|i8k_version|ibm_brightness|ibm_fan|ibm_temps|ibm_volume|ical|iconv_start|iconv_stop|if_empty|if_existing|if_gw|if_match|if_mixer_mute|if_mounted|if_mpd_playing|if_running|if_smapi_bat_installed|if_up|if_updatenr|if_xmms2_connected|image|imap_messages|imap_unseen|ioscheduler|irc|kernel|laptop_mode|lines|loadavg|loadgraph|lua|lua_bar|lua_gauge|lua_graph|lua_parse|machine|mails|mboxscan|mem|memwithbuffers|membar|memwithbuffersbar|memeasyfree|memfree|memgauge|memgraph|memmax|memperc|mixer|mixerbar|mixerl|mixerlbar|mixerr|mixerrbar|moc_album|moc_artist|moc_bitrate|moc_curtime|moc_file|moc_rate|moc_song|moc_state|moc_timeleft|moc_title|moc_totaltime|monitor|monitor_number|mpd_album|mpd_artist|mpd_bar|mpd_bitrate|mpd_elapsed|mpd_file|mpd_length|mpd_name|mpd_percent|mpd_random|mpd_repeat|mpd_smart|mpd_status|mpd_title|mpd_track|mpd_vol|mysql|nameserver|new_mails|nodename|nodename_short|no_update|nvidia|obsd_product|obsd_sensors_fan|obsd_sensors_temp|obsd_sensors_volt|obsd_vendor|offset|outlinecolor|pb_battery|pid_chroot|pid_cmdline|pid_cwd|pid_environ|pid_environ_list|pid_exe|pid_nice|pid_openfiles|pid_parent|pid_priority|pid_state|pid_state_short|pid_stderr|pid_stdin|pid_stdout|pid_threads|pid_thread_list|pid_time_kernelmode|pid_time_usermode|pid_time|pid_uid|pid_euid|pid_suid|pid_fsuid|pid_gid|pid_egid|pid_sgid|pid_fsgid|pid_read|pid_vmpeak|pid_vmsize|pid_vmlck|pid_vmhwm|pid_vmrss|pid_vmdata|pid_vmstk|pid_vmexe|pid_vmlib|pid_vmpte|pid_write|platform|pop3_unseen|pop3_used|processes|read_tcp|read_udp|replied_mails|rss|running_processes|running_threads|scroll|seen_mails|shadecolor|smapi|smapi_bat_bar|smapi_bat_perc|smapi_bat_power|smapi_bat_temp|sony_fanspeed|stippled_hr|stock|swap|swapbar|swapfree|swapmax|swapperc|sysname|tab|tail|tcp_ping|tcp_portmon|template0|template1|template2|template3|template4|template5|template6|template7|template8|template9|texeci|texecpi|threads|time|to_bytes|top|top_io|top_mem|top_time|totaldown|totalup|trashed_mails|tztime|gid_name|uid_name|unflagged_mails|unforwarded_mails|unreplied_mails|unseen_mails|updates|upspeed|upspeedf|upspeedgraph|uptime|uptime_short|user_names|user_number|user_terms|user_times|user_time|utime|voffset|voltage_mv|voltage_v|weather|wireless_ap|wireless_bitrate|wireless_essid|wireless_link_bar|wireless_link_qual|wireless_link_qual_max|wireless_link_qual_perc|wireless_mode|words|xmms2_album|xmms2_artist|xmms2_bar|xmms2_bitrate|xmms2_comment|xmms2_date|xmms2_duration|xmms2_elapsed|xmms2_genre|xmms2_id|xmms2_percent|xmms2_playlist|xmms2_size|xmms2_smart|xmms2_status|xmms2_timesplayed|xmms2_title|xmms2_tracknr|xmms2_url)\\b" - - - identifier.var: "\\$\\{?[0-9A-Z_!@#$*?-]+\\}?" - - symbol.operator: "(\\{|\\}|\\(|\\)|\\;|\\]|\\[|`|\\\\|\\$|<|>|!|=|&|\\|)" - - constant.macro: "^TEXT$" diff --git a/syntax_files/crystal.yaml b/syntax_files/crystal.yaml deleted file mode 100644 index de80e53..0000000 --- a/syntax_files/crystal.yaml +++ /dev/null @@ -1,64 +0,0 @@ -filetype: crystal - -detect: - filename: "\\.cr$" - -rules: - # Asciibetical list of reserved words - - statement: "\\b(BEGIN|END|abstract|alias|and|begin|break|case|class|def|defined\\?|do|else|elsif|end|ensure|enum|false|for|fun|if|in|include|lib|loop|macro|module|next|nil|not|of|or|pointerof|private|protected|raise|redo|require|rescue|retry|return|self|sizeof|spawn|struct|super|then|true|type|undef|union|uninitialized|unless|until|when|while|yield)\\b" - # Constants - - constant: "(\\$|@|@@)?\\b[A-Z]+[0-9A-Z_a-z]*" - - constant.number: "\\b[0-9]+\\b" - # Crystal "symbols" - - constant: "([ ]|^):[0-9A-Z_]+\\b" - # Some unique things we want to stand out - - constant: "\\b(__FILE__|__LINE__)\\b" - # Regular expressions - - constant: "/([^/]|(\\\\/))*/[iomx]*|%r\\{([^}]|(\\\\}))*\\}[iomx]*" - - # Shell command expansion is in `backticks` or like %x{this}. These are - # "double-quotish" (to use a perlism). - - constant.string: "`[^`]*`|%x\\{[^}]*\\}" - - - constant.string: - start: "`" - end: "`" - rules: [] - - - constant.string: - start: "%x\\{" - end: "\\}" - rules: [] - - - constant.string: - start: "\"" - end: "\"" - skip: "\\\\." - rules: - - constant.specialChar: "\\\\." - - special: "#\\{[^}]*\\}" - - - constant.string: - start: "'" - end: "'" - skip: "\\\\." - rules: - - constant.specialChar: "\\\\." - - - comment: - start: "#" - end: "$" - rules: - - todo: "(TODO|XXX|FIXME):?" - - - comment.bright: - start: "##" - end: "$" - rules: - - todo: "(TODO|XXX|FIXME):?" - - - constant: - start: "<<-?'?EOT'?" - end: "^EOT" - rules: [] - diff --git a/syntax_files/cython.yaml b/syntax_files/cython.yaml deleted file mode 100644 index 5a30c60..0000000 --- a/syntax_files/cython.yaml +++ /dev/null @@ -1,52 +0,0 @@ -filetype: cython - -detect: - filename: "\\.pyx$|\\.pxd$|\\.pyi$" - -rules: - # Python Keyword Color - - statement: "\\b(and|as|assert|class|def|DEF|del|elif|ELIF|else|ELSE|except|exec|finally|for|from|global|if|IF|import|in|is|lambda|map|not|or|pass|print|raise|try|while|with|yield)\\b" - - special: "\\b(continue|break|return)\\b" - - # Cython Keyword Color - - identifier.macro: "\\b(cdef|cimport|cpdef|cppclass|ctypedef|extern|include|namespace|property|struct)\\b" - - type: "\\b(bint|char|double|int|public|void|unsigned)\\b" - - # Operator Color - - symbol: "[.:;,+*|=!\\%]|<|>|/|-|&" - - # Parenthetical Color - - symbol.brackets: "[(){}]|\\[|\\]" - - - constant.string: - start: "\"\"\"" - end: "\"\"\"" - rules: - - constant.specialChar: "\\\\." - - - constant.string: - start: "'''" - end: "'''" - rules: - - constant.specialChar: "\\\\." - - - constant.string: - start: "\"" - end: "\"" - skip: "\\\\." - rules: - - constant.specialChar: "\\\\." - - - constant.string: - start: "'" - end: "'" - skip: "\\\\." - rules: - - constant.specialChar: "\\\\." - - - comment: - start: "#" - end: "$" - rules: - - todo: "(TODO|XXX|FIXME):?" - diff --git a/syntax_files/df.yaml b/syntax_files/df.yaml deleted file mode 100644 index 721c876..0000000 --- a/syntax_files/df.yaml +++ /dev/null @@ -1,31 +0,0 @@ -filetype: df - -detect: - filename: "\\.df$" - header: "(^Filesystem[[:space:]]+)" - -rules: - # header - - cyan: "(Filesystem|Size|1K-blocks|(I)?Use(d)?(%)?|Avail(able)?|Mounted on|IFree|Inodes)" - - blue: "(\\/[-\\w\\d.]+)+\\s" - # Ks - - green: "\\s\\d*[.,]?\\d(K|B)i?\\s|\b\\d{1,3}\b" - # Ms - - magenta: "\\s\\d*[.,]?\\dMi?\\s|\b\\d{4,6}\b" - # Gs - - cyan: "\\s\\d*[.,]?\\dGi?\\s|\b\\d{4,6}\b" - # Ts - - preproc: "\\s\\d*[.,]?\\dTi?\\s|\b\\d{4,6}\b" - # Mounted on - - green: "\\/$|(\\/[-\\w\\d. ]+)+$" - # Use% <= 60 - - high.green: "\\s[1-6]?[0-9]%\\s" - # Use% <= 70 - 89 - - yellow: "\\s[78][0-9]%\\s" - # Use 90-97% - - red: "\\s9[0-7]%\\s" - # Use 98-100% - - preproc: "\\s9[89]%|100%\\s" - - type: "(tmpfs|(u|/)?dev|(/)?run|shm|(/)?boot|nfs|/home|/var|/tmp|swap)" - - constant.number: "[[:space:]]+([0-9])+[[:space:]]+" - diff --git a/syntax_files/dot.yaml b/syntax_files/dot.yaml deleted file mode 100644 index cea9a58..0000000 --- a/syntax_files/dot.yaml +++ /dev/null @@ -1,29 +0,0 @@ -filetype: dot - -detect: - filename: "\\.(dot|gv)$" - -rules: - - type: "\\b(digraph|edge|graph|node|subgraph)\\b" - - statement: "\\b(arrow(head|size|tail)|(bg|fill|font)?color|center|constraint|decorateP|dir|distortion|font(name|size)|head(clip|label)|height|label(angle|distance|font(color|name|size))?|layer(s)?|margin|mclimit|minlen|name|nodesep|nslimit|ordering|orientation|page(dir)?|peripheries|port_label_distance|rank(dir|sep)?|ratio|regular|rotate|same(head|tail)|shape(file)?|sides|size|skew|style|tail(clip|label)|URL|weight|width)\\b" - - symbol: "=|->|--" - - - constant.string: - start: "\"" - end: "\"" - skip: "\\\\." - rules: - - constant.specialChar: "\\\\." - - - comment: - start: "//" - end: "$" - rules: - - todo: "(TODO|XXX|FIXME):?" - - - comment: - start: "/\\*" - end: "\\*/" - rules: - - todo: "(TODO|XXX|FIXME):?" - diff --git a/syntax_files/dpkg.yaml b/syntax_files/dpkg.yaml deleted file mode 100644 index 3a0f6dd..0000000 --- a/syntax_files/dpkg.yaml +++ /dev/null @@ -1,18 +0,0 @@ -filetype: dpkg - -detect: - filename: "\\.dpkg$" - header: "(^(Desired=).*)" - -rules: - - constant.number: "(^[D|+].*)" - - preproc: "[0-9]+,?[0-9]*" - - preproc: "\\\\." - - preproc: "^(un.*)" - - constant: "^(ii.*)" - - comment: "^(rc.*)" - - type: "(i386|i486|i586|i686|amd64|\\|athlon|ia64|alpha|alphaev5|alphaev56|alphapca56|alphaev6|alphaev67|sparc|sparcv9|sparc64armv3l|armv4b|armv4lm|ips|mipsel|ppc|iseries|ppcpseries|ppc64|m68k|m68kmint|Sgi|rs6000|i370|s390x|s390|noarch)" - - comment: "(^|[[:space:]])#([^{].*)?$" - - preproc: "[[:space:]]+$" - - indent-char: " + +| + +" - - statement: "[[:space:]]([0-9~:.]{2,}[-+:.0-9a-z~]+)[[:space:]]" diff --git a/syntax_files/du.yaml b/syntax_files/du.yaml deleted file mode 100644 index 315b5ef..0000000 --- a/syntax_files/du.yaml +++ /dev/null @@ -1,22 +0,0 @@ -filetype: du - -detect: - filename: "\\.du$" - -rules: - - blue: "\\s+[\\.\\/]+([\\w\\s\\-\\_\\.]+)(\\/.*)?$" - # Ks - - green: "^\\d{1,3}\\s" - - green: "^ ?\\d*[.,]?\\dKi?\\s" - # Ms - - magenta: "\\d{4,6}\\s" - - magenta: "^ ?\\d*[.,]?\\dMi?\\s" - # Gs - - cyan: "^\\d{7,9}\\s" - - cyan: "^ ?\\d*[.,]?\\dGi?\\s" - # Ts - - preproc: "^\\d{10,12}\\s" - - preproc: "^ ?\\d*[.,]?\\dTi?\\s" - # total - - yellow: "(.*)\\s+(total)$" - diff --git a/syntax_files/erb.yaml b/syntax_files/erb.yaml deleted file mode 100644 index d58e9b2..0000000 --- a/syntax_files/erb.yaml +++ /dev/null @@ -1,42 +0,0 @@ -filetype: erb - -detect: - filename: "\\.erb$|\\.rhtml$" - -rules: - - error: "<[^!].*?>" - - symbol.tag: "(?i)<[/]?(a(bbr|cronym|ddress|pplet|rea|rticle|side|udio)?|b(ase(font)?|d(i|o)|ig|lockquote|r)?|ca(nvas|ption)|center|cite|co(de|l|lgroup)|d(ata(list)?|d|el|etails|fn|ialog|ir|l|t)|em(bed)?|fieldset|fig(caption|ure)|font|form|(i)?frame|frameset|h[1-6]|hr|i|img|in(put|s)|kbd|keygen|label|legend|li(nk)?|ma(in|p|rk)|menu(item)?|met(a|er)|nav|no(frames|script)|o(l|pt(group|ion)|utput)|p(aram|icture|re|rogress)?|q|r(p|t|uby)|s(trike)?|samp|se(ction|lect)|small|source|span|strong|su(b|p|mmary)|textarea|time|track|u(l)?|var|video|wbr)( .*|>)*?>" - - symbol.tag.extended: "(?i)<[/]?(body|div|html|head(er)?|footer|title|table|t(body|d|h(ead)?|r|foot))( .*|>)*?>" - - preproc: "(?i)<[/]?(script|style)( .*|>)*?>" - - special: "&[^;[[:space:]]]*;" - - symbol: "[:=]" - - identifier: "(alt|bgcolor|height|href|id|label|longdesc|name|onclick|onfocus|onload|onmouseover|size|span|src|style|target|type|value|width)=" - - constant.string: "\"[^\"]*\"" - - constant.number: "(?i)#[0-9A-F]{6,6}" - - constant.string.url: "(ftp(s)?|http(s)?|git|chrome)://[^ ]+" - - comment: "" - - preproc: "" - - default: - start: "<%" - end: "%>" - rules: [] - - - preproc: "<%|%>" - - red: "&[^;[[:space:]]]*;" - - statement: "\\b(BEGIN|END|alias|and|begin|break|case|class|def|defined\\?|do|else|elsif|end|ensure|false|for|if|in|module|next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\\b" - - identifier.var: "(\\$|@|@@)?\\b[A-Z]+[0-9A-Z_a-z]*" - - magenta: "(?i)([ ]|^):[0-9A-Z_]+\\b" - - identifier.macro: "\\b(__FILE__|__LINE__)\\b" - - brightmagenta: "!/([^/]|(\\\\/))*/[iomx]*|%r\\{([^}]|(\\\\}))*\\}[iomx]*" - - brightblue: "`[^`]*`|%x\\{[^}]*\\}" - - constant.string: "\"([^\"]|(\\\\\"))*\"|%[QW]?\\{[^}]*\\}|%[QW]?\\([^)]*\\)|%[QW]?<[^>]*>|%[QW]?\\[[^]]*\\]|%[QW]?\\$[^$]*\\$|%[QW]?\\^[^^]*\\^|%[QW]?![^!]*!" - - brightgreen: "#\\{[^}]*\\}" - - green: "'([^']|(\\\\'))*'|%[qw]\\{[^}]*\\}|%[qw]\\([^)]*\\)|%[qw]<[^>]*>|%[qw]\\[[^]]*\\]|%[qw]\\$[^$]*\\$|%[qw]\\^[^^]*\\^|%[qw]![^!]*!" - - comment: "#[^{].*$|#$" - - comment.bright: "##[^{].*$|##$" - - identifier.macro: - start: "<<-?'?EOT'?" - end: "^EOT" - rules: [] - - - todo: "(XXX|TODO|FIXME|\\?\\?\\?)" diff --git a/syntax_files/gentoo-ebuild.yaml b/syntax_files/gentoo-ebuild.yaml deleted file mode 100644 index 0d118f4..0000000 --- a/syntax_files/gentoo-ebuild.yaml +++ /dev/null @@ -1,48 +0,0 @@ -filetype: ebuild - -detect: - filename: "\\.e(build|class)$" - -rules: - # All the standard portage functions - - identifier: "^src_(unpack|compile|install|test)|^pkg_(config|nofetch|setup|(pre|post)(inst|rm))" - # Highlight bash related syntax - - statement: "\\b(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while|continue|break)\\b" - - statement: "(\\{|\\}|\\(|\\)|\\;|\\]|\\[|`|\\\\|\\$|<|>|!|=|&|\\|)" - - statement: "-(e|d|f|r|g|u|w|x|L)\\b" - - statement: "-(eq|ne|gt|lt|ge|le|s|n|z)\\b" - # Highlight variables ... official portage ones in red, all others in bright red - - preproc: "\\$\\{?[a-zA-Z_0-9]+\\}?" - - special: "\\b(ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|FILESDIR|WORKDIR|(P|R)?DEPEND|PROVIDE|DISTDIR|RESTRICT|USERLAND)\\b" - - special: "\\b(S|D|T|PV|PF|P|PN|A)\\b|\\bC(XX)?FLAGS\\b|\\bLDFLAGS\\b|\\bC(HOST|TARGET|BUILD)\\b" - # Highlight portage commands - - identifier: "\\buse(_(with|enable))?\\b [!a-zA-Z0-9_+ -]*|inherit.*" - - statement: "\\be(begin|end|conf|install|make|warn|infon?|error|log|patch|new(group|user))\\b" - - statement: "\\bdie\\b|\\buse(_(with|enable))?\\b|\\binherit\\b|\\bhas\\b|\\b(has|best)_version\\b|\\bunpack\\b" - - statement: "\\b(do|new)(ins|s?bin|doc|lib(\\.so|\\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\\b" - - statement: "\\bdo(python|sed|dir|hard|sym|html|jar|mo)\\b|\\bkeepdir\\b" - - statement: "prepall(docs|info|man|strip)|prep(info|lib|lib\\.(so|a)|man|strip)" - - statement: "\\b(doc|ins|exe)into\\b|\\bf(owners|perms)\\b|\\b(exe|ins|dir)opts\\b" - # Highlight common commands used in ebuilds - - type: "\\bmake\\b|\\b(cat|cd|chmod|chown|cp|echo|env|export|grep|let|ln|mkdir|mv|rm|sed|set|tar|touch|unset)\\b" - - - constant.string: - start: "\"" - end: "\"" - skip: "\\\\." - rules: - - constant.specialChar: "\\\\." - - - constant.string: - start: "'" - end: "'" - skip: "\\\\." - rules: - - constant.specialChar: "\\\\." - - - comment: - start: "#" - end: "$" - rules: - - todo: "(TODO|XXX|FIXME):?" - diff --git a/syntax_files/gentoo-etc-portage.yaml b/syntax_files/gentoo-etc-portage.yaml deleted file mode 100644 index 850ffbd..0000000 --- a/syntax_files/gentoo-etc-portage.yaml +++ /dev/null @@ -1,23 +0,0 @@ -filetype: etc-portage - -detect: - filename: "\\.(keywords|mask|unmask|use)$" - -rules: - # Use flags: - - constant.bool.false: "[[:space:]]+\\+?[a-zA-Z0-9_-]+" - - constant.bool.true: "[[:space:]]+-[a-zA-Z0-9_-]+" - # Likely version numbers: - - special: "-[[:digit:]].*([[:space:]]|$)" - # Accepted arches: - - identifier.class: "[~-]?\\b(alpha|amd64|arm|hppa|ia64|mips|ppc|ppc64|s390|sh|sparc|x86|x86-fbsd)\\b" - - identifier.class: "[[:space:]][~-]?\\*" - # Categories: - - statement: "^[[:space:]]*.*/" - # Masking regulators: - - symbol: "^[[:space:]]*(=|~|<|<=|=<|>|>=|=>)" - # Comments: - - comment: - start: "#" - end: "$" - rules: [] diff --git a/syntax_files/git-commit.yaml b/syntax_files/git-commit.yaml deleted file mode 100644 index 483f4fd..0000000 --- a/syntax_files/git-commit.yaml +++ /dev/null @@ -1,28 +0,0 @@ -filetype: git-commit - -detect: - filename: "COMMIT_EDITMSG|TAG_EDITMSG" - -rules: - # Commit message - - ignore: ".*" - # Comments - - comment: - start: "#" - end: "$" - rules: [] - # File changes - - keyword: "#[[:space:]](deleted|modified|new file|renamed):[[:space:]].*" - - keyword: "#[[:space:]]deleted:" - - keyword: "#[[:space:]]modified:" - - keyword: "#[[:space:]]new file:" - - keyword: "#[[:space:]]renamed:" - # Untracked filenames - - error: "^# [^/?*:;{}\\\\]+\\.[^/?*:;{}\\\\]+$" - - keyword: "^#[[:space:]]Changes.*[:]" - - keyword: "^#[[:space:]]Your branch and '[^']+" - - keyword: "^#[[:space:]]Your branch and '" - - keyword: "^#[[:space:]]On branch [^ ]+" - - keyword: "^#[[:space:]]On branch" - # Recolor hash symbols - - special: "#" diff --git a/syntax_files/git-rebase-todo.yaml b/syntax_files/git-rebase-todo.yaml deleted file mode 100644 index 30ede72..0000000 --- a/syntax_files/git-rebase-todo.yaml +++ /dev/null @@ -1,28 +0,0 @@ -filetype: git-rebase-todo - -detect: - filename: "git-rebase-todo" - -rules: - # Comments - - comment: - start: "#" - end: "$" - rules: [] - # Rebase commands - - statement: "^(e|edit) [0-9a-f]{7,40}" - - statement: "^# (e, edit)" - - statement: "^(f|fixup) [0-9a-f]{7,40}" - - statement: "^# (f, fixup)" - - statement: "^(p|pick) [0-9a-f]{7,40}" - - statement: "^# (p, pick)" - - statement: "^(r|reword) [0-9a-f]{7,40}" - - statement: "^# (r, reword)" - - statement: "^(s|squash) [0-9a-f]{7,40}" - - statement: "^# (s, squash)" - - statement: "^(x|exec) [^ ]+ [0-9a-f]{7,40}" - - statement: "^# (x, exec)" - # Recolor hash symbols - - special: "#" - # Commit IDs - - identifier: "[0-9a-f]{7,40}" diff --git a/syntax_files/glsl.yaml b/syntax_files/glsl.yaml deleted file mode 100644 index 73369c8..0000000 --- a/syntax_files/glsl.yaml +++ /dev/null @@ -1,26 +0,0 @@ -filetype: glsl - -detect: - filename: "\\.(frag|vert|fp|vp|glsl)$" - -rules: - - identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]" - - type: "\\b(void|bool|bvec2|bvec3|bvec4|int|ivec2|ivec3|ivec4|float|vec2|vec3|vec4|mat2|mat3|mat4|struct|sampler1D|sampler2D|sampler3D|samplerCUBE|sampler1DShadow|sampler2DShadow)\\b" - - identifier: "\\bgl_(DepthRangeParameters|PointParameters|MaterialParameters|LightSourceParameters|LightModelParameters|LightModelProducts|LightProducts|FogParameters)\\b" - - statement: "\\b(const|attribute|varying|uniform|in|out|inout|if|else|return|discard|while|for|do)\\b" - - statement: "\\b(break|continue)\\b" - - constant.bool: "\\b(true|false)\\b" - - symbol.operator: "[-+/*=<>?:!~%&|^]" - - constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b" - - - comment: - start: "//" - end: "$" - rules: - - todo: "TODO:?" - - - comment: - start: "/\\*" - end: "\\*/" - rules: - - todo: "TODO:?" diff --git a/syntax_files/golo.yaml b/syntax_files/golo.yaml deleted file mode 100644 index 54e0527..0000000 --- a/syntax_files/golo.yaml +++ /dev/null @@ -1,73 +0,0 @@ -filetype: golo - -detect: - filename: "\\.golo$" - -rules: - - type: "\\b(function|fun|)\\b" - - type: "\\b(struct|DynamicObject|union|AdapterFabric|Adapter|DynamicVariable|Observable)\\b" - - type: "\\b(list|set|array|vector|tuple|map)\\b" - - type: "\\b(Ok|Error|Empty|None|Some|Option|Result|Result.ok|Result.fail|Result.error|Result.empty|Optional.empty|Optional.of)\\b" - - - identifier.class: "\\b(augment|pimp)\\b" - - identifier.class: "\\b(interfaces|implements|extends|overrides|maker|newInstance)\\b" - - identifier.class: "\\b(isEmpty|isNone|isPresent|isSome|iterator|flattened|toList|flatMap|`and|orElseGet|`or|toResult|apply|either)\\b" - - identifier.class: "\\b(result|option|trying|raising|nullify|catching)\\b" - - identifier.class: "\\b(promise|setFuture|failedFuture|all|any)\\b" - - identifier.class: "\\b(initialize|initializeWithinThread|start|future|fallbackTo|onSet|onFail|cancel|enqueue)\\b" - - identifier.class: "\\b(println|print|raise|readln|readPassword|secureReadPassword|requireNotNull|require|newTypedArray|range|reversedRange|mapEntry|asInterfaceInstance|asFunctionalInterface|isClosure|fileToText|textToFile|fileExists|currentDir|sleep|uuid|isArray|arrayTypeOf|charValue|intValue|longValue|doubleValue|floatValue|removeByIndex|box)\\b" - - identifier.class: "\\b(likelySupported|reset|bold|underscore|blink|reverse_video|concealed|fg_black|fg_red|fg_green|fg_yellow|fg_blue|fg_magenta|fg_cyan|fg_white|bg_black|bg_red|bg_green|bg_yellow|bg_blue|bg_magenta|bg_cyan|bg_white|cursor_position|cursor_save_position|cursor_restore_position|cursor_up|cursor_down|cursor_forward|cursor_backward|erase_display|erase_line)\\b" - - identifier.class: "\\b(emptyList|cons|lazyList|fromIter|generator|repeat|iterate)\\b" - - identifier.class: "\\b(asLazyList|foldl|foldr|take|takeWhile|drop|dropWhile|subList)\\b" - - identifier.class: "\\b(import)\\b" - - identifier.class: "\\b(module)\\b" - - identifier.class: "\\b(JSON)\\b" - - identifier.class: "\\b(stringify|parse|toJSON|toDynamicObject|updateFromJSON)\\b" - - identifier.class: "\\b(newInstance|define|getKey|getValue|properties|fallback)\\b" - - identifier.class: "\\b(times|upTo|downTo)\\b" - - identifier.class: "\\b(format|toInt|toInteger|toDouble|toFloat|toLong)\\b" - - identifier.class: "\\b(head|tail|isEmpty|reduce|each|count|exists)\\b" - - identifier.class: "\\b(newWithSameType|destruct|append|add|addIfAbsent|prepend|insert|last|unmodifiableView|find|filter|map|join|reverse|reversed|order|ordered|removeAt|include|exclude|remove|delete|has|contains|getOrElse|toArray)\\b" - - identifier.class: "\\b(add|addTo|succ|pred|mul|neg|sub|rsub|div|rdiv|mod|rmod|pow|rpow|str|lt|gt|eq|ne|ge|le|`and|`or|`not|xor|even|odd|contains|isEmpty|`is|`isnt|`oftype|`orIfNull|fst|snd|getitem|setitem|getter|id|const|False|True|Null|curry|uncurry|unary|spreader|varargs|swapArgs|swapCurry|swapCouple|swap|invokeWith|pipe|compose|io|andThen|until|recur|cond)\\b" - - identifier.class: "\\b(toUpperCase|equals|startsWith)\\b" - - - statement: "\\b(if|else|then|when|case|match|otherwise)\\b" - - special: "\\b(with|break|continue|return)\\b" - - error: "\\b(try|catch|finally|throw)\\b" - - identifier: "\\b(super|this|let|var|local)\\b" - - symbol.brackets: "[(){}]|\\[|\\]" - - statement: "\\b(for|while|foreach|in)\\b" - - constant: "\\b(and|in|is|not|or|isnt|orIfNull)\\b" - - - constant.bool: "\\b(true|false)\\b" - - constant: "\\b(null|undefined)\\b" - - - symbol.operator: "[\\-+/*=<>!~%&|^]|:=" - - constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b|'.'" - - - constant.string: - start: "\"" - end: "\"" - skip: "\\\\." - rules: - - constant.specialChar: "\\\\." - - - constant.string: - start: "'" - end: "'" - skip: "\\\\." - rules: - - constant.specialChar: "\\\\." - - - comment: - start: "#" - end: "$" - rules: - - todo: "(TODO|XXX|FIXME):?" - - - comment: - start: "----" - end: "----" - rules: - - todo: "(TODO|XXX|FIXME):?" - diff --git a/syntax_files/groff.yaml b/syntax_files/groff.yaml deleted file mode 100644 index 39663ea..0000000 --- a/syntax_files/groff.yaml +++ /dev/null @@ -1,30 +0,0 @@ -filetype: groff - -detect: - filename: "\\.m[ems]$|\\.rof|\\.tmac$|^tmac." - -rules: - - statement: "^\\.(ds|nr) [^[[:space:]]]*" - - constant.specialChar: "\\\\." - - constant.specialChar: "\\\\f.|\\\\f\\(..|\\\\s(\\+|\\-)?[0-9]" - - constant: "(\\\\|\\\\\\\\)n(.|\\(..)" - - constant: - start: "(\\\\|\\\\\\\\)n\\[" - end: "]" - rules: [] - - - type: "^\\.[[:space:]]*[^[[:space:]]]*" - - comment: "^\\.\\\\\".*$" - - constant.string: "(\\\\|\\\\\\\\)\\*(.|\\(..)" - - constant.string: - start: "(\\\\|\\\\\\\\)\\*\\[" - end: "]" - rules: [] - - - constant.specialChar: "\\\\\\(.." - - constant.specialChar: - start: "\\\\\\[" - end: "]" - rules: [] - - - identifier.macro: "\\\\\\\\\\$[1-9]" diff --git a/syntax_files/haml.yaml b/syntax_files/haml.yaml deleted file mode 100644 index 7f94cd2..0000000 --- a/syntax_files/haml.yaml +++ /dev/null @@ -1,16 +0,0 @@ -filetype: haml - -detect: - filename: "\\.haml$" - -rules: - - symbol: "-|=" - - default: "->|=>" - - constant: "([ ]|^)%[0-9A-Za-z_]+>" - - special: ":[0-9A-Za-z_]+>" - - type: "\\.[A-Za-z_]+>" - - constant.string: "\"([^\"]|(\\\\\"))*\"|%[QW]?\\{[^}]*\\}|%[QW]?\\([^)]*\\)|%[QW]?<[^>]*>|%[QW]?\\$[^$]*\\$|%[QW]?\\^[^^]*\\^|%[QW]?![^!]*!" - - constant.string: "'([^']|(\\\\'))*'|%[qw]\\{[^}]*\\}|%[qw]\\([^)]*\\)|%[qw]<[^>]*>|%[qw]\\[[^]]*\\]|%[qw]\\$[^$]*\\$|%[qw]\\^[^^]*\\^|%[qw]![^!]*!" - - identifier: "#\\{[^}]*\\}" - - identifier.var: "(@|@@)[0-9A-Z_a-z]+" - - comment: "#[^{].*$|#$" diff --git a/syntax_files/history.yaml b/syntax_files/history.yaml deleted file mode 100644 index 5a3ca3e..0000000 --- a/syntax_files/history.yaml +++ /dev/null @@ -1,23 +0,0 @@ -filetype: history - -detect: - filename: "(\\.history)" - -rules: - - constant.number: "\\b(stop|(re)?start)\\b" -# export HISTTIMEFORMAT="%F %T: " to get the best highlighting - - preproc: "([0-9]{4}\\-[0-9]{2}\\-[0-9]{2}\\s[0-9]{2}:[0-9]{2}:[0-9]{2})" - - statement: "\\b(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\\b" - # Conditional flags - - statement: "--[a-z-]+" - - statement: "\\ -[a-z]+" - # Shell commands - - type: "\\b(cd|echo|export|let|set|umask|unset)\\b" - # Common linux commands - - type: "\\b((g|ig)?awk|bash|dash|find|\\w{0,4}grep|kill|killall|\\w{0,4}less|make|pkill|sed|sh|tar|ping|traceroute|service|apt|apt-get|aptitude|yum)\\b" - # Coreutils commands - - type: "\\b(which|sudo|base64|basename|cat|chcon|chgrp|chmod|chown|chroot|cksum|comm|cp|csplit|cut|date|(l)?dd|df|dir|dircolors|dirname|du|env|expand|expr|factor|false|fmt|fold|head|hostid|id|install|join|link|ln|logname|ls|md5sum|mkdir|mkfifo|mknod|mktemp|mv|nice|nl|nohup|nproc|numfmt|od|paste|pathchk|pinky|pr|printenv|printf|ptx|pwd|readlink|realpath|rm|rmdir|runcon|seq|(sha1|sha224|sha256|sha384|sha512)sum|shred|shuf|sleep|sort|split|stat|stdbuf|stty|sum|sync|tac|tail|tee|test|time|timeout|touch|tr|true|truncate|tsort|tty|uname|unexpand|uniq|unlink|users|vdir|wc|who|whoami|yes)\\b" - - identifier.var: "(^([[:space:]]+)?[A-Za-z0-9_]+)" - - special: "(\\{|\\}|\\(|\\)|\\;|\\]|\\[|`|\\\\|\\$|<|>|!|=|&|\\|)" - - special: "https?://[^ )>]+" - diff --git a/syntax_files/html4.yaml b/syntax_files/html4.yaml deleted file mode 100644 index 7bf851e..0000000 --- a/syntax_files/html4.yaml +++ /dev/null @@ -1,25 +0,0 @@ -filetype: html4 - -detect: - filename: "\\.htm[l]?4$" - header: "" - -rules: - - error: "<[^!].*?>" - - symbol.tag: "(?i)<[/]?(a(bbr|cronym|ddress|pplet|rea|rticle|side|udio)?|b(ase(font)?|d(i|o)|ig|lockquote|r)?|ca(nvas|ption)|center|cite|co(de|l|lgroup)|d(ata(list)?|d|el|etails|fn|ialog|ir|l|t)|em(bed)?|fieldset|fig(caption|ure)|font|form|(i)?frame|frameset|h[1-6]|hr|i|img|in(put|s)|kbd|keygen|label|legend|li(nk)?|ma(in|p|rk)|menu(item)?|met(a|er)|nav|no(frames|script)|o(l|pt(group|ion)|utput)|p(aram|icture|re|rogress)?|q|r(p|t|uby)|s(trike)?|samp|se(ction|lect)|small|source|span|strong|su(b|p|mmary)|textarea|time|track|u(l)?|var|video|wbr)( .*|>)*?>" - - symbol.tag.extended: "(?i)<[/]?(body|div|html|head(er)?|footer|title|table|t(body|d|h(ead)?|r|foot))( .*)*?>" - - preproc: "(?i)<[/]?(script|style)( .*)*?>" - - special: "&[^;[[:space:]]]*;" - - symbol: "[:=]" - - identifier: "(alt|bgcolor|height|href|id|label|longdesc|name|on(click|focus|load|mouseover)|size|span|src|style|target|type|value|width)=" - - constant.string: "\"[^\"]*\"" - - constant.number: "(?i)#[0-9A-F]{6,6}" - - default: - start: ">" - end: "<" - rules: [] - - - symbol.tag: "<|>" - - constant.string.url: "(ftp(s)?|http(s)?|git|chrome)://[^ ]+" - - comment: "" - - preproc: "" diff --git a/syntax_files/ifconfig.yaml b/syntax_files/ifconfig.yaml deleted file mode 100644 index c692df9..0000000 --- a/syntax_files/ifconfig.yaml +++ /dev/null @@ -1,31 +0,0 @@ -filetype: ifconfig - -detect: - filename: "\\.ifconfig$" - -rules: - # IPv4 - - green: "\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}" - # ipv6 - - green: "\\b[0-9a-fA-F]{1,4}(\\:\\:?[0-9a-fA-F]{1,4})+" - # hwaddr - - yellow: "(\\d|[a-f]){2}(\\:(\\d|[a-f]){2}){5}" - # size - - yellow: "\\d+(\\.\\d+)?\\s(T|G|M|K|)i?B" - # interface - - cyan: "^([a-z0-9.-]{2,}\\d*):?\\s" - #ip disc - - cyan: "(inet6?|netmask|broadcast|ether|loop)" - # mtu - - green: "(?i)mtu(\\s|\\:)\\d+" - #errors - - red: "errors(\\s|\\:)\\d+" - - red: "collisions(\\s|\\:)\\d+" - - yellow: "flags=(-?\\d+<[A-Z,]+>)" - - red: "dropped(\\s|\\:)\\d+" - - magenta: "overruns(\\s|\\:)\\d+" - - yellow: "frame(\\s|\\:)\\d+" - - yellow: "(Ethernet|Local Loopback)" - - cyan: "carrier(\\s|\\:)\\d+" - - cyan: "packets\\s+\\d+" - - high.green: "bytes\\s+\\d+" diff --git a/syntax_files/inputrc.yaml b/syntax_files/inputrc.yaml deleted file mode 100644 index 9df431e..0000000 --- a/syntax_files/inputrc.yaml +++ /dev/null @@ -1,14 +0,0 @@ -filetype: inputrc - -detect: - filename: "inputrc$" - -rules: - - constant.bool.false: "\\b(off|none)\\b" - - constant.bool.true: "\\bon\\b" - - preproc: "\\bset|\\$include\\b" - - constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'" - - constant.specialChar: "\\\\.?" - - comment: "(^|[[:space:]])#([^{].*)?$" - - indent-char.whitespace: "[[:space:]]+$" - - indent-char: " + +| + +" diff --git a/syntax_files/ip.yaml b/syntax_files/ip.yaml deleted file mode 100644 index cee9e99..0000000 --- a/syntax_files/ip.yaml +++ /dev/null @@ -1,35 +0,0 @@ -filetype: ip - -detect: - filename: "\\.ip$" - -rules: - # device - - high.green: "\\d+:\\s*[a-z-0-9_]+" - - high.green: "state UP" - - red: "state DOWN" - # IPv4 - - green: "\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}" - # ipv6 - - green: "\\b[0-9a-fA-F]{1,4}(\\:\\:?[0-9a-fA-F]{1,4})+" - # size - - yellow: "\\d+(\\.\\d+)?\\s(T|G|M|K|)i?B" - # interface - - cyan: "^([a-z0-9.]{2,}\\d*):?\\s" - #ip disc - - cyan: "(inet6?|netmask|broadcast)" - # mtu - - green: "(?i)mtu(\\s|\\:)\\d+" - - green: "src \\S+" - #errors - - red: "errors(\\s|\\:)\\d+" - - red: "collisions(\\s|\\:)\\d+" - - red: "linkdown" - - yellow: "(<[A-Z,_]+>)" - - white: "dropped(\\s|\\:)\\d+" - - magenta: "overruns(\\s|\\:)\\d+" - - white: "frame(\\s|\\:)\\d+" - - cyan: "carrier(\\s|\\:)\\d+" - # MAC - - yellow: "(\\d|[a-f]){2}(\\:(\\d|[a-f]){2}){5}" - - magenta: "link/([a-z]+)" diff --git a/syntax_files/js.yaml b/syntax_files/js.yaml deleted file mode 120000 index dabee93..0000000 --- a/syntax_files/js.yaml +++ /dev/null @@ -1 +0,0 @@ -javascript.yaml \ No newline at end of file diff --git a/syntax_files/js.yml b/syntax_files/js.yml deleted file mode 120000 index dabee93..0000000 --- a/syntax_files/js.yml +++ /dev/null @@ -1 +0,0 @@ -javascript.yaml \ No newline at end of file diff --git a/syntax_files/jsx.yaml b/syntax_files/jsx.yaml deleted file mode 120000 index dabee93..0000000 --- a/syntax_files/jsx.yaml +++ /dev/null @@ -1 +0,0 @@ -javascript.yaml \ No newline at end of file diff --git a/syntax_files/keymap.yaml b/syntax_files/keymap.yaml deleted file mode 100644 index 317a1ee..0000000 --- a/syntax_files/keymap.yaml +++ /dev/null @@ -1,27 +0,0 @@ -filetype: keymap - -detect: - filename: "\\.(k|key)?map$|Xmodmap$" - -rules: - - statement: "\\b(add|clear|compose|keycode|keymaps|keysym|remove|string)\\b" - - statement: "\\b(control|alt|shift)\\b" - - constant.number: "\\b[0-9]+\\b" - - special: "=" - - constant.string: - start: "\"" - end: "\"" - skip: "\\\\." - rules: - - constant.specialChar: "\\\\." - - constant.string: - start: "'" - end: "'" - skip: "\\\\." - rules: - - constant.specialChar: "\\\\." - - comment: - start: "^!" - end: "$" - rules: [] - diff --git a/syntax_files/kickstart.yaml b/syntax_files/kickstart.yaml deleted file mode 100644 index b12d4f2..0000000 --- a/syntax_files/kickstart.yaml +++ /dev/null @@ -1,16 +0,0 @@ -filetype: kickstart - -detect: - filename: "\\.ks$|\\.kickstart$" - -rules: - - special: "%[a-z]+" - - statement: "^[[:space:]]*(install|cdrom|text|graphical|volgroup|logvol|reboot|timezone|lang|keyboard|authconfig|firstboot|rootpw|user|firewall|selinux|repo|part|partition|clearpart|bootloader)" - - constant: "--(name|mirrorlist|baseurl|utc)(=|\\>)" - - statement: "\\$(releasever|basearch)\\>" - - brightblack: "^@[A-Za-z][A-Za-z-]*" - - brightred: "^-@[a-zA-Z0-9*-]+" - - red: "^-[a-zA-Z0-9*-]+" - - comment: "(^|[[:space:]])#([^{].*)?$" - - indent-char.whitespace: "[[:space:]]+$" - - indent-char: " + +| + +" diff --git a/syntax_files/ledger.yaml b/syntax_files/ledger.yaml deleted file mode 100644 index cb05c8a..0000000 --- a/syntax_files/ledger.yaml +++ /dev/null @@ -1,14 +0,0 @@ -filetype: ledger - -detect: - filename: "(^|\\.|/)ledger|ldgr|beancount|bnct$" - -rules: - - special: "^([0-9]{4}(/|-)[0-9]{2}(/|-)[0-9]{2}|[=~]) .*" - - constant: "^[0-9]{4}(/|-)[0-9]{2}(/|-)[0-9]{2}" - - statement: "^~ .*" - - identifier.var: "^= .*" - - identifier: "^[[:space:]]+(![[:space:]]+)?\\(?[A-Za-z ]+(:[A-Za-z ]+)*\\)?" - - identifier: "^[[:space:]]+(![[:space:]]+)?\\(?[A-Za-z_\\-]+(:[A-Za-z_\\-]+)*\\)?" - - symbol: "[*!]" - - comment: "^[[:space:]]*;.*" diff --git a/syntax_files/lfe.yaml b/syntax_files/lfe.yaml deleted file mode 100644 index c51ffbd..0000000 --- a/syntax_files/lfe.yaml +++ /dev/null @@ -1,17 +0,0 @@ -filetype: lfe - -detect: - filename: "lfe$|\\.lfe$" - -rules: - - symbol.brackets: "\\(|\\)" - - type: "defun|define-syntax|define|defmacro|defmodule|export" - - constant: "\\ [A-Za-z][A-Za-z0-9_-]+\\ " - - symbol.operator: "\\(([\\-+*/<>]|<=|>=)|'" - - constant.number: "\\b[0-9]+\\b" - - constant.string: "\\\"(\\\\.|[^\"])*\\\"" - - special: "['|`][A-Za-z][A-Za-z0-9_\\-]+" - - constant.specialChar: "\\\\.?" - - comment: "(^|[[:space:]]);.*" - - indent-char.whitespace: "[[:space:]]+$" - - indent-char: " + +| + +" diff --git a/syntax_files/lilypond.yaml b/syntax_files/lilypond.yaml deleted file mode 100644 index 8023091..0000000 --- a/syntax_files/lilypond.yaml +++ /dev/null @@ -1,26 +0,0 @@ -filetype: lilypond - -detect: - filename: "\\.ly$|\\.ily$|\\.lly$" - -rules: - - constant.number: "\\d+" - - identifier: "\\b(staff|spacing|signature|routine|notes|handler|corrected|beams|arpeggios|Volta_engraver|Voice|Vertical_align_engraver|Vaticana_ligature_engraver|VaticanaVoice|VaticanaStaff|Tweak_engraver|Tuplet_engraver|Trill_spanner_engraver|Timing_translator|Time_signature_performer|Time_signature_engraver|Tie_performer|Tie_engraver|Text_spanner_engraver|Text_engraver|Tempo_performer|Tab_tie_follow_engraver|Tab_staff_symbol_engraver|Tab_note_heads_engraver|TabVoice|TabStaff|System_start_delimiter_engraver|Stem_engraver|Stanza_number_engraver|Stanza_number_align_engraver|Staff_symbol_engraver|Staff_performer|Staff_collecting_engraver|StaffGroup|Staff|Spanner_break_forbid_engraver|Span_bar_stub_engraver|Span_bar_engraver|Span_arpeggio_engraver|Spacing_engraver|Slur_performer|Slur_engraver|Slash_repeat_engraver|Separating_line_group_engraver|Script_row_engraver|Script_engraver|Script_column_engraver|Score|Rhythmic_column_engraver|RhythmicStaff|Rest_engraver|Rest_collision_engraver|Repeat_tie_engraver|Repeat_acknowledge_engraver|Pure_from_neighbor_engraver|Pitched_trill_engraver|Pitch_squash_engraver|Piano_pedal_performer|Piano_pedal_engraver|Piano_pedal_align_engraver|PianoStaff|Phrasing_slur_engraver|PetrucciVoice|PetrucciStaff|Percent_repeat_engraver|Part_combine_engraver|Parenthesis_engraver|Paper_column_engraver|Output_property_engraver|Ottava_spanner_engraver|OneStaff|NullVoice|Note_spacing_engraver|Note_performer|Note_name_engraver|Note_heads_engraver|Note_head_line_engraver|NoteName\\|NoteHead|New_fingering_engraver|Multi_measure_rest_engraver|Midi_control_function_performer|Metronome_mark_engraver|Mensural_ligature_engraver|MensuralVoice|MensuralStaff|Mark_engraver|Lyrics|Lyric_performer|Lyric_engraver|Ligature_bracket_engraver|Ledger_line_engraver|Laissez_vibrer_engraver|Kievan_ligature_engraver|KievanVoice|KievanStaff|Key_performer|Key_engraver|Keep_alive_together_engraver|Instrument_switch_engraver|Instrument_name_engraver|Hyphen_engraver|Grob_pq_engraver|GregorianTranscriptionVoice|GregorianTranscriptionStaff|GrandStaff|Grace_spacing_engraver|Grace_engraver|Grace_beam_engraver|Grace_auto_beam_engraver|Global|Glissando_engraver|Fretboard_engraver|FretBoards|Forbid_line_break_engraver|Footnote_engraver|Font_size_engraver|Fingering_engraver|Fingering_column_engraver|Figured_bass_position_engraver|Figured_bass_engraver|FiguredBass|Extender_engraver|Episema_engraver|Dynamics|Dynamic_performer|Dynamic_engraver|Dynamic_align_engraver|Drum_notes_engraver|Drum_note_performer|DrumVoice|DrumStaff|Double_percent_repeat_engraver|Dots_engraver|Dot_column_engraver|Devnull|Default_bar_line_engraver|Custos_engraver|Cue_clef_engraver|CueVoice|Control_track_performer|Concurrent_hairpin_engraver|Collision_engraver|Cluster_spanner_engraver|Clef_engraver|Chord_tremolo_engraver|Chord_name_engraver|ChordNames|ChoirStaff|Breathing_sign_engraver|Break_align_engraver|Bend_engraver|Beam_performer|Beam_engraver|Beam_collision_engraver|Bar_number_engraver|Bar_engraver|Axis_group_engraver|Auto_beam_engraver|Arpeggio_engraver|Accidental_engraver|Score)\\b" - - statement: "[-_^]?\\\\[-A-Za-z_]+" - - preproc: "\\b(((gisis|gis|geses|ges|g|fisis|fis|feses|fes|f|eisis|eis|eeses|ees|e|disis|dis|deses|des|d|cisis|cis|ceses|ces|c|bisis|bis|beses|bes|b|aisis|ais|aeses|aes|a)[,']*[?!]?)|s|r|R|q)(128|64|32|16|8|4|2|1|\\\\breve|\\\\longa|\\\\maxima)?([^\\\\\\w]|_|\\b)" - - special: "[(){}<>]|\\[|\\]" - - constant.string: - start: "\"" - end: "\"" - skip: "\\\\." - rules: - - constant.specialChar: "\\\\." - - comment: - start: "%\\{" - end: "%\\}" - rules: [] - - comment: - start: "%" - end: "$" - rules: [] - diff --git a/syntax_files/mail.yaml b/syntax_files/mail.yaml deleted file mode 100644 index 57aa034..0000000 --- a/syntax_files/mail.yaml +++ /dev/null @@ -1,25 +0,0 @@ -filetype: mail - -detect: - filename: "(.*/mutt-.*|\\.eml)$" - header: "^From .* \\d+:\\d+:\\d+ \\d+" - -rules: - - type: "^From .*" - - identifier: "^[^[:space:]]+:" - - preproc: "^List-(Id|Archive|Subscribe|Unsubscribe|Post|Help):" - - constant: "^(To|From):" - - constant.string: - start: "^Subject:.*" - end: "$" - rules: - - constant.specialChar: "\\\\." - - statement: "?" - - default: - start: "^\\n\\n" - end: ".*" - rules: [] - - comment: - start: "^>.*" - end: "$" - rules: [] diff --git a/syntax_files/markdown.yaml b/syntax_files/markdown.yaml deleted file mode 100644 index 8376ff8..0000000 --- a/syntax_files/markdown.yaml +++ /dev/null @@ -1,50 +0,0 @@ ---- -filetype: markdown - -detect: - filename: "\\.(md|mkd|mkdn|markdown)$" - -rules: - # Tables (Github extension) - - type: ".*[ :]\\|[ :].*" - - # quotes - - statement: "^>.*" - - # Emphasis - - type: "(^|[[:space:]])(_[^ ][^_]*_|\\*[^ ][^*]*\\*)" - - # Strong emphasis - - type: "(^|[[:space:]])(__[^ ][^_]*__|\\*\\*[^ ][^*]*\\*\\*)" - - # strike-through - - type: "(^|[[:space:]])~~[^ ][^~]*~~" - - # horizontal rules - - special: "^(---+|===+|___+|\\*\\*\\*+)\\s*$" - - # headlines - - special: "^#{1,6}.*" - - # lists - - identifier: "^[[:space:]]*[\\*+-] |^[[:space:]]*[0-9]+\\. " - - # misc - - preproc: "(\\(([CcRr]|[Tt][Mm])\\)|\\.{3}|(^|[[:space:]])\\-\\-($|[[:space:]]))" - - # links - - constant: "\\[[^]]+\\]" - - constant: "\\[([^][]|\\[[^]]*\\])*\\]\\([^)]+\\)" - - # images - - underlined: "!\\[[^][]*\\](\\([^)]+\\)|\\[[^]]+\\])" - - # urls - - underlined: "https?://[^ )>]+" - - - special: "^```$" - - - special: - start: "`" - end: "`" - rules: [] diff --git a/syntax_files/micro.yaml b/syntax_files/micro.yaml deleted file mode 100644 index 8c84ffd..0000000 --- a/syntax_files/micro.yaml +++ /dev/null @@ -1,23 +0,0 @@ -filetype: micro - -detect: - filename: "\\.(micro)$" - -rules: - - statement: "\\b(syntax|color(-link)?)\\b" - - statement: "\\b(start=|end=)\\b" - - identifier: "\\b(default|comment|symbol|identifier|constant(.string(.char)?|.number)?|statement|preproc|type|special|underlined|error|todo|statusline|indent-char|(current-)?line-number|gutter-error|gutter-warning|cursor-line|color-column)\\b" - - constant.number: "\\b(|h|A|0x)+[0-9]+(|h|A)+\\b" - - constant.number: "\\b0x[0-9 a-f A-F]+\\b" - - comment: - start: "#" - end: "$" - rules: [] - - constant.string: - start: "\"" - end: "\"" - skip: "\\\\." - rules: - - constant.specialChar: "\\\\." - - constant.number: "#[0-9 A-F a-f]+" - diff --git a/syntax_files/mpdconf.yaml b/syntax_files/mpdconf.yaml deleted file mode 100644 index 783c85e..0000000 --- a/syntax_files/mpdconf.yaml +++ /dev/null @@ -1,13 +0,0 @@ -filetype: mpd - -detect: - filename: "mpd\\.conf$" - -rules: - - statement: "\\b(user|group|bind_to_address|host|port|plugin|name|type)\\b" - - statement: "\\b((music|playlist)_directory|(db|log|state|pid|sticker)_file)\\b" - - special: "^(input|audio_output|decoder)[[:space:]]*\\{|\\}" - - constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'" - - comment: "(^|[[:space:]])#([^{].*)?$" - - indent-char.whitespace: "[[:space:]]+$" - - indent-char: " + +| + +" diff --git a/syntax_files/nanorc.yaml b/syntax_files/nanorc.yaml deleted file mode 100644 index 704501c..0000000 --- a/syntax_files/nanorc.yaml +++ /dev/null @@ -1,16 +0,0 @@ -filetype: nanorc - -detect: - filename: "\\.?nanorc$" - -rules: - - default: "(?i)^[[:space:]]*((un)?set|include|syntax|i?color).*$" - - type: "(?i)^[[:space:]]*(set|unset)[[:space:]]+(autoindent|backup|backupdir|backwards|boldtext|brackets|casesensitive|const|cut|fill|historylog|matchbrackets|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nonewlines|nowrap|operatingdir|preserve|punct)\\>|^[[:space:]]*(set|unset)[[:space:]]+(quickblank|quotestr|rebinddelete|rebindkeypad|regexp|smarthome|smooth|speller|suspend|tabsize|tabstospaces|tempfile|undo|view|whitespace|wordbounds)\\b" - - preproc: "(?i)^[[:space:]]*(set|unset|include|syntax|header)\\b" - - constant.bool.true: "(?i)(set)\\b" - - constant.bool.false: "(?i)(unset)\\b" - - identifier: "(?i)^[[:space:]]*(i)?color[[:space:]]*(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\\b" - - special: "(?i)^[[:space:]]*(i)?color\\b|\\b(start|end)=" - - constant.string: "\"(\\\\.|[^\"])*\"" - - comment: "^[[:space:]]*#.*$" - - comment.bright: "^[[:space:]]*##.*$" diff --git a/syntax_files/netstat.yaml b/syntax_files/netstat.yaml deleted file mode 100644 index 5b70ee4..0000000 --- a/syntax_files/netstat.yaml +++ /dev/null @@ -1,30 +0,0 @@ -filetype: netstat - -detect: - filename: "\\.netstat$" - header: "(^Active Internet connections|\\sRecv-Q\\sSend-Q\\sLocal Address)" - -rules: - # Scan Title - - magenta: "\\sRecv-Q\\sSend-Q\\sLocal Address.*" - # IP - - yellow: "\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}" - # Ports - - green: "^(\\d+)" - - red: "(\\s+\\d+)/(\\w+).*" - - red: "users:\\(\\(\"[a-zA-Z.0-9-]+\",pid=\\d+,fd=\\d+\\).*" - - magenta: "\\s+([a-zA-Z-]+)$" - # Ports Details - - yellow: "^\\|_?(.*)" - - yellow: "(Service Info|OS details|Device type|Running):\\s.*$" - - constant.number: "(\\b[0-9.]+\\b|\\b0x[0-9A-Fa-f]+\\b)([ms|s|seconds])?(\\s+|$)" - - yellow: "\\d{4}-\\d{2}-\\d{2}\\s\\d{2}:\\d{2}(:\\d{2})?" - - yellow: "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}" - # hostname - - yellow: "\\s+([a-z-]+\\.)?[a-z-]+\\.[a-z-]+\\.[a-z-]+" - - green: "(tcp)(6)?" - - yellow: "(unix|udp(6)?)" - - green: "(CONNECTED|ESTABLISHED|LISTEN)" - - red: "\\s+SYN_SENT" - - yellow: "pid=\\d+" - - green: "\"[a-zA-Z.0-9-]+\"" diff --git a/syntax_files/nginx.yaml b/syntax_files/nginx.yaml deleted file mode 100644 index c2223b5..0000000 --- a/syntax_files/nginx.yaml +++ /dev/null @@ -1,22 +0,0 @@ -filetype: nginx - -detect: - filename: "nginx.*\\.conf$|\\.nginx$" - header: "^(server|upstream)[a-z ]*\\{$" - -rules: - - preproc: "\\b(events|server|http|location|upstream)[[:space:]]*\\{" - - statement: "(^|[[:space:]{;])(access_log|add_after_body|add_before_body|add_header|addition_types|aio|alias|allow|ancient_browser|ancient_browser_value|auth_basic|auth_basic_user_file|autoindex|autoindex_exact_size|autoindex_localtime|break|charset|charset_map|charset_types|chunked_transfer_encoding|client_body_buffer_size|client_body_in_file_only|client_body_in_single_buffer|client_body_temp_path|client_body_timeout|client_header_buffer_size|client_header_timeout|client_max_body_size|connection_pool_size|create_full_put_path|daemon|dav_access|dav_methods|default_type|deny|directio|directio_alignment|disable_symlinks|empty_gif|env|error_log|error_page|expires|fastcgi_buffer_size|fastcgi_buffers|fastcgi_busy_buffers_size|fastcgi_cache|fastcgi_cache_bypass|fastcgi_cache_key|fastcgi_cache_lock|fastcgi_cache_lock_timeout|fastcgi_cache_min_uses|fastcgi_cache_path|fastcgi_cache_use_stale|fastcgi_cache_valid|fastcgi_connect_timeout|fastcgi_hide_header|fastcgi_ignore_client_abort|fastcgi_ignore_headers|fastcgi_index|fastcgi_intercept_errors|fastcgi_keep_conn|fastcgi_max_temp_file_size|fastcgi_next_upstream|fastcgi_no_cache|fastcgi_param|fastcgi_pass|fastcgi_pass_header|fastcgi_read_timeout|fastcgi_send_timeout|fastcgi_split_path_info|fastcgi_store|fastcgi_store_access|fastcgi_temp_file_write_size|fastcgi_temp_path|flv|geo|geoip_city|geoip_country|gzip|gzip_buffers|gzip_comp_level|gzip_disable|gzip_http_version|gzip_min_length|gzip_proxied|gzip_static|gzip_types|gzip_vary|if|if_modified_since|ignore_invalid_headers|image_filter|image_filter_buffer|image_filter_jpeg_quality|image_filter_sharpen|image_filter_transparency|include|index|internal|ip_hash|keepalive|keepalive_disable|keepalive_requests|keepalive_timeout|large_client_header_buffers|limit_conn|limit_conn_log_level|limit_conn_zone|limit_except|limit_rate|limit_rate_after|limit_req|limit_req_log_level|limit_req_zone|limit_zone|lingering_close|lingering_time|lingering_timeout|listen|location|log_format|log_not_found|log_subrequest|map|map_hash_bucket_size|map_hash_max_size|master_process|max_ranges|memcached_buffer_size|memcached_connect_timeout|memcached_next_upstream|memcached_pass|memcached_read_timeout|memcached_send_timeout|merge_slashes|min_delete_depth|modern_browser|modern_browser_value|mp4|mp4_buffer_size|mp4_max_buffer_size|msie_padding|msie_refresh|open_file_cache|open_file_cache_errors|open_file_cache_min_uses|open_file_cache_valid|open_log_file_cache|optimize_server_names|override_charset|pcre_jit|perl|perl_modules|perl_require|perl_set|pid|port_in_redirect|postpone_output|proxy_buffer_size|proxy_buffering|proxy_buffers|proxy_busy_buffers_size|proxy_cache|proxy_cache_bypass|proxy_cache_key|proxy_cache_lock|proxy_cache_lock_timeout|proxy_cache_min_uses|proxy_cache_path|proxy_cache_use_stale|proxy_cache_valid|proxy_connect_timeout|proxy_cookie_domain|proxy_cookie_path|proxy_hide_header|proxy_http_version|proxy_ignore_client_abort|proxy_ignore_headers|proxy_intercept_errors|proxy_max_temp_file_size|proxy_next_upstream|proxy_no_cache|proxy_pass|proxy_pass_header|proxy_read_timeout|proxy_redirect|proxy_send_timeout|proxy_set_header|proxy_ssl_session_reuse|proxy_store|proxy_store_access|proxy_temp_file_write_size|proxy_temp_path|random_index|read_ahead|real_ip_header|recursive_error_pages|request_pool_size|reset_timedout_connection|resolver|resolver_timeout|return|rewrite|root|satisfy|satisfy_any|secure_link_secret|send_lowat|send_timeout|sendfile|sendfile_max_chunk|server|server|server_name|server_name_in_redirect|server_names_hash_bucket_size|server_names_hash_max_size|server_tokens|set|set_real_ip_from|source_charset|split_clients|ssi|ssi_silent_errors|ssi_types|ssl|ssl_certificate|ssl_certificate_key|ssl_ciphers|ssl_client_certificate|ssl_crl|ssl_dhparam|ssl_engine|ssl_prefer_server_ciphers|ssl_protocols|ssl_session_cache|ssl_session_timeout|ssl_verify_client|ssl_verify_depth|sub_filter|sub_filter_once|sub_filter_types|tcp_nodelay|tcp_nopush|timer_resolution|try_files|types|types_hash_bucket_size|types_hash_max_size|underscores_in_headers|uninitialized_variable_warn|upstream|user|userid|userid_domain|userid_expires|userid_name|userid_p3p|userid_path|userid_service|valid_referers|variables_hash_bucket_size|variables_hash_max_size|worker_priority|worker_processes|worker_rlimit_core|worker_rlimit_nofile|working_directory|xml_entities|xslt_stylesheet|xslt_types)([[:space:]]|$)" - - constant.bool.true: "\\b(on)\\b" - - constant.bool.false: "\\b(off)\\b" - - identifier: "\\$[A-Za-z][A-Za-z0-9_]*" - - symbol: "[*]" - - constant-string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'" - - constant.string: - start: "'$" - end: "';$" - rules: [] - - - comment: "(^|[[:space:]])#([^{].*)?$" - - indent-char.whitespace: "[[:space:]]+$" - - indent-char: " + +| + +" diff --git a/syntax_files/nim.yaml b/syntax_files/nim.yaml deleted file mode 100644 index e766cad..0000000 --- a/syntax_files/nim.yaml +++ /dev/null @@ -1,27 +0,0 @@ -filetype: nim - -detect: - filename: "\\.nim$" - -rules: - - preproc: "[\\{\\|]\\b(atom|lit|sym|ident|call|lvalue|sideeffect|nosideeffect|param|genericparam|module|type|let|var|const|result|proc|method|iterator|converter|macro|template|field|enumfield|forvar|label|nk[a-zA-Z]+|alias|noalias)\\b[\\}\\|]" - - statement: "\\b(addr|and|as|asm|atomic|bind|block|break|case|cast|concept|const|continue|converter|defer|discard|distinct|div|do|elif|else|end|enum|except|export|finally|for|from|func|generic|if|import|in|include|interface|is|isnot|iterator|let|macro|method|mixin|mod|nil|not|notin|object|of|or|out|proc|ptr|raise|ref|return|shl|shr|static|template|try|tuple|type|using|var|when|while|with|without|xor|yield)\\b" - - statement: "\\b(deprecated|noSideEffect|constructor|destructor|override|procvar|compileTime|noReturn|acyclic|final|shallow|pure|asmNoStackFrame|error|fatal|warning|hint|line|linearScanEnd|computedGoto|unroll|immediate|checks|boundsChecks|overflowChecks|nilChecks|assertations|warnings|hints|optimization|patterns|callconv|push|pop|global|pragma|experimental|bitsize|volatile|noDecl|header|incompleteStruct|compile|link|passC|passL|emit|importc|importcpp|importobjc|codegenDecl|injectStmt|intdefine|strdefine|varargs|exportc|extern|bycopy|byref|union|packed|unchecked|dynlib|cdecl|thread|gcsafe|threadvar|guard|locks|compileTime)\\b" - - symbol.operator: "[=\\+\\-\\*/<>@\\$~&%\\|!\\?\\^\\.:\\\\]+" - - special: "\\{\\.|\\.\\}|\\[\\.|\\.\\]|\\(\\.|\\.\\)|;|,|`" - - statement: "\\.\\." - - type: "\\b(int|cint|int8|int16|int32|int64|uint|uint8|uint16|uint32|uint64|float|float32|float64|bool|char|enum|string|cstring|array|openarray|seq|varargs|tuple|object|set|void|auto|cshort|range|nil|T|untyped|typedesc)\\b" - - type: "'[iI](8|16|32|64)?\\b|'[uU](8|16|32|64)?\\b|'[fF](32|64|128)?\\b|'[dD]\\b" - - constant.number: "\\b[0-9]+\\b" - - constant.number: "\\b0[xX][0-9A-Fa-f][0-9_A-Fa-f]+\\b" - - constant.number: "\\b0[ocC][0-7][0-7_]+\\b" - - constant.number: "\\b0[bB][01][01_]+\\b" - - constant.number: "\\b[0-9_]((\\.?)[0-9_]+)?[eE][+\\-][0-9][0-9_]+\\b" - - constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'" - - comment: "[[:space:]]*#.*$" - - comment: - start: "\\#\\[" - end: "\\]\\#" - rules: [] - - - todo: "(TODO|FIXME|XXX):?" diff --git a/syntax_files/nmap.yaml b/syntax_files/nmap.yaml deleted file mode 100644 index 5b66794..0000000 --- a/syntax_files/nmap.yaml +++ /dev/null @@ -1,39 +0,0 @@ -filetype: nmap - -detect: - filename: "\\.nmap$" - header: "(^Starting Nmap)" - -rules: - # Scan Title - - cyan: "Nmap scan report for (\\S+)\\s\\(([^\\)]+)\\)" - # Up - - green: "Host is (up)" - # errors - - red: "Failed\\sto\\sresolve\\s\"(\\S+)\"" - # IP - - yellow: "\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}" - # Ports - - green: "^(\\d+)" - - red: "/(\\w+)\\s+(\\w+)\\s+(\\S+)" - - magenta: "\\s+([a-zA-Z-]+)$" - # Titles - - cyan: "^(PORT.*$)|^(HOP.*)" - # Ports Details - - yellow: "^\\|_?(.*)" - # Trace - - cyan: "^\\d+\\s+(\\d+\\.\\d+\\sms)[^0-9]*(\\d+\\.\\d+\\.\\d+\\.\\d+)" - # Network Distance: - - green: "Network Distance:\\s(\\d+)" - - green: "\\sopen\\s" - - yellow: "\\sfiltered\\s" - - red: "\\sclosed\\s" - - cyan: "\\sunfiltered\\s" - - yellow: "(Service Info|OS details|Device type|Running):\\s.*$" - # Closed ports - - red: "Not shown: (\\d+)\\s(closed|filtered)\\sports" - - constant.number: "(\\b[0-9.]+\\b|\\b0x[0-9A-Fa-f]+\\b)([ms|s|seconds])?(\\s+|$)" - - yellow: "\\d{4}-\\d{2}-\\d{2}\\s\\d{2}:\\d{2}(:\\d{2})?" - - yellow: "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}" - # hostname - - yellow: "\\s+([a-z-]+\\.)?[a-z-]+\\.[a-z-]+\\.[a-z-]+" diff --git a/syntax_files/objc.yaml b/syntax_files/objc.yaml deleted file mode 100644 index 1a8b719..0000000 --- a/syntax_files/objc.yaml +++ /dev/null @@ -1,60 +0,0 @@ -filetype: objective-c - -detect: - filename: "\\.(m|mm|h)$" - -rules: - - type: "\\b(float|double|CGFloat|id|bool|BOOL|Boolean|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline|Class|SEL|IMP|NS(U)?Integer)\\b" - - type: "\\b((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\\b" - - type: "\\b[A-Z][A-Z][[:alnum:]]*\\b" - - type: "\\b[A-Za-z0-9_]*_t\\b" - - type: "\\bdispatch_[a-zA-Z0-9_]*_t\\b" - - - statement: "(__attribute__[[:space:]]*\\(\\([^)]*\\)\\)|__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__|__unused|_Nonnull|_Nullable|__block|__builtin.*)" - - statement: "\\b(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\\b" - - statement: "\\b(for|if|while|do|else|case|default|switch)\\b" - - statement: "\\b(try|throw|catch|operator|new|delete)\\b" - - statement: "\\b(goto|continue|break|return)\\b" - - statement: "\\b(nonatomic|atomic|readonly|readwrite|strong|weak|assign)\\b" - - statement: "@(encode|end|interface|implementation|class|selector|protocol|synchronized|try|catch|finally|property|optional|required|import|autoreleasepool)" - - - preproc: "^[[:space:]]*#[[:space:]]*(define|include|import|(un|ifn?)def|endif|el(if|se)|if|warning|error|pragma).*$" - - preproc: "__[A-Z0-9_]*__" - - - special: "^[[:space:]]*[#|@][[:space:]]*(import|include)[[:space:]]*[\"|<].*\\/?[>|\"][[:space:]]*$" - - - statement: "([.:;,+*|=!\\%\\[\\]]|<|>|/|-|&)" - - - constant.number: "(\\b(-?)?[0-9]+\\b|\\b\\[0-9]+\\.[0-9]+\\b|\\b0x[0-9A-F]+\\b)" - - constant: "(@\\[(\\\\.|[^\\]])*\\]|@\\{(\\\\.|[^\\}])*\\}|@\\((\\\\.|[^\\)])*\\))" - - constant: "\\b<(\\\\.[^\\>])*\\>\\b" - - constant: "\\b(nil|NULL|YES|NO|TRUE|true|FALSE|false|self)\\b" - - constant: "\\bk[[:alnum]]*\\b" - - constant.string: "'.'" - - - constant.string: - start: "@\"" - end: "\"" - skip: "\\\\." - rules: - - constant.specialChar: "\\\\." - - - constant.string: - start: "\"" - end: "\"" - skip: "\\\\." - rules: - - constant.specialChar: "\\\\." - - - comment: - start: "//" - end: "$" - rules: - - todo: "(TODO|XXX|FIXME):?" - - - comment: - start: "/\\*" - end: "\\*/" - rules: - - todo: "(TODO|XXX|FIXME):?" - diff --git a/syntax_files/ocaml.yaml b/syntax_files/ocaml.yaml deleted file mode 100644 index 9fc0418..0000000 --- a/syntax_files/ocaml.yaml +++ /dev/null @@ -1,26 +0,0 @@ -filetype: ocaml - -detect: - filename: "\\.mli?$" - -rules: - # Numbers - ## Integers - ### Binary - - constant.number: "-?0[bB][01][01_]*" - ### Octal - - constant.number: "-?0[oO][0-7][0-7_]*" - ### Decimal - - constant.number: "-?\\d[\\d_]*" - ### Hexadecimal - - constant.number: "-?0[xX][0-9a-fA-F][0-9a-fA-F_]*" - ## Real - ### Decimal - - constant.number: "-?\\d[\\d_]*.\\d[\\d_]*([eE][+-]\\d[\\d_]*.\\d[\\d_]*)?" - ### Hexadecimal - - constant.number: "-?0[xX][0-9a-fA-F][0-9a-fA-F_]*.[0-9a-fA-F][0-9a-fA-F_]*([pP][+-][0-9a-fA-F][0-9a-fA-F_]*.[0-9a-fA-F][0-9a-fA-F_]*)?" - # Comments - - comment: - start: "\\(\\*" - end: "\\*\\)" - rules: [] \ No newline at end of file diff --git a/syntax_files/pascal.yaml b/syntax_files/pascal.yaml deleted file mode 100644 index cb67881..0000000 --- a/syntax_files/pascal.yaml +++ /dev/null @@ -1,45 +0,0 @@ -filetype: pascal - -detect: - filename: "\\.pas$" - -rules: - - type: "\\b(?i:(string|ansistring|widestring|shortstring|char|ansichar|widechar|boolean|byte|shortint|word|smallint|longword|cardinal|longint|integer|int64|single|currency|double|extended))\\b" - - statement: "\\b(?i:(and|asm|array|begin|break|case|const|constructor|continue|destructor|div|do|downto|else|end|file|for|function|goto|if|implementation|in|inline|interface|label|mod|not|object|of|on|operator|or|packed|procedure|program|record|repeat|resourcestring|set|shl|shr|then|to|type|unit|until|uses|var|while|with|xor))\\b" - - statement: "\\b(?i:(as|class|dispose|except|exit|exports|finalization|finally|inherited|initialization|is|library|new|on|out|property|raise|self|threadvar|try))\\b" - - statement: "\\b(?i:(absolute|abstract|alias|assembler|cdecl|cppdecl|default|export|external|forward|generic|index|local|name|nostackframe|oldfpccall|override|pascal|private|protected|public|published|read|register|reintroduce|safecall|softfloat|specialize|stdcall|virtual|write))\\b" - - constant: "\\b(?i:(false|true|nil))\\b" - - special: - start: "asm" - end: "end" - rules: [] - - constant.number: "\\$[0-9A-Fa-f]+" - - constant.number: "\\b[+-]?[0-9]+([.]?[0-9]+)?(?i:e[+-]?[0-9]+)?" - - constant.string: - start: "#[0-9]{1,}" - end: "$" - rules: - - constant.specialChar: "\\\\." - - constant.string: - start: "'" - end: "'" - skip: "\\\\." - rules: - - constant.specialChar: "\\\\." - - preproc: - start: "{\\$" - end: "}" - rules: [] - - comment: - start: "//" - end: "$" - rules: [] - - comment: - start: "\\(\\*" - end: "\\*\\)" - rules: [] - - comment: - start: "({)(?:[^$])" - end: "}" - rules: [] - diff --git a/syntax_files/patch.yaml b/syntax_files/patch.yaml deleted file mode 100644 index 452dd31..0000000 --- a/syntax_files/patch.yaml +++ /dev/null @@ -1,13 +0,0 @@ -filetype: patch - -detect: - filename: "\\.(patch|diff)$" - -rules: - - brightgreen: "^\\+.*" - - green: "^\\+\\+\\+.*" - - brightblue: "^ .*" - - brightred: "^-.*" - - red: "^---.*" - - brightyellow: "^@@.*" - - magenta: "^diff.*" diff --git a/syntax_files/peg.yaml b/syntax_files/peg.yaml deleted file mode 100644 index a023b86..0000000 --- a/syntax_files/peg.yaml +++ /dev/null @@ -1,16 +0,0 @@ -filetype: peg - -detect: - filename: "\\.l?peg$" - -rules: - - identifier: "^[[:space:]]*[A-Za-z][A-Za-z0-9_]*[[:space:]]*<-" - - constant.number: "\\^[+-]?[0-9]+" - - symbol.operator: "[-+*?^/!&]|->|<-|=>" - - identifier.var: "%[A-Za-z][A-Za-z0-9_]*" - - special: "\\[[^]]*\\]" - - constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'" - - comment: "(^|[[:space:]])\\-\\-.*$" - - todo: "TODO:?" - - indent-char.whitespace: "[[:space:]]+$" - - indent-char: " + +| + +" diff --git a/syntax_files/perl.yaml b/syntax_files/perl.yaml deleted file mode 100644 index 15193e0..0000000 --- a/syntax_files/perl.yaml +++ /dev/null @@ -1,27 +0,0 @@ -filetype: perl - -detect: - filename: "\\.p[lm]$" - header: "^#!.*/(env +)?perl( |$)" - -rules: - - type: "\\b(accept|alarm|atan2|bin(d|mode)|c(aller|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork))\\b|\\b(get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join)\\b|\\b(keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek(dir)?)\\b|\\b(se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr(y)?|truncate|umask)\\b|\\b(un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\\b" - - statement: "\\b(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne|lt|gt|le|ge|cmp|x|my|sub|use|package|can|isa)\\b" - - identifier: - start: "[$@%]" - end: "((?i) |[^0-9A-Z_]|-)" - rules: [] - - - constant.string: "\".*\"|qq\\|.*\\|" - - default: "[sm]/.*/" - - preproc: - start: "(^use| = new)" - end: ";" - rules: [] - - - comment: "#.*" - - identifier.macro: - start: "<< 'STOP'" - end: "STOP" - rules: [] - diff --git a/syntax_files/perl6.yaml b/syntax_files/perl6.yaml deleted file mode 100644 index 4b4d7df..0000000 --- a/syntax_files/perl6.yaml +++ /dev/null @@ -1,27 +0,0 @@ -filetype: perl6 - -detect: - filename: "\\.p6$" - -rules: - - type: "\\b(accept|alarm|atan2|bin(d|mode)|c(aller|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork)|get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join|keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek|seekdir|se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr|y|truncate|umask|un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\\b" - - statement: "\\b(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne|lt|gt|le|ge|cmp|x|my|sub|use|package|can|isa)\\b" - - special: "\\b(has|is|class|role|given|when|BUILD|multi|returns|method|submethod|slurp|say|sub)\\b" - - identifier: - start: "[$@%]" - end: "( |\\\\W|-)" - rules: [] - - - constant.string: "\".*\"|qq\\|.*\\|" - - default: "[sm]/.*/" - - preproc: - start: "(^use| = new)" - end: ";" - rules: [] - - - comment: "#.*" - - identifier.macro: - start: "<)" - - statement: "(\\||\\&|\\,|\\^)" - - symbol.operator: "(\\-|\\+|\\*|/|\\!|%|<<|>>)" - - symbol.operator: "(==|!=|<=|>=|<|>)" - - statement: "\\b(is|isnt|not|and|or|xor)\\b" - - type: "\\b(_*[A-Z][_a-zA-Z0-9\\']*)\\b" - - constant: "\\b(this)\\b" - - constant.bool: "\\b(true|false)\\b" - - constant.number: "\\b((0b[0-1_]*)|(0o[0-7_]*)|(0x[0-9a-fA-F_]*)|([0-9_]+(\\.[0-9_]+)?((e|E)(\\\\+|-)?[0-9_]+)?))\\b" - - constant.string: "\"(\\\\.|[^\"])*\"" - - comment: - start: "\"\"\"[^\"]*" - end: "\"\"\"" - rules: [] - - - comment: "(^|[[:space:]])//.*" - - comment: - start: "/\\*" - end: "\\*/" - rules: [] - - - todo: "TODO:?" diff --git a/syntax_files/pov.yaml b/syntax_files/pov.yaml deleted file mode 100644 index 01f4270..0000000 --- a/syntax_files/pov.yaml +++ /dev/null @@ -1,21 +0,0 @@ -filetype: pov - -detect: - filename: "\\.(pov|POV|povray|POVRAY)$" - -rules: - - preproc: "^[[:space:]]*#[[:space:]]*(declare)" - - statement: "\\b(sphere|cylinder|translate|matrix|rotate|scale)\\b" - - statement: "\\b(orthographic|location|up|right|direction|clipped_by)\\b" - - statement: "\\b(fog_type|fog_offset|fog_alt|rgb|distance|transform)\\b" - - identifier: "^\\b(texture)\\b" - - identifier: "\\b(light_source|background)\\b" - - identifier: "\\b(fog|object|camera)\\b" - - symbol.operator: "(\\{|\\}|\\(|\\)|\\;|\\]|\\[|`|\\\\|\\$|<|>|!|=|&|\\|)" - - special: "\\b(union|group|subgroup)\\b" - - comment: "//.*" - - comment: - start: "/\\*" - end: "\\*/" - rules: [] - diff --git a/syntax_files/privoxy-action.yaml b/syntax_files/privoxy-action.yaml deleted file mode 100644 index 33e15ad..0000000 --- a/syntax_files/privoxy-action.yaml +++ /dev/null @@ -1,14 +0,0 @@ -filetype: privoxy-action - -detect: - filename: "\\.action$" - -rules: - - constant.bool.false: "[{[:space:]]\\-block([[:space:]{}]|$)" - - constant.bool.true: "[{[:space:]]\\+block([[:space:]{}]|$)" - - constant.bool.false: "-(add-header|change-x-forwarded-for|client-header-filter|client-header-tagger|content-type-overwrite|crunch-client-header|crunch-if-none-match|crunch-incoming-cookies|crunch-outgoing-cookies|crunch-server-header|deanimate-gifs|downgrade-http-version|fast-redirects|filter|force-text-mode|forward-override|handle-as-empty-document|handle-as-image|hide-accept-language|hide-content-disposition|hide-from-header|hide-if-modified-since|hide-referrer|hide-user-agent|limit-connect|overwrite-last-modified|prevent-compression|redirect|server-header-filter|server-header-tagger|session-cookies-only|set-image-blocker)" - - constant.bool.true: "\\+(add-header|change-x-forwarded-for|client-header-filter|client-header-tagger|content-type-overwrite|crunch-client-header|crunch-if-none-match|crunch-incoming-cookies|crunch-outgoing-cookies|crunch-server-header|deanimate-gifs|downgrade-http-version|fast-redirects|filter|force-text-mode|forward-override|handle-as-empty-document|handle-as-image|hide-accept-language|hide-content-disposition|hide-from-header|hide-if-modified-since|hide-referrer|hide-user-agent|limit-connect|overwrite-last-modified|prevent-compression|redirect|server-header-filter|server-header-tagger|session-cookies-only|set-image-blocker)" - - constant.specialChar: "\\\\.?" - - comment: "(^|[[:space:]])#([^{].*)?$" - - indent-char.whitespace: "[[:space:]]+$" - - indent-char: " + +| + +" diff --git a/syntax_files/privoxy-config.yaml b/syntax_files/privoxy-config.yaml deleted file mode 100644 index bdce3f6..0000000 --- a/syntax_files/privoxy-config.yaml +++ /dev/null @@ -1,10 +0,0 @@ -filetype: privoxy-config - -detect: - filename: "privoxy/config$" - -rules: - - statement: "(accept-intercepted-requests|actionsfile|admin-address|allow-cgi-request-crunching|buffer-limit|compression-level|confdir|connection-sharing|debug|default-server-timeout|deny-access|enable-compression|enable-edit-actions|enable-remote-http-toggle|enable-remote-toggle|enforce-blocks|filterfile|forward|forwarded-connect-retries|forward-socks4|forward-socks4a|forward-socks5|handle-as-empty-doc-returns-ok|hostname|keep-alive-timeout|listen-address|logdir|logfile|max-client-connections|permit-access|proxy-info-url|single-threaded|socket-timeout|split-large-forms|templdir|toggle|tolerate-pipelining|trustfile|trust-info-url|user-manual)[[:space:]]" - - comment: "(^|[[:space:]])#([^{].*)?$" - - indent-char.whitespace: "[[:space:]]+$" - - indent-char: " + +| + +" diff --git a/syntax_files/privoxy-filter.yaml b/syntax_files/privoxy-filter.yaml deleted file mode 100644 index 7be9351..0000000 --- a/syntax_files/privoxy-filter.yaml +++ /dev/null @@ -1,12 +0,0 @@ -filetype: privoxy-filter - -detect: - filename: "\\.filter$" - -rules: - - statement: "^(FILTER|CLIENT-HEADER-FILTER|CLIENT-HEADER-TAGGER|SERVER-HEADER-FILTER|SERVER-HEADER-TAGGER): [a-z-]+" - - identifier: "^(FILTER|CLIENT-HEADER-FILTER|CLIENT-HEADER-TAGGER|SERVER-HEADER-FILTER|SERVER-HEADER-TAGGER):" - - constant.specialChar: "\\\\.?" - - comment: "(^|[[:space:]])#([^{].*)?$" - - indent-char.whitespace: "[[:space:]]+$" - - indent-char: " + +| + +" diff --git a/syntax_files/puppet.yaml b/syntax_files/puppet.yaml deleted file mode 100644 index 7fd1b54..0000000 --- a/syntax_files/puppet.yaml +++ /dev/null @@ -1,22 +0,0 @@ -filetype: puppet - -detect: - filename: "\\.pp$" - -rules: - - default: "^[[:space:]]([a-z][a-z0-9_]+)" - - identifier.var: "\\$[a-z:][a-z0-9_:]+" - - type: "\\b(augeas|computer|cron|exec|file|filebucket|group|host|interface|k5login|macauthorization|mailalias|maillist|mcx|mount|nagios_command|nagios_contact|nagios_contactgroup|nagios_host|nagios_hostdependency|nagios_hostescalation|nagios_hostextinfo|nagios_hostgroup|nagios_service|nagios_servicedependency|nagios_serviceescalation|nagios_serviceextinfo|nagios_servicegroup|nagios_timeperiod|notify|package|resources|router|schedule|scheduled_task|selboolean|selmodule|service|ssh_authorized_key|sshkey|stage|tidy|user|vlan|yumrepo|zfs|zone|zpool|anchor)\\b" - - statement: "\\b(class|define|if|else|undef|inherits)\\b" - - symbol: "(=|-|~|>)" - - identifier.var: "(\\$|@|@@)?\\b[A-Z]+[0-9A-Z_a-z]*" - - symbol: "([ ]|^):[0-9A-Z_]+\\b" - - constant: "/([^/]|(\\\\/))*/[iomx]*|%r\\{([^}]|(\\\\}))*\\}[iomx]*" - - constant.string: "`[^`]*`|%x\\{[^}]*\\}" - - constant.string: "\"([^\"]|(\\\\\"))*\"|%[QW]?\\{[^}]*\\}|%[QW]?\\([^)]*\\)|%[QW]?<[^>]*>|%[QW]?\\[[^]]*\\]|%[QW]?\\$[^$]*\\$|%[QW]?\\^[^^]*\\^|%[QW]?![^!]*!" - - special: "\\$\\{[^}]*\\}" - - constant.string: "'([^']|(\\\\'))*'|%[qw]\\{[^}]*\\}|%[qw]\\([^)]*\\)|%[qw]<[^>]*>|%[qw]\\[[^]]*\\]|%[qw]\\$[^$]*\\$|%[qw]\\^[^^]*\\^|%[qw]![^!]*!" - - comment: "#[^{].*$|#$" - - comment.bright: "##[^{].*$|##$" - - todo: "(XXX|TODO|FIXME|\\?\\?\\?)" - - indent-char.whitespace: "[[:space:]]+$" diff --git a/syntax_files/python2.yaml b/syntax_files/python2.yaml deleted file mode 100644 index dc892ba..0000000 --- a/syntax_files/python2.yaml +++ /dev/null @@ -1,60 +0,0 @@ -filetype: python - -detect: - filename: "\\.py$" - header: "^#!.*/(env +)?python( |$)" - -rules: - - # built-in objects - - constant: "\\b(None|self|True|False)\\b" - # built-in attributes - - constant: "\\b(__bases__|__builtin__|__class__|__debug__|__dict__|__doc__|__file__|__members__|__methods__|__name__|__self__)\\b" - # built-in functions - - identifier: "\\b(abs|apply|callable|chr|cmp|compile|delattr|dir|divmod|eval|exec|execfile|filter|format|getattr|globals|hasattr|hash|help|hex|id|input|intern|isinstance|issubclass|len|locals|max|min|next|oct|open|ord|pow|range|raw_input|reduce|reload|repr|round|setattr|unichr|vars|zip|__import__)\\b" - # special method names - - identifier: "\\b(__abs__|__add__|__and__|__call__|__cmp__|__coerce__|__complex__|__concat__|__contains__|__del__|__delattr__|__delitem__|__dict__|__delslice__|__div__|__divmod__|__float__|__getattr__|__getitem__|__getslice__|__hash__|__hex__|__init__|__int__|__inv__|__invert__|__len__|__long__|__lshift__|__mod__|__mul__|__neg__|__nonzero__|__oct__|__or__|__pos__|__pow__|__radd__|__rand__|__rcmp__|__rdiv__|__rdivmod__|__repeat__|__repr__|__rlshift__|__rmod__|__rmul__|__ror__|__rpow__|__rrshift__|__rshift__|__rsub__|__rxor__|__setattr__|__setitem__|__setslice__|__str__|__sub__|__xor__)\\b" - # types - - type: "\\b(basestring|bool|buffer|bytearray|bytes|classmethod|complex|dict|enumerate|file|float|frozenset|int|list|long|map|memoryview|object|property|reversed|set|slice|staticmethod|str|super|tuple|type|unicode|xrange)\\b" - # definitions - - identifier: "def [a-zA-Z_0-9]+" - # keywords - - statement: "\\b(and|as|assert|break|class|continue|def|del|elif|else|except|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield)\\b" - # decorators - - brightgreen: "@.*[(]" - # operators - - statement: "([.:;,+*|=!\\%@]|<|>|/|-|&)" - # parentheses - - statement: "([(){}]|\\[|\\])" - # numbers - - constant.number: "\\b[0-9]+\\b" - - - comment: - start: "\"\"\"" - end: "\"\"\"" - rules: [] - - - comment: - start: "'''" - end: "'''" - rules: [] - - - constant.string: - start: "\"" - end: "\"" - skip: "\\\\." - rules: - - constant.specialChar: "\\\\." - - - constant.string: - start: "'" - end: "'" - skip: "\\\\." - rules: - - constant.specialChar: "\\\\." - - - comment: - start: "#" - end: "$" - rules: [] - diff --git a/syntax_files/reST.yaml b/syntax_files/reST.yaml deleted file mode 100644 index 6a25b80..0000000 --- a/syntax_files/reST.yaml +++ /dev/null @@ -1,18 +0,0 @@ -filetype: rst - -detect: - filename: "\\.rest$|\\.rst$" - -rules: - - statement: "\\*\\*[^*]+\\*\\*" - - preproc: "::" - - constant.string: "`[^`]+`_{1,2}" - - constant.string: "``[^`]+``" - - identifier: "^\\.\\. .*$" - - identifier: "^__ .*$" - - type: "^###+$" - - type: "^\\*\\*\\*+$" - - special: "^===+$" - - special: "^---+$" - - special: "^\\^\\^\\^+$" - - special: "^\"\"\"+$" diff --git a/syntax_files/route.yaml b/syntax_files/route.yaml deleted file mode 100644 index d477843..0000000 --- a/syntax_files/route.yaml +++ /dev/null @@ -1,24 +0,0 @@ -filetype: route - -detect: - filename: "\\.route$" - header: ".*routing table" - -rules: - # header - - magenta: "Kernel IP routing table" - - cyan: "Destination\\s+Gateway\\s+Genmask\\s+Flags\\s+Metric\\s+Ref\\s+Use\\s+Iface" - # numbers - - green: "[\\d+]" - # IP - - yellow: "\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}" - # interface - - red: "\\s([a-z-]+\\d+)" - # hostname - - blue: "\\s+([a-z-]+\\.)?[a-z-]+\\.[a-z-]+\\.[a-z-]+" - - high.green: "ip-\\d+-\\d+-\\d+-\\d+" - # flags - - magenta: "U(G|H|\\s)" - # keywords - - red: "(default|link-local)" - diff --git a/syntax_files/rpmlint.yaml b/syntax_files/rpmlint.yaml deleted file mode 100644 index 3471ab8..0000000 --- a/syntax_files/rpmlint.yaml +++ /dev/null @@ -1,54 +0,0 @@ -filetype: rpmspec - -detect: - filename: "\\.spec$|\\.rpmspec$" - -rules: - - yellow: "(warning|W):" - - red: "(error|E):" - - blue: "(line \\d+):" - - green: "[\\s|:](\\d+)[\\s|:]" - - red: "\\d+\\serrors" - - red: "bogus date" - - yellow: "\\d+\\swarnings" - - yellow: "\\d+\\sbadness" - - blue: "checks:\\s\\d+" - - blue: "packages:\\s\\d+" - - constant.string: "^([A-Z_a-z_0-9_\\./]+)\\.spec" - - constant.string: "^(=+)\\srpmlint session starts\\s(=+)$" - - preproc: "\\b(BuildArch|BuildArchitectures|ExclusiveArch|ExcludeArch):" - - preproc: "\\b(Conflicts|Obsoletes|Provides|Requires|Requires\\(.*\\)|Enhances|Suggests|BuildConflicts|BuildRequires|Recommends|PreReq|Supplements):" - - preproc: "\\b(Epoch|Serial|Nosource|Nopatch):" - - preproc: "\\b(AutoReq|AutoProv|AutoReqProv):" - - preproc: "\\b(Copyright|License|Summary|Summary\\(.*\\)|Distribution|Vendor|Packager|Group|Source[0-9]*|Patch[0-9]*|BuildRoot|Prefix):" - - preproc: "\\b(Name|Version|Release|Url|URL):" - - preproc: - start: "^(Source|Patch)" - end: ":" - rules: [] - - - preproc: "(i386|i486|i586|i686|athlon|ia64|alpha|alphaev5|alphaev56|alphapca56|alphaev6|alphaev67|sparc|sparcv9|sparc64armv3l|armv4b|armv4lm|mipsel|ppc|ppc|iseries|ppcpseries|ppc64|m68k|m68kmint|Sgi|rs6000|i370|s390x|s390|noarch)" - - preproc: "(ifarch|ifnarch|ifos|ifnos)" - - constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'" - - statement: "%(if|else|endif|define|global|undefine)" - - statement: "%_?([A-Z_a-z_0-9_]*)" - - statement: - start: "%\\{" - end: "\\}" - rules: [] - - - statement: - start: "%\\{__" - end: "\\}" - rules: [] - - - statement: "\\$(RPM_BUILD_ROOT)\\>" - - special: "^%(build$|changelog|check$|clean$|description)" - - special: "^%(files|install$|package|prep$)" - - special: "^%(pre|preun|pretrans|post|postun|posttrans)" - - special: "^%(trigger|triggerin|triggerpostun|triggerun|verifyscript)" - - comment: "(^|[[:space:]])#([^{].*)?$" - - constant: "^\\*.*$" - - indent-char.whitespace: "[[:space:]]+$" - - indent-char: " + +| + +" - - todo: "TODO:?" diff --git a/syntax_files/rpmspec.yaml b/syntax_files/rpmspec.yaml deleted file mode 100644 index 7c238fa..0000000 --- a/syntax_files/rpmspec.yaml +++ /dev/null @@ -1,43 +0,0 @@ -filetype: rpmspec - -detect: - filename: "\\.spec$|\\.rpmspec$" - -rules: - - preproc: "\\b(Icon|ExclusiveOs|ExcludeOs):" - - preproc: "\\b(BuildArch|BuildArchitectures|ExclusiveArch|ExcludeArch):" - - preproc: "\\b(Conflicts|Obsoletes|Provides|Requires|Requires\\(.*\\)|Enhances|Suggests|BuildConflicts|BuildRequires|Recommends|PreReq|Supplements):" - - preproc: "\\b(Epoch|Serial|Nosource|Nopatch):" - - preproc: "\\b(AutoReq|AutoProv|AutoReqProv):" - - preproc: "\\b(Copyright|License|Summary|Summary\\(.*\\)|Distribution|Vendor|Packager|Group|Source[0-9]*|Patch[0-9]*|BuildRoot|Prefix):" - - preproc: "\\b(Name|Version|Release|Url|URL):" - - preproc: - start: "^(Source|Patch)" - end: ":" - rules: [] - - - preproc: "(i386|i486|i586|i686|athlon|ia64|alpha|alphaev5|alphaev56|alphapca56|alphaev6|alphaev67|sparc|sparcv9|sparc64armv3l|armv4b|armv4lm|ips|mipsel|ppc|ppc|iseries|ppcpseries|ppc64|m68k|m68kmint|Sgi|rs6000|i370|s390x|s390|noarch)" - - preproc: "(ifarch|ifnarch|ifos|ifnos)" - - constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'" - - statement: "%(if|else|endif|define|global|undefine)" - - statement: "%_?([A-Z_a-z_0-9_]*)" - - statement: - start: "%\\{" - end: "\\}" - rules: [] - - - statement: - start: "%\\{__" - end: "\\}" - rules: [] - - - statement: "\\$(RPM_BUILD_ROOT)\\>" - - special: "^%(build$|changelog|check$|clean$|description)" - - special: "^%(files|install$|package|prep$)" - - special: "^%(pre|preun|pretrans|post|postun|posttrans)" - - special: "^%(trigger|triggerin|triggerpostun|triggerun|verifyscript)" - - comment: "(^|[[:space:]])#([^{].*)?$" - - constant: "^\\*.*$" - - indent-char.whitespace: "[[:space:]]+$" - - indent-char: " + +| + +" - - todo: "TODO:?" diff --git a/syntax_files/sed.yaml b/syntax_files/sed.yaml deleted file mode 100644 index dc5f7ad..0000000 --- a/syntax_files/sed.yaml +++ /dev/null @@ -1,13 +0,0 @@ -filetype: sed - -detect: - filename: "\\.sed$" - header: "^#!.*bin/(env +)?sed( |$)" - -rules: - - symbol.operator: "[|^$.*+]" - - constant.number: "\\{[0-9]+,?[0-9]*\\}" - - constant.specialChar: "\\\\." - - comment: "(^|[[:space:]])#([^{].*)?$" - - indent-char.whitespace: "[[:space:]]+$" - - indent-char: " + +| + +" diff --git a/syntax_files/server-log.yaml b/syntax_files/server-log.yaml deleted file mode 100644 index a7e1774..0000000 --- a/syntax_files/server-log.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -filetype: serverlog - -detect: - filename: "(\\.log.*)" - -rules: - - constant.number: "(\\[[^]]+\\])" - - preproc: "([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})" - - preproc: "\\\\." - - preproc: "(\\[(error|warning|info|warn)\\])" - - constant.specialChar: "((GET|POST|HEAD)\\ [^\\ ]+)" - - comment: "(referer\\: .*)" - - statement: "[[:space:]]([0-9~:.]{2,}[-+:.0-9a-z~]+)[[:space:]]" - - type: "(Mozilla|Chrome|Safari|Firefox|AppleWebKit|Linux x86_64|Gecko|Windows|Mac)" diff --git a/syntax_files/sh.yaml b/syntax_files/sh.yaml deleted file mode 100644 index b87026b..0000000 --- a/syntax_files/sh.yaml +++ /dev/null @@ -1,45 +0,0 @@ -filetype: shell - -detect: - filename: "(\\.sh$|\\.bash|\\.bashrc|bashrc|\\.bash_aliases|bash_aliases|\\.bash_functions|bash_functions|\\.bash_profile|bash_profile|Pkgfile|pkgmk.conf|profile|rc.conf|PKGBUILD|.ebuild\\$|APKBUILD)" - header: "^#!.*/(env +)?(ba)?sh( |$)" - -rules: - # Numbers - - constant.number: "\\b[0-9]+\\b" - # Conditionals and control flow - - statement: "\\b(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\\b" - # Shell commands - - type: "\\b(cd|echo|export|let|set|umask|unset)\\b" - # Common linux commands - - type: "\\b((g|ig)?awk|bash|dash|find|\\w{0,4}grep|kill|killall|\\w{0,4}less|make|pkill|sed|sh|tar|ping|traceroute|service|dpkg|apt|apt-get|apt-cache|aptitude|dpkg-buildpackage|yum)\\b" - # Coreutils commands - - type: "\\b(which|sudo|base64|basename|cat|chcon|chgrp|chmod|chown|chroot|cksum|comm|cp|csplit|cut|date|(l)?dd|df|dir|dircolors|dirname|du|env|expand|expr|factor|false|fmt|fold|head|hostid|id|install|join|link|ln|logname|ls|md5sum|mkdir|mkfifo|mknod|mktemp|mv|nice|nl|nohup|nproc|numfmt|od|paste|pathchk|pinky|pr|printenv|printf|ptx|pwd|readlink|realpath|rm|rmdir|runcon|seq|(sha1|sha224|sha256|sha384|sha512)sum|shred|shuf|sleep|sort|split|stat|stdbuf|stty|sum|sync|tac|tail|tee|test|time|timeout|touch|tr|true|truncate|tsort|tty|uname|unexpand|uniq|unlink|users|vdir|wc|who|whoami|yes)\\b" - - identifier.var: "(^([[:space:]]+)?[A-Za-z0-9_]+)" - - special: "(\\{|\\}|\\(|\\)|\\;|\\]|\\[|`|\\\\|\\$|<|>|!|=|&|\\|)" - # Conditional flags - - statement: "--[a-z-]+" - - statement: "\\ -[a-z]+" - - - identifier: "\\$\\{?[0-9A-Z_!@#$*?-]+\\}?" - - identifier: "\\$\\{?[0-9A-Z_!@#$*?-]+\\}?" - - symbol.brackets: "(\\[|\\]|\\{|\\}|[()])" - - - constant.string: - start: "\"" - end: "\"" - skip: "\\\\." - rules: - - constant.specialChar: "\\\\." - - - constant.string: - start: "'" - end: "'" - rules: [] - - - comment: - start: "#" - end: "$" - rules: - - todo: "(TODO|XXX|FIXME):?" - diff --git a/syntax_files/sls.yaml b/syntax_files/sls.yaml deleted file mode 100644 index 74d9ece..0000000 --- a/syntax_files/sls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -filetype: salt - -detect: - filename: "\\.sls$" - -rules: - - identifier.var: "^[^ -].*:$" - - identifier.var: ".*:" - - default: "salt:" - - constant.number: "/*[0-9]/*" - - constant.bool: "\\b(True|False)\\b" - - constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'" - - special: "\\b(grain|grains|compound|pcre|grain_pcre|list|pillar)\\b" - - comment: "^#.*" - - statement: "\\b(if|elif|else|or|not|and|endif|end)\\b" diff --git a/syntax_files/solidity.yaml b/syntax_files/solidity.yaml deleted file mode 100644 index 659a8fb..0000000 --- a/syntax_files/solidity.yaml +++ /dev/null @@ -1,41 +0,0 @@ -filetype: solidity - -detect: - filename: "\\.sol$" - -rules: - - preproc: "\\b(contract|library|pragma)\\b" - - constant.number: "\\b[-]?([0-9]+|0x[0-9a-fA-F]+)\\b" - - identifier: "[a-zA-Z][_a-zA-Z0-9]*[[:space:]]*" - - statement: "\\b(assembly|break|continue|do|for|function|if|else|new|return|returns|while)\\b" - - special: "\\b(\\.send|throw)\\b" # make sure they are very visible - - keyword: "\\b(anonymous|constant|indexed|payable|public|private|external|internal)\\b" - - constant: "\\b(block(\\.(blockhash|coinbase|difficulty|gaslimit|number|timestamp))?|msg(\\.(data|gas|sender|value))?|now|tx(\\.(gasprice|origin))?)\\b" - - constant: "\\b(keccak256|sha3|sha256|ripemd160|ecrecover|addmod|mulmod|this|super|selfdestruct|\\.balance)\\b" - - constant: "\\b(true|false)\\b" - - constant: "\\b(wei|szabo|finney|ether|seconds|minutes|hours|days|weeks|years)\\b" - - type: "\\b(address|bool|mapping|string|var|int(\\d*)|uint(\\d*)|byte(\\d*)|fixed(\\d*)|ufixed(\\d*))\\b" - - error: "\\b(abstract|after|case|catch|default|final|in|inline|interface|let|match|null|of|pure|relocatable|static|switch|try|type|typeof|view)\\b" - - operator: "[-+/*=<>!~%?:&|]" - - comment: - start: "//" - end: "$" - rules: [] - - comment: - start: "/\\*" - end: "\\*/" - rules: [] - - todo: "TODO:?" - - constant.string: - start: "\"" - end: "\"" - skip: "\\\\." - rules: - - constant.specialChar: "\\\\." - - constant.string: - start: "'" - end: "'" - skip: "\\\\." - rules: - - constant.specialChar: "\\\\." - diff --git a/syntax_files/sql.yaml b/syntax_files/sql.yaml deleted file mode 100644 index b4a038f..0000000 --- a/syntax_files/sql.yaml +++ /dev/null @@ -1,35 +0,0 @@ -filetype: sql - -detect: - filename: "\\.sql$|sqliterc$" - -rules: - - statement: "(?i)\\b(ALL|ASC|AS|ALTER|AND|ADD|AUTO_INCREMENT)\\b" - - statement: "(?i)\\b(BETWEEN|BINARY|BOTH|BY|BOOLEAN)\\b" - - statement: "(?i)\\b(CHANGE|CHECK|COLUMNS|COLUMN|CROSS|CREATE)\\b" - - statement: "(?i)\\b(DATABASES|DATABASE|DATA|DELAYED|DESCRIBE|DESC|DISTINCT|DELETE|DROP|DEFAULT)\\b" - - statement: "(?i)\\b(ENCLOSED|ESCAPED|EXISTS|EXPLAIN)\\b" - - statement: "(?i)\\b(FIELDS|FIELD|FLUSH|FOR|FOREIGN|FUNCTION|FROM)\\b" - - statement: "(?i)\\b(GROUP|GRANT|HAVING)\\b" - - statement: "(?i)\\b(IGNORE|INDEX|INFILE|INSERT|INNER|INTO|IDENTIFIED|IN|IS|IF)\\b" - - statement: "(?i)\\b(JOIN|KEYS|KILL|KEY)\\b" - - statement: "(?i)\\b(LEADING|LIKE|LIMIT|LINES|LOAD|LOCAL|LOCK|LOW_PRIORITY|LEFT|LANGUAGE)\\b" - - statement: "(?i)\\b(MODIFY|NATURAL|NOT|NULL|NEXTVAL)\\b" - - statement: "(?i)\\b(OPTIMIZE|OPTION|OPTIONALLY|ORDER|OUTFILE|OR|OUTER|ON)\\b" - - statement: "(?i)\\b(PROCEDURE|PROCEDURAL|PRIMARY)\\b" - - statement: "(?i)\\b(READ|REFERENCES|REGEXP|RENAME|REPLACE|RETURN|REVOKE|RLIKE|RIGHT)\\b" - - statement: "(?i)\\b(SHOW|SONAME|STATUS|STRAIGHT_JOIN|SELECT|SETVAL|SET)\\b" - - statement: "(?i)\\b(TABLES|TERMINATED|TO|TRAILING|TRUNCATE|TABLE|TEMPORARY|TRIGGER|TRUSTED)\\b" - - statement: "(?i)\\b(UNIQUE|UNLOCK|USE|USING|UPDATE|VALUES|VARIABLES|VIEW)\\b" - - statement: "(?i)\\b(WITH|WRITE|WHERE|ZEROFILL|TYPE|XOR)\\b" - - type: "(?i)\\b(VARCHAR|TINYINT|TEXT|DATE|SMALLINT|MEDIUMINT|INT|INTEGER|BIGINT|FLOAT|DOUBLE|DECIMAL|DATETIME|TIMESTAMP|TIME|YEAR|UNSIGNED|CHAR|TINYBLOB|TINYTEXT|BLOB|MEDIUMBLOB|MEDIUMTEXT|LONGBLOB|LONGTEXT|ENUM|BOOL|BINARY|VARBINARY)\\b" - - preproc: "(?i)\\.\\b(databases|dump|echo|exit|explain|header(s)?|help)\\b" - - preproc: "(?i)\\.\\b(import|indices|mode|nullvalue|output|prompt|quit|read)\\b" - - preproc: "(?i)\\.\\b(schema|separator|show|tables|timeout|width)\\b" - - constant.bool: "\\b(ON|OFF)\\b" - - constant.number: "\\b([0-9]+)\\b" - - constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'" - - constant.string: "`(\\\\.|[^\\\\`])*`" - - comment: "\\-\\-.*$" - - indent-char.whitespace: "[[:space:]]+$" - - indent-char: " + +| + +" diff --git a/syntax_files/syntax_checker.go b/syntax_files/syntax_checker.go deleted file mode 100644 index d08d281..0000000 --- a/syntax_files/syntax_checker.go +++ /dev/null @@ -1,30 +0,0 @@ -package main - -import ( - "fmt" - "io/ioutil" - "strings" - - highlight "github.com/jessp01/gohighlight" -) - -func main() { - files, _ := ioutil.ReadDir(".") - - hadErr := false - for _, f := range files { - if strings.HasSuffix(f.Name(), ".yaml") { - input, _ := ioutil.ReadFile(f.Name()) - _, err := highlight.ParseDef(input) - if err != nil { - hadErr = true - fmt.Printf("%s:\n", f.Name()) - fmt.Println(err) - continue - } - } - } - if !hadErr { - fmt.Println("No issues!") - } -} diff --git a/syntax_files/tcl.yaml b/syntax_files/tcl.yaml deleted file mode 100644 index 82963c2..0000000 --- a/syntax_files/tcl.yaml +++ /dev/null @@ -1,18 +0,0 @@ -filetype: tcl - -detect: - filename: "\\.tcl$" - header: "^#!.*/(env +)?tclsh( |$)" - -rules: - - statement: "\\b(after|append|array|auto_execok|auto_import|auto_load|auto_load_index|auto_qualify|binary|break|case|catch|cd|clock|close|concat|continue|else|encoding|eof|error|eval|exec|exit|expr|fblocked|fconfigure|fcopy|file|fileevent|flush|for|foreach|format|gets|glob|global|history|if|incr|info|interp|join|lappend|lindex|linsert|list|llength|load|lrange|lreplace|lsearch|lset|lsort|namespace|open|package|pid|puts|pwd|read|regexp|regsub|rename|return|scan|seek|set|socket|source|split|string|subst|switch|tclLog|tell|time|trace|unknown|unset|update|uplevel|upvar|variable|vwait|while)\\b" - - statement: "\\b(array anymore|array donesearch|array exists|array get|array names|array nextelement|array set|array size|array startsearch|array statistics|array unset)\\b" - - statement: "\\b(string bytelength|string compare|string equal|string first|string index|string is|string last|string length|string map|string match|string range|string repeat|string replace|string to|string tolower|string totitle|string toupper|string trim|string trimleft|string trimright|string will|string wordend|string wordstart)\\b" - - statement: "\\b(alarm|auto_load_pkg|bsearch|catclose|catgets|catopen|ccollate|cconcat|cequal|chgrp|chmod|chown|chroot|cindex|clength|cmdtrace|commandloop|crange|csubstr|ctoken|ctype|dup|echo|execl|fcntl|flock|fork|fstat|ftruncate|funlock|host_info|id|infox|keyldel|keylget|keylkeys|keylset|kill|lassign|lcontain|lempty|lgets|link|lmatch|loadlibindex|loop|lvarcat|lvarpop|lvarpush|max|min|nice|pipe|profile|random|readdir|replicate|scancontext|scanfile|scanmatch|select|server_accept|server_create|signal|sleep|sync|system|tclx_findinit|tclx_fork|tclx_load_tndxs|tclx_sleep|tclx_system|tclx_wait|times|translit|try_eval|umask|wait)\\b" - - identifier.class: "proc[[:space:]]|(\\{|\\})" - - symbol.operator: "(\\(|\\)|\\;|`|\\\\|\\$|<|>|!|=|&|\\|)" - - constant.number: "\\b[0-9]+(\\.[0-9]+)?\\b" - - constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'" - - identifier.var: "\\$\\{?[0-9A-Z_!@#$*?-]+\\}?" - - comment: "(^|;)[[:space:]]*#.*" - - indent-char.whitespace: "[[:space:]]+$" diff --git a/syntax_files/tcpdump.yaml b/syntax_files/tcpdump.yaml deleted file mode 100644 index fef583f..0000000 --- a/syntax_files/tcpdump.yaml +++ /dev/null @@ -1,16 +0,0 @@ ---- -filetype: tcpdump - -detect: - filename: "\\.tcpdump$" - -rules: - - yellow: "\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.([0-9]+|[a-z]+)" - - constant.number: "(\\[[^]]+\\])" - - preproc: "([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})" - - cyan: "^(\\d+):(\\d+):(\\d+)" - - red: "(\\s+\\d+)/(\\w+).*" - - magenta: "options\\s\\[.*\\].*" - - magenta: "\\s+([a-zA-Z-]+)$" - - comment: "\\s(seq|ack|win|IP)\\s" - - yellow: "\\s+([a-z-]+\\.)?[a-z-]+\\.[a-z-]+\\.[a-z-]+" diff --git a/syntax_files/tex.yaml b/syntax_files/tex.yaml deleted file mode 100644 index 929fdbc..0000000 --- a/syntax_files/tex.yaml +++ /dev/null @@ -1,31 +0,0 @@ -filetype: tex - -detect: - filename: "\\.tex$|bib|\\.bib$|cls|\\.cls$" - -rules: - # colorize the identifiers of {} and [] - - identifier: - start: "\\{" - end: "\\}" - rules: [] - - identifier: - start: "\\[" - end: "\\]" - rules: [] - # numbers - - constant.number: "\\b[0-9]+(\\.[0-9]+)?([[:space:]](pt|mm|cm|in|ex|em|bp|pc|dd|cc|nd|nc|sp))?\\b" - # let brackets have the default color again - - default: "[{}\\[\\]]" - - special: "[&\\\\]" - # macros - - statement: "\\\\@?[a-zA-Z_]+" - # comments - - comment: - start: "%" - end: "$" - rules: [] - - comment: - start: "\\\\begin\\{comment\\}" - end: "\\\\end\\{comment\\}" - rules: [] diff --git a/syntax_files/traceroute.yaml b/syntax_files/traceroute.yaml deleted file mode 100644 index a85fcf0..0000000 --- a/syntax_files/traceroute.yaml +++ /dev/null @@ -1,23 +0,0 @@ -filetype: traceroute - -detect: - filename: "\\.traceroute$" - header: "(^traceroute to[[:space:]]+[\\S+])" - -rules: - # IP - - blue: "\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}" - # IP v6 - - blue: "(([0-9a-fA-F]{1,4})?\\:\\:?[0-9a-fA-F]{1,4})+" - # host - - yellow: "\\s\\w+[\\w\\-\\.]+\\w+" - - cyan: "\\s([0-9\\.]+) ms" - # ttl - - green: "ttl=\\d+\\!" - # errors - - red: "DUP\\!" - - red: "(Destination Host Unreachable|100(\\.0)?% packet loss)" - - red: ".+unknown\\shost\\s(.+)" - - red: "Temporary failure in name resolution" - - red: "\\*" - diff --git a/syntax_files/vala.yaml b/syntax_files/vala.yaml deleted file mode 100644 index aaa7f98..0000000 --- a/syntax_files/vala.yaml +++ /dev/null @@ -1,26 +0,0 @@ -filetype: vala - -detect: - filename: "\\.vala$" - -rules: - - type: "\\b(float|double|bool|char|int|uint|short|long|void|(un)?signed)\\b" - - identifier.class: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]" - - statement: "\\b(for|if|while|do|else|case|default|switch|try|throw|catch)\\b" - - statement: "\\b(inline|typedef|struct|enum|union|extern|static|const)\\b" - - statement: "\\b(operator|new|delete|return|null)\\b" - - statement: "\\b(class|override|private|public|signal|this|weak)\\b" - - special: "\\b(goto|break|continue)\\b" - - constant.bool: "\\b(true|false)\\b" - - constant.number: "\\b([0-9]+)\\b" - - symbol.operator: "[\\-+/*=<>?:!~%&|]|->" - - constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'" - - comment: "(^|[[:space:]])//.*" - - comment: - start: "/\\*" - end: "\\*/" - rules: [] - - - todo: "TODO:?" - - indent-char.whitespace: "[[:space:]]+$" - - indent-char: " + +| + +" diff --git a/syntax_files/vhdl.yaml b/syntax_files/vhdl.yaml deleted file mode 100644 index 6bd3b53..0000000 --- a/syntax_files/vhdl.yaml +++ /dev/null @@ -1,37 +0,0 @@ -filetype: vhdl - -detect: - filename: "\\.vhdl?$" - -rules: - - type: "(i)\\b(string|integer|natural|positive|(un)?signed|std_u?logic(_vector)?|bit(_vector)?|boolean|u?x01z?|array|range)\\b" - - identifier: "(?i)library[[:space:]]+[a-zA-Z_0-9]+" - - identifier: "(?i)use[[:space:]]+[a-zA-Z_0-9\\.]+" - - identifier: "(?i)component[[:space:]]+[a-zA-Z_0-9]+" - - identifier: "(?i)(architecture|configuration)[[:space:]]+[a-zA-Z_0-9]+[[:space:]]+of[[:space:]]+[a-zA-Z_0-9]+" - - identifier: "(?i)(entity|package)[[:space:]]+[a-zA-Z_0-9]+[[:space:]]+is" - - identifier: "(?i)end[[:space:]]+((architecture|entity|component|process|package|generate)[[:space:]]+)?[a-zA-Z_0-9]+" - - statement: "(?i)\\b(abs|access|after|alias|all|and|architecture|assert|attribute)\\b" - - statement: "(?i)\\b(begin|block|body|buffer|bus|case|component|configuration|constant)\\b" - - statement: "(?i)\\b(disconnect|downto|else|elsif|end|entity|exit)\\b" - - statement: "(?i)\\b(file|for|function|generate|generic|guarded)\\b" - - statement: "(?i)\\b(if|impure|in|inertial|inout|is)\\b" - - statement: "(?i)\\b(label|library|linkage|literal|loop|map|mod)\\b" - - statement: "(?i)\\b(nand|new|next|nor|not|null|of|on|open|or|others|out)\\b" - - statement: "(?i)\\b(package|port|postponed|procedure|process|pure)\\b" - - statement: "(?i)\\b(range|record|register|reject|rem|report|return|rol|ror)\\b" - - statement: "(?i)\\b(select|severity|shared|signal|sla|sll|sra|srl|subtype)\\b" - - statement: "(?i)\\b(then|to|transport|type|unaffected|units|until|use)\\b" - - statement: "(?i)\\b(variable|wait|when|while|with|xnor|xor)\\b" - - statement: "(?i)'(base|left|right|high|low|pos|val|succ|pred|leftof|rightof|image|(last_)?value)" - - statement: "(?i)'((reverse_)?range|length|ascending|event|stable)" - - statement: "(?i)'(simple|path|instance)_name" - - statement: "(?i)\\b(std_match|(rising|falling)_edge|is_x)\\b" - - statement: "(?i)\\bto_(unsigned|signed|integer|u?x01z?|stdu?logic(vector)?)\\b" - - symbol.operator: "(\\+|-|\\*|/|&|<|>|=|\\.|:)" - - constant.number: "(?i)'([0-1]|u|x|z|w|l|h|-)'|[box]?\"([0-1a-fA-F]|u|x|z|w|l|h|-)+\"" - - constant.number: "(?i)\\b[0-9\\._]+(e[\\-]?[0-9]+)?( ?[fpnum]?s)?\\b" - - constant.bool: "(?i)\\b(true|false)\\b" - - constant: "(?i)\\b(note|warning|error|failure)\\b" - - constant.string: "\"[^\"]*\"" - - comment: "--.*" diff --git a/syntax_files/vi.yaml b/syntax_files/vi.yaml deleted file mode 100644 index d7fe496..0000000 --- a/syntax_files/vi.yaml +++ /dev/null @@ -1,32 +0,0 @@ -filetype: vi - -detect: - filename: "(^|/|\\.)(ex|vim)rc$|\\.vim" - -rules: - - identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]" - - statement: "\\b([nvxsoilc]?(nore|un)?map|[nvlx]n|[ico]?no|[cilovx][um]|s?unm)\\b" - - statement: "\\b(snor|nun|nm|set|if|endif|let|unlet)\\b" - - statement: "[!&=]" - - constant.number: "\\b[0-9]+\\b" - - - constant.string: - start: "\"" - end: "\"" - skip: "\\\\." - rules: - - constant.specialChar: "\\\\." - - - constant.string: - start: "'" - end: "'" - skip: "\\\\." - rules: - - constant.specialChar: "\\\\." - - - constant.comment: - start: "\"" - end: "$" - rules: [] - - diff --git a/syntax_files/xresources.yaml b/syntax_files/xresources.yaml deleted file mode 100644 index 9e35d73..0000000 --- a/syntax_files/xresources.yaml +++ /dev/null @@ -1,14 +0,0 @@ -filetype: xresources - -detect: - filename: "X(defaults|resources)$" - -rules: - - special: "^[[:alnum:]]+\\*" - - identifier.var: "\\*[[:alnum:]]+\\:" - - constant.number: "\\b[0-9]+\\b" - - symbol.operator: "[*:=]" - - constant.bool: "\\b(true|false)\\b" - - comment: "(^|[[:space:]])#([^{].*)?$" - - indent-char.whitespace: "[[:space:]]+$" - - indent-char: " + +| + +" diff --git a/syntax_files/yml.yaml b/syntax_files/yml.yaml deleted file mode 120000 index 6a32413..0000000 --- a/syntax_files/yml.yaml +++ /dev/null @@ -1 +0,0 @@ -yaml.yaml \ No newline at end of file diff --git a/syntax_files/yum.yaml b/syntax_files/yum.yaml deleted file mode 100644 index ee2864d..0000000 --- a/syntax_files/yum.yaml +++ /dev/null @@ -1,12 +0,0 @@ -filetype: yum - -detect: - filename: "\\.repo$|yum.*\\.conf$" - -rules: - - identifier: "^[[:space:]]*[^=]*=" - - constant.specialChar: "^[[:space:]]*\\[.*\\]$" - - statement: "\\$(releasever|arch|basearch|uuid|YUM[0-9])" - - comment: "(^|[[:space:]])#([^{].*)?$" - - indent-char.whitespace: "[[:space:]]+$" - - indent-char: " + +| + +" diff --git a/syntax_files/arduino.yaml b/syntax_files_todo/arduino.yaml similarity index 100% rename from syntax_files/arduino.yaml rename to syntax_files_todo/arduino.yaml diff --git a/syntax_files/asm.yaml b/syntax_files_todo/asm.yaml similarity index 100% rename from syntax_files/asm.yaml rename to syntax_files_todo/asm.yaml diff --git a/syntax_files/bash.yaml b/syntax_files_todo/bash.yaml similarity index 100% rename from syntax_files/bash.yaml rename to syntax_files_todo/bash.yaml diff --git a/syntax_files/c++.yaml b/syntax_files_todo/c++.yaml similarity index 100% rename from syntax_files/c++.yaml rename to syntax_files_todo/c++.yaml diff --git a/syntax_files/c.yaml b/syntax_files_todo/c.yaml similarity index 100% rename from syntax_files/c.yaml rename to syntax_files_todo/c.yaml diff --git a/syntax_files/caddyfile.yaml b/syntax_files_todo/caddyfile.yaml similarity index 100% rename from syntax_files/caddyfile.yaml rename to syntax_files_todo/caddyfile.yaml diff --git a/syntax_files/cmake.yaml b/syntax_files_todo/cmake.yaml similarity index 100% rename from syntax_files/cmake.yaml rename to syntax_files_todo/cmake.yaml diff --git a/syntax_files/cpp.yaml b/syntax_files_todo/cpp.yaml similarity index 100% rename from syntax_files/cpp.yaml rename to syntax_files_todo/cpp.yaml diff --git a/syntax_files/csharp.yaml b/syntax_files_todo/csharp.yaml similarity index 100% rename from syntax_files/csharp.yaml rename to syntax_files_todo/csharp.yaml diff --git a/syntax_files/css.yaml b/syntax_files_todo/css.yaml similarity index 100% rename from syntax_files/css.yaml rename to syntax_files_todo/css.yaml diff --git a/syntax_files/d.yaml b/syntax_files_todo/d.yaml similarity index 100% rename from syntax_files/d.yaml rename to syntax_files_todo/d.yaml diff --git a/syntax_files/dart.yaml b/syntax_files_todo/dart.yaml similarity index 100% rename from syntax_files/dart.yaml rename to syntax_files_todo/dart.yaml diff --git a/syntax_files/diff.yaml b/syntax_files_todo/diff.yaml similarity index 100% rename from syntax_files/diff.yaml rename to syntax_files_todo/diff.yaml diff --git a/syntax_files/dockerfile.yaml b/syntax_files_todo/dockerfile.yaml similarity index 100% rename from syntax_files/dockerfile.yaml rename to syntax_files_todo/dockerfile.yaml diff --git a/syntax_files/fish.yaml b/syntax_files_todo/fish.yaml similarity index 100% rename from syntax_files/fish.yaml rename to syntax_files_todo/fish.yaml diff --git a/syntax_files/fortran.yaml b/syntax_files_todo/fortran.yaml similarity index 100% rename from syntax_files/fortran.yaml rename to syntax_files_todo/fortran.yaml diff --git a/syntax_files/gdscript.yaml b/syntax_files_todo/gdscript.yaml similarity index 100% rename from syntax_files/gdscript.yaml rename to syntax_files_todo/gdscript.yaml diff --git a/syntax_files/haskell.yaml b/syntax_files_todo/haskell.yaml similarity index 100% rename from syntax_files/haskell.yaml rename to syntax_files_todo/haskell.yaml diff --git a/syntax_files/html.yaml b/syntax_files_todo/html.yaml similarity index 100% rename from syntax_files/html.yaml rename to syntax_files_todo/html.yaml diff --git a/syntax_files/html5.yaml b/syntax_files_todo/html5.yaml similarity index 100% rename from syntax_files/html5.yaml rename to syntax_files_todo/html5.yaml diff --git a/syntax_files/ini.yaml b/syntax_files_todo/ini.yaml similarity index 100% rename from syntax_files/ini.yaml rename to syntax_files_todo/ini.yaml diff --git a/syntax_files/java.yaml b/syntax_files_todo/java.yaml similarity index 100% rename from syntax_files/java.yaml rename to syntax_files_todo/java.yaml diff --git a/syntax_files/javascript.yaml b/syntax_files_todo/js.yaml similarity index 100% rename from syntax_files/javascript.yaml rename to syntax_files_todo/js.yaml diff --git a/syntax_files/json.yaml b/syntax_files_todo/json.yaml similarity index 100% rename from syntax_files/json.yaml rename to syntax_files_todo/json.yaml diff --git a/syntax_files/lisp.yaml b/syntax_files_todo/lisp.yaml similarity index 100% rename from syntax_files/lisp.yaml rename to syntax_files_todo/lisp.yaml diff --git a/syntax_files/lua.yaml b/syntax_files_todo/lua.yaml similarity index 100% rename from syntax_files/lua.yaml rename to syntax_files_todo/lua.yaml diff --git a/syntax_files/makefile.yaml b/syntax_files_todo/makefile.yaml similarity index 100% rename from syntax_files/makefile.yaml rename to syntax_files_todo/makefile.yaml diff --git a/syntax_files/man.yaml b/syntax_files_todo/man.yaml similarity index 100% rename from syntax_files/man.yaml rename to syntax_files_todo/man.yaml diff --git a/syntax_files/php.yaml b/syntax_files_todo/php.yaml similarity index 100% rename from syntax_files/php.yaml rename to syntax_files_todo/php.yaml diff --git a/syntax_files/python3.yaml b/syntax_files_todo/python3.yaml similarity index 100% rename from syntax_files/python3.yaml rename to syntax_files_todo/python3.yaml diff --git a/syntax_files/r.yaml b/syntax_files_todo/r.yaml similarity index 100% rename from syntax_files/r.yaml rename to syntax_files_todo/r.yaml diff --git a/syntax_files/ruby.yaml b/syntax_files_todo/ruby.yaml similarity index 100% rename from syntax_files/ruby.yaml rename to syntax_files_todo/ruby.yaml diff --git a/syntax_files/rust.yaml b/syntax_files_todo/rust.yaml similarity index 100% rename from syntax_files/rust.yaml rename to syntax_files_todo/rust.yaml diff --git a/syntax_files/scala.yaml b/syntax_files_todo/scala.yaml similarity index 100% rename from syntax_files/scala.yaml rename to syntax_files_todo/scala.yaml diff --git a/syntax_files/swift.yaml b/syntax_files_todo/swift.yaml similarity index 100% rename from syntax_files/swift.yaml rename to syntax_files_todo/swift.yaml diff --git a/syntax_files/systemd.yaml b/syntax_files_todo/systemd.yaml similarity index 100% rename from syntax_files/systemd.yaml rename to syntax_files_todo/systemd.yaml diff --git a/syntax_files/toml.yaml b/syntax_files_todo/toml.yaml similarity index 100% rename from syntax_files/toml.yaml rename to syntax_files_todo/toml.yaml diff --git a/syntax_files/typescript.yaml b/syntax_files_todo/typescript.yaml similarity index 100% rename from syntax_files/typescript.yaml rename to syntax_files_todo/typescript.yaml diff --git a/syntax_files/xml.yaml b/syntax_files_todo/xml.yaml similarity index 100% rename from syntax_files/xml.yaml rename to syntax_files_todo/xml.yaml diff --git a/syntax_files/yaml.yaml b/syntax_files_todo/yaml.yaml similarity index 100% rename from syntax_files/yaml.yaml rename to syntax_files_todo/yaml.yaml diff --git a/syntax_files/zsh.yaml b/syntax_files_todo/zsh.yaml similarity index 100% rename from syntax_files/zsh.yaml rename to syntax_files_todo/zsh.yaml diff --git a/test_inputs/1.c b/test_inputs/1.c deleted file mode 100644 index a091b4d..0000000 --- a/test_inputs/1.c +++ /dev/null @@ -1,6 +0,0 @@ -//nolint -#include -int main(int argc, char *argv[]) { - printf("%s\n", "Hello world!"); -} - diff --git a/test_inputs/1.cmake b/test_inputs/1.cmake deleted file mode 100644 index 3cdaaae..0000000 --- a/test_inputs/1.cmake +++ /dev/null @@ -1,126 +0,0 @@ -cmake_minimum_required(VERSION 3.15) - -# set the project name and version -project(Tutorial VERSION 1.0) - -set(CMAKE_DEBUG_POSTFIX d) - -add_library(tutorial_compiler_flags INTERFACE) -target_compile_features(tutorial_compiler_flags INTERFACE cxx_std_11) - -# add compiler warning flags just when building this project via -# the BUILD_INTERFACE genex -set(gcc_like_cxx "$") -set(msvc_cxx "$") -target_compile_options(tutorial_compiler_flags INTERFACE - "$<${gcc_like_cxx}:$>" - "$<${msvc_cxx}:$>" -) - -# control where the static and shared libraries are built so that on windows -# we don't need to tinker with the path to run the executable -set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}") -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}") -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}") - -option(BUILD_SHARED_LIBS "Build using shared libraries" ON) - -if(APPLE) - set(CMAKE_INSTALL_RPATH "@executable_path/../lib") -elseif(UNIX) - set(CMAKE_INSTALL_RPATH "$ORIGIN/../lib") -endif() - -# configure a header file to pass the version number only -configure_file(TutorialConfig.h.in TutorialConfig.h) - -# add the MathFunctions library -add_subdirectory(MathFunctions) - -# add the executable -add_executable(Tutorial tutorial.cxx) -set_target_properties(Tutorial PROPERTIES DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX}) - -target_link_libraries(Tutorial PUBLIC MathFunctions tutorial_compiler_flags) - -# add the binary tree to the search path for include files -# so that we will find TutorialConfig.h -target_include_directories(Tutorial PUBLIC - "${PROJECT_BINARY_DIR}" - ) - -# add the install targets -install(TARGETS Tutorial DESTINATION bin) -install(FILES "${PROJECT_BINARY_DIR}/TutorialConfig.h" - DESTINATION include - ) - -# enable testing -enable_testing() - -# does the application run -add_test(NAME Runs COMMAND Tutorial 25) - -# does the usage message work? -add_test(NAME Usage COMMAND Tutorial) -set_tests_properties(Usage - PROPERTIES PASS_REGULAR_EXPRESSION "Usage:.*number" - ) - -# define a function to simplify adding tests -function(do_test target arg result) - add_test(NAME Comp${arg} COMMAND ${target} ${arg}) - set_tests_properties(Comp${arg} - PROPERTIES PASS_REGULAR_EXPRESSION ${result} - ) -endfunction() - -# do a bunch of result based tests -do_test(Tutorial 4 "4 is 2") -do_test(Tutorial 9 "9 is 3") -do_test(Tutorial 5 "5 is 2.236") -do_test(Tutorial 7 "7 is 2.645") -do_test(Tutorial 25 "25 is 5") -do_test(Tutorial -25 "-25 is (-nan|nan|0)") -do_test(Tutorial 0.0001 "0.0001 is 0.01") - -# setup installer -include(InstallRequiredSystemLibraries) -set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/License.txt") -set(CPACK_PACKAGE_VERSION_MAJOR "${Tutorial_VERSION_MAJOR}") -set(CPACK_PACKAGE_VERSION_MINOR "${Tutorial_VERSION_MINOR}") -set(CPACK_SOURCE_GENERATOR "TGZ") -include(CPack) - -# install the configuration targets -install(EXPORT MathFunctionsTargets - FILE MathFunctionsTargets.cmake - DESTINATION lib/cmake/MathFunctions -) - -include(CMakePackageConfigHelpers) -# generate the config file that is includes the exports -configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in - "${CMAKE_CURRENT_BINARY_DIR}/MathFunctionsConfig.cmake" - INSTALL_DESTINATION "lib/cmake/example" - NO_SET_AND_CHECK_MACRO - NO_CHECK_REQUIRED_COMPONENTS_MACRO - ) -# generate the version file for the config file -write_basic_package_version_file( - "${CMAKE_CURRENT_BINARY_DIR}/MathFunctionsConfigVersion.cmake" - VERSION "${Tutorial_VERSION_MAJOR}.${Tutorial_VERSION_MINOR}" - COMPATIBILITY AnyNewerVersion -) - -# install the configuration file -install(FILES - ${CMAKE_CURRENT_BINARY_DIR}/MathFunctionsConfig.cmake - DESTINATION lib/cmake/MathFunctions - ) - -# generate the export targets for the build tree -# needs to be after the install(TARGETS ) command -export(EXPORT MathFunctionsTargets - FILE "${CMAKE_CURRENT_BINARY_DIR}/MathFunctionsTargets.cmake" -) diff --git a/test_inputs/1.df b/test_inputs/1.df deleted file mode 100644 index ea08672..0000000 --- a/test_inputs/1.df +++ /dev/null @@ -1,13 +0,0 @@ -Filesystem Size Used Avail Use% Mounted on -udev 7.7G 0 7.7G 0% /dev -tmpfs 1.6G 3.1M 1.6G 1% /run -/dev/nvme0n1p2 23G 21G 673M 97% / -tmpfs 7.7G 55M 7.7G 1% /dev/shm -tmpfs 5.0M 4.0K 5.0M 1% /run/lock -/dev/nvme0n1p5 1.8G 271M 1.5G 16% /tmp -/dev/nvme0n1p3 9.1G 7.9G 737M 92% /var -/dev/nvme0n1p6 434G 230G 181G 56% /home -/dev/nvme0n1p1 511M 3.5M 508M 1% /boot/efi -tmpfs 1.6G 25M 1.6G 2% /run/user/1000 -tmpfs 1.6G 92K 1.6G 1% /run/user/0 - diff --git a/test_inputs/1.go b/test_inputs/1.go deleted file mode 100644 index a330258..0000000 --- a/test_inputs/1.go +++ /dev/null @@ -1,16 +0,0 @@ -package main - -import ( - "fmt" - "os" - "path/filepath" -) - -func main() { - ex, err := os.Executable() - if err != nil { - panic(err) - } - exPath := filepath.Dir(ex) - fmt.Println(exPath) -} diff --git a/test_inputs/1.ini b/test_inputs/1.ini deleted file mode 100644 index 376f024..0000000 --- a/test_inputs/1.ini +++ /dev/null @@ -1,3 +0,0 @@ -; configuration for php mysql module -; priority=10 -extension=mysqlnd.so diff --git a/test_inputs/1.markdown b/test_inputs/1.markdown deleted file mode 100644 index 3eef014..0000000 --- a/test_inputs/1.markdown +++ /dev/null @@ -1,69 +0,0 @@ -%title: a crash course on handling deb packages -%author: jesse portnoy -%date: 2023-07-11 - ----------------------------------------------------------------------------- - -## topics covered in this course - -- what is a `deb` package? -- what is dpkg? -- what is apt? -- the `apt` util -- `apt-get` -- `apt-cache` -- `apt-file` -- fetching and installing packages -- install vs. upgrade -- non-interactive operations -- a note on dependencies -- package dependencies & relationships -- querying the local packages db -- querying remote repos -- configuration operations -- downloading & building packages from source -- automating the installation of packages that require inputs -- removing packages -- thanks & final note - -```c -#include -int main() -{ - return 0; -} -``` - -```php - -``` - ----------------------------------------------------------------------------- - -## What is a `deb` package? - -*deb* is the format, as well as filename extension of the software package format for the Debian Linux distribution -and its derivatives. Debian packages are standard UNIX *ar* archives that include two tar archives. -One archive holds the control information and another contains the installable data. - -## What is dpkg? - -*dpkg* is a tool to install, build, remove and manage Debian packages. - -*dpkg* is controlled entirely via command line parameters, which consist of exactly one action and zero or more options. -The action parameter tells *dpkg* what to do and options control the behavior of the action in some way. - -*dpkg* maintains some usable information about available packages. The information is divided in three classes: states, -selection states and flags. - -## What is APT? - -Advanced Package Tool, or APT, is a free-software user interface that works with core libraries to handle the installation -and removal of software on Debian, and Debian-based Linux distributions. APT simplifies the process of managing software by -automating the retrieval, configuration and installation of software packages. - -In the next slide, we'll review some important APT utils and their respective functionality. diff --git a/test_inputs/1.netstat b/test_inputs/1.netstat deleted file mode 100644 index 3163925..0000000 --- a/test_inputs/1.netstat +++ /dev/null @@ -1,30 +0,0 @@ -Active Internet connections (only servers) -Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name -tcp 0 0 0.0.0.0:35211 0.0.0.0:* LISTEN - -tcp 0 0 0.0.0.0:51435 0.0.0.0:* LISTEN 1798003/rpc.mountd -tcp 0 0 0.0.0.0:2049 0.0.0.0:* LISTEN - -tcp 0 0 0.0.0.0:51311 0.0.0.0:* LISTEN 1797998/rpc.statd -tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 1803502/connmand -tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2384685/cupsd -tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 1798145/mariadbd -tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1798150/sshd: /usr/ -tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 1798810/master -tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1/systemd -tcp 0 0 127.0.0.1:35765 0.0.0.0:* LISTEN 878/containerd -tcp 0 0 127.0.0.1:3000 0.0.0.0:* LISTEN 2082789/node -tcp 0 0 0.0.0.0:46613 0.0.0.0:* LISTEN 1798003/rpc.mountd -tcp 0 0 0.0.0.0:54439 0.0.0.0:* LISTEN 1798003/rpc.mountd -tcp6 0 0 :::2049 :::* LISTEN - -tcp6 0 0 :::36647 :::* LISTEN 1798003/rpc.mountd -tcp6 0 0 ::1:631 :::* LISTEN 2384685/cupsd -tcp6 0 0 ::1:53 :::* LISTEN 1803502/connmand -tcp6 0 0 :::443 :::* LISTEN 1803521/apache2 -tcp6 0 0 :::33167 :::* LISTEN - -tcp6 0 0 :::22 :::* LISTEN 1798150/sshd: /usr/ -tcp6 0 0 :::25 :::* LISTEN 1798810/master -tcp6 0 0 :::111 :::* LISTEN 1/systemd -tcp6 0 0 :::80 :::* LISTEN 1803521/apache2 -tcp6 0 0 :::49243 :::* LISTEN 1798003/rpc.mountd -tcp6 0 0 :::55779 :::* LISTEN 1798003/rpc.mountd -tcp6 0 0 :::57253 :::* LISTEN 1797998/rpc.statd -tcp6 0 0 :::7373 :::* LISTEN 1803521/apache2 diff --git a/test_inputs/1.nmap b/test_inputs/1.nmap deleted file mode 100644 index 37b687f..0000000 --- a/test_inputs/1.nmap +++ /dev/null @@ -1,11 +0,0 @@ -Starting Nmap 7.80 ( https://nmap.org ) at 2023-08-03 18:47 BST -Nmap scan report for debian.org (128.31.0.62) -Host is up (0.078s latency). -Other addresses for debian.org (not scanned): 2001:67c:2564:a119::77 2001:4f8:1:c::15 2603:400a:ffff:bb8::801f:3e 130.89.148.77 149.20.4.15 -rDNS record for 128.31.0.62: mirror-csail.debian.org -Not shown: 996 filtered ports -PORT STATE SERVICE -80/tcp open http -443/tcp open https -8080/tcp open http-proxy -8443/tcp open https-alt diff --git a/test_inputs/1.php b/test_inputs/1.php deleted file mode 100644 index c3cbc3f..0000000 --- a/test_inputs/1.php +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/test_inputs/1.ping b/test_inputs/1.ping deleted file mode 100644 index 86ccbd9..0000000 --- a/test_inputs/1.ping +++ /dev/null @@ -1,9 +0,0 @@ -PING debian.org (149.20.4.15) 56(84) bytes of data. -64 bytes from mirror-isc3.debian.org (149.20.4.15): icmp_seq=1 ttl=50 time=155 ms -64 bytes from mirror-isc3.debian.org (149.20.4.15): icmp_seq=2 ttl=50 time=152 ms -64 bytes from mirror-isc3.debian.org (149.20.4.15): icmp_seq=3 ttl=50 time=160 ms -64 bytes from mirror-isc3.debian.org (149.20.4.15): icmp_seq=4 ttl=50 time=173 ms - ---- debian.org ping statistics --- -4 packets transmitted, 4 received, 0% packet loss, time 3003ms -rtt min/avg/max/mdev = 151.851/160.021/172.823/7.983 ms diff --git a/test_inputs/1.shell b/test_inputs/1.shell deleted file mode 100644 index 674399d..0000000 --- a/test_inputs/1.shell +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -prompt () -{ - FCM=$(fc -ln -0) - CM=$(echo "$FCM"|awk -F " " '{print $1}') - if ls /etc/supercat/spcrc-"$CM"* > /dev/null 2>&1; then - echo "Rerun with colour [y/n]?" - read -r YN - if [ "$YN" = 'y' ] || [ "$YN" = 'Y' ] ;then - eval "$FCM"| spc -c /etc/supercat/spcrc-"$CM"* - fi - fi -} - -export PROMPT_COMMAND=prompt diff --git a/test_inputs/1.sql b/test_inputs/1.sql deleted file mode 100644 index f74605e..0000000 --- a/test_inputs/1.sql +++ /dev/null @@ -1,18 +0,0 @@ -CREATE TABLE IF NOT EXISTS `system_user` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `email` varchar(50) NOT NULL, - `first_name` varchar(40) NOT NULL, - `last_name` varchar(40) NOT NULL, - `sha1_password` varchar(40) NOT NULL, - `salt` varchar(32) NOT NULL, - `created_by` int(11) DEFAULT NULL, - `status` tinyint(4) NOT NULL, - `is_primary` tinyint(4) DEFAULT '0', - `status_updated_at` datetime DEFAULT NULL, - `created_at` datetime DEFAULT NULL, - `updated_at` datetime DEFAULT NULL, - `deleted_at` datetime DEFAULT NULL, - `role` varchar(40) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `system_user_email_unique` (`email`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; diff --git a/test_inputs/1.traceroute b/test_inputs/1.traceroute deleted file mode 100644 index a5d1829..0000000 --- a/test_inputs/1.traceroute +++ /dev/null @@ -1,16 +0,0 @@ -traceroute to debian.org (149.20.4.15), 30 hops max, 60 byte packets - 1 192.168.25.122 (192.168.25.122) 2.635 ms 3.320 ms 3.403 ms - 2 * * * - 3 * * * - 4 * * * - 5 * * * - 6 172.19.136.161 (172.19.136.161) 294.118 ms 379.170 ms 379.095 ms - 7 * * * - 8 172.19.17.154 (172.19.17.154) 25.121 ms 16.297 ms * - 9 195.66.227.6 (195.66.227.6) 26.169 ms 26.129 ms 22.198 ms -10 * * * -11 * * * -12 * * * -13 * * * -14 he.pao1.isc.org (72.52.94.70) 154.700 ms 153.893 ms 163.018 ms -15 mirror-isc3.debian.org (149.20.4.15) 162.062 ms 143.122 ms 165.659 ms diff --git a/test_inputs/1.xml b/test_inputs/1.xml deleted file mode 100644 index 7675538..0000000 --- a/test_inputs/1.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - Sample Deck - - - - Deck uses these elements - - -
  • canvas
  • -
  • slide
  • -
  • text
  • -
  • list
  • -
  • image
  • -
  • line
  • -
  • rect
  • -
  • ellipse
  • -
  • curve
  • -
  • arc
  • -
    - - - - - - -
    -
    diff --git a/test_inputs/1.yaml b/test_inputs/1.yaml deleted file mode 100644 index 9c286f5..0000000 --- a/test_inputs/1.yaml +++ /dev/null @@ -1,12 +0,0 @@ -filetype: diff - -detect: - filename: "\\.diff$" - header: "^((---.*)|(\\+\\+\\+.*))" - -rules: - - statement: "(^\\+\\+\\+.*)" - - statement: "(^---.*)" - - type: "(^@@.*)" - - constant.number: "(^\\+.*)" - - preproc: "(^-.*)"