From f5b67d9acb89ea54e7226111e3e4d8c3a008144b Mon Sep 17 00:00:00 2001 From: sogaiu Date: Sun, 28 Jan 2024 19:17:46 +0900 Subject: Use janet-simple grammar for Janet (#9247) * Use janet-simple grammar for Janet * Update book * Tweak language name and related * Rename janet-simple to janet in book * Remove spurious language section for janet * Drop quote_lit and qq_lit related highlighting --------- Co-authored-by: sogaiu <983021772@users.noreply.github.com> Co-authored-by: Blaž Hrastnik --- languages.toml | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) (limited to 'languages.toml') diff --git a/languages.toml b/languages.toml index 785bc970..ba3b1906 100644 --- a/languages.toml +++ b/languages.toml @@ -326,6 +326,29 @@ comment-token = "//" language-servers = [ "mint" ] indent = { tab-width = 2, unit = " " } +[[language]] +name = "janet" +scope = "source.janet" +injection-regex = "janet" +file-types = ["cgen", "janet", "jdn"] +shebangs = ["janet"] +roots = ["project.janet"] +comment-token = "#" +indent = { tab-width = 2, unit = " " } +formatter = { command = "janet-format" } +grammar = "janet-simple" + +[language.auto-pairs] +'"' = '"' +'(' = ')' +'[' = ']' +'{' = '}' +"`" = "`" + +[[grammar]] +name = "janet-simple" +source = { git = "https://github.com/sogaiu/tree-sitter-janet-simple", rev = "51271e260346878e1a1aa6c506ce6a797b7c25e2" } + [[language]] name = "json" scope = "source.json" @@ -3008,15 +3031,6 @@ file-types = ["log"] name = "log" source = { git = "https://github.com/Tudyx/tree-sitter-log", rev = "62cfe307e942af3417171243b599cc7deac5eab9" } -[[language]] -name = "janet" -scope = "source.janet" -injection-regex = "janet" -file-types = ["janet"] -comment-token = "#" -indent = { tab-width = 2, unit = " " } -grammar = "clojure" - [[language]] name = "hocon" scope = "source.conf" -- cgit v1.2.3-70-g09d2