diff --git a/CHANGELOG.md b/CHANGELOG.md index 739efc6..8c2e80c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,8 @@ format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). configuration file [#33](https://github.com/zee-editor/zee/pull/33) - Added a changelog to be updated timely as PRs are merged [#49](https://github.com/zee-editor/zee/pull/49) +- Add [Haskell](https://github.com/tree-sitter/tree-sitter-haskell) syntax + highlighting [#62](https://github.com/zee-editor/zee/pull/62) ### Fixed @@ -29,7 +31,7 @@ format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Fix tree sitter spans not being aligned with text after saving [#65](https://github.com/zee-editor/zee/pull/65) -## v0.3.2 - 2022-04-23 +## 0.3.2 - 2022-04-23 TODO: write changelog entries for all released versions of zee diff --git a/zee/config/config.ron b/zee/config/config.ron index aaf7728..926d4f8 100644 --- a/zee/config/config.ron +++ b/zee/config/config.ron @@ -1,14 +1,25 @@ ( - // Which theme to use + // + // GENERAL SETTINGS + // ================ + // + + // Which colour theme to use. theme: "zee-gruvbox", + // Remove trailing whitespace on all lines when saving. - // Allowed values: `true` or `false`. Default: `true` + // Allowed values: `true` or `false` trim_trailing_whitespace_on_save: true, - // Modes and tree sitter parsers + // + // MODES AND TREE-SITTER PARSERS + // ============================= // // This section defines what modes are available. - // You have re-run `zee --build` for any changes to take effect. + // + // You have to re-run `zee --build` for any changes to take effect. + // + modes: [ // C Mode( @@ -31,6 +42,7 @@ ) ), ), + // C++ Mode( name: "C++", @@ -66,6 +78,7 @@ ) ), ), + // CSS Mode( name: "CSS", @@ -86,6 +99,7 @@ ) ), ), + // Dockerfile Mode( name: "Dockerfile", @@ -110,6 +124,31 @@ ) ), ), + + // Haskell + Mode( + name: "Haskell", + scope: "source.haskell", + injection_regex: "haskell", + patterns: [ + Suffix(".hs"), + ], + comment: Some(Comment(token: "-- ")), + indentation: Indentation( + width: 8, + unit: Space, + ), + grammar: Some( + Grammar( + id: "haskell", + source: Git( + git: "https://github.com/tree-sitter/tree-sitter-haskell", + rev: "cf394604ae2ec2a5e65b1afbc7dea21258ede403", + ), + ) + ), + ), + // HTML Mode( name: "HTML", @@ -136,9 +175,10 @@ ) ), ), - // Javascript + + // JavaScript Mode( - name: "Javascript", + name: "JavaScript", scope: "source.js", injection_regex: "^(js|javascript)$", patterns: [ @@ -159,6 +199,7 @@ ) ), ), + // JSON Mode( name: "JSON", @@ -183,6 +224,7 @@ ) ), ), + // Markdown Mode( name: "Markdown", @@ -206,6 +248,7 @@ ) ), ), + // Protobuf Mode( name: "Protobuf", @@ -227,6 +270,7 @@ ) ), ), + // Python Mode( name: "Python", @@ -261,6 +305,7 @@ ) ), ), + // Regex Mode( name: "Regex", @@ -282,7 +327,8 @@ ) ), ), - // Rusty Object Notation (RON) + + // RON (Rusty Object Notation) Mode( name: "RON", scope: "source.ron", @@ -303,6 +349,7 @@ ) ), ), + // Ruby Mode( name: "Ruby", @@ -331,6 +378,7 @@ ) ), ), + // Rust Mode( name: "Rust", @@ -352,6 +400,43 @@ ) ), ), + + // Shell scripts + Mode( + name: "Shell Script", + scope: "source.bash", + injection_regex: "bash", + patterns: [ + Suffix(".sh"), + Suffix(".bash"), + Suffix(".zsh"), + Name(".bash_login"), + Name(".bash_logout"), + Name(".bash_profile"), + Name(".bashrc"), + Name(".profile"), + Name(".zshenv"), + Name(".zlogin"), + Name(".zlogout"), + Name(".zprofile"), + Name(".zshrc"), + ], + comment: Some(Comment(token: "# ")), + indentation: Indentation( + width: 2, + unit: Space, + ), + grammar: Some( + Grammar( + id: "bash", + source: Git( + git: "https://github.com/tree-sitter/tree-sitter-bash", + rev: "a8eb5cb57c66f74c63ab950de081207cccf52017", + ), + ) + ), + ), + // TOML Mode( name: "Toml", @@ -373,6 +458,7 @@ ) ), ), + // Tree sitter queries Mode( name: "tsq", @@ -394,6 +480,7 @@ ) ), ), + // Typescript Mode( name: "Typescript", @@ -418,6 +505,7 @@ ) ), ), + // Typescript with JSX tags, i.e. TSX Mode( name: "Typescript TSX", @@ -442,41 +530,7 @@ ) ), ), - // Shell scripts - Mode( - name: "Shell Script", - scope: "source.bash", - injection_regex: "bash", - patterns: [ - Suffix(".sh"), - Suffix(".bash"), - Suffix(".zsh"), - Name(".bash_login"), - Name(".bash_logout"), - Name(".bash_profile"), - Name(".bashrc"), - Name(".profile"), - Name(".zshenv"), - Name(".zlogin"), - Name(".zlogout"), - Name(".zprofile"), - Name(".zshrc"), - ], - comment: Some(Comment(token: "# ")), - indentation: Indentation( - width: 2, - unit: Space, - ), - grammar: Some( - Grammar( - id: "bash", - source: Git( - git: "https://github.com/tree-sitter/tree-sitter-bash", - rev: "a8eb5cb57c66f74c63ab950de081207cccf52017", - ), - ) - ), - ), + // WebGPU shading language Mode( name: "wgsl",