Skip to content

Commit

Permalink
[Enhancement] Maintain config.ron, Add Haskell
Browse files Browse the repository at this point in the history
This Pull Request fixes typos in the comments, adds comment banners and introduces a Tree-Sitter for Haskell.
  • Loading branch information
kevinmatthes authored and mcobzarenco committed Jul 30, 2022
1 parent 8fa7deb commit a3c4cd8
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 43 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down
138 changes: 96 additions & 42 deletions zee/config/config.ron
Original file line number Diff line number Diff line change
@@ -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(
Expand All @@ -31,6 +42,7 @@
)
),
),

// C++
Mode(
name: "C++",
Expand Down Expand Up @@ -66,6 +78,7 @@
)
),
),

// CSS
Mode(
name: "CSS",
Expand All @@ -86,6 +99,7 @@
)
),
),

// Dockerfile
Mode(
name: "Dockerfile",
Expand All @@ -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",
Expand All @@ -136,9 +175,10 @@
)
),
),
// Javascript

// JavaScript
Mode(
name: "Javascript",
name: "JavaScript",
scope: "source.js",
injection_regex: "^(js|javascript)$",
patterns: [
Expand All @@ -159,6 +199,7 @@
)
),
),

// JSON
Mode(
name: "JSON",
Expand All @@ -183,6 +224,7 @@
)
),
),

// Markdown
Mode(
name: "Markdown",
Expand All @@ -206,6 +248,7 @@
)
),
),

// Protobuf
Mode(
name: "Protobuf",
Expand All @@ -227,6 +270,7 @@
)
),
),

// Python
Mode(
name: "Python",
Expand Down Expand Up @@ -261,6 +305,7 @@
)
),
),

// Regex
Mode(
name: "Regex",
Expand All @@ -282,7 +327,8 @@
)
),
),
// Rusty Object Notation (RON)

// RON (Rusty Object Notation)
Mode(
name: "RON",
scope: "source.ron",
Expand All @@ -303,6 +349,7 @@
)
),
),

// Ruby
Mode(
name: "Ruby",
Expand Down Expand Up @@ -331,6 +378,7 @@
)
),
),

// Rust
Mode(
name: "Rust",
Expand All @@ -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",
Expand All @@ -373,6 +458,7 @@
)
),
),

// Tree sitter queries
Mode(
name: "tsq",
Expand All @@ -394,6 +480,7 @@
)
),
),

// Typescript
Mode(
name: "Typescript",
Expand All @@ -418,6 +505,7 @@
)
),
),

// Typescript with JSX tags, i.e. TSX
Mode(
name: "Typescript TSX",
Expand All @@ -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",
Expand Down

0 comments on commit a3c4cd8

Please sign in to comment.