Add c++, js, css, html language definitions.

imgbot
Blaž Hrastnik 3 years ago
parent 463f58dfda
commit 3bab640491

@ -107,10 +107,7 @@ fn build_dir(dir: &str, language: &str) {
}
fn main() {
let ignore = vec![
"tree-sitter-typescript".to_string(),
"tree-sitter-cpp".to_string(),
];
let ignore = vec!["tree-sitter-typescript".to_string()];
let dirs = collect_tree_sitter_dirs(&ignore);
let mut n_jobs = 0;

@ -70,7 +70,7 @@ mk_langs!(
(Bash, tree_sitter_bash),
(C, tree_sitter_c),
(CSharp, tree_sitter_c_sharp),
// (Cpp, tree_sitter_cpp),
(Cpp, tree_sitter_cpp),
(Css, tree_sitter_css),
(Go, tree_sitter_go),
// (Haskell, tree_sitter_haskell),

@ -18,3 +18,44 @@ roots = []
path = "../helix-syntax/languages/tree-sitter-toml"
indent = { tab-width = 2, unit = " " }
[[language]]
name = "cpp"
scope = "source.cpp"
injection-regex = "cpp"
file-types = ["cc", "cpp", "hpp", "h"]
roots = []
path = "../helix-syntax/languages/tree-sitter-cpp" # TODO: also C highlights
indent = { tab-width = 2, unit = " " }
[[language]]
name = "javascript"
scope = "source.js"
injection-regex = "^(js|javascript)$"
file-types = ["js"]
roots = []
path = "../helix-syntax/languages/tree-sitter-javascript"
# TODO: highlights-jsx, highlights-params
indent = { tab-width = 2, unit = " " }
[[language]]
name = "css"
scope = "source.css"
injection-regex = "css"
file-types = ["css"]
roots = []
path = "../helix-syntax/languages/tree-sitter-css"
indent = { tab-width = 2, unit = " " }
[[language]]
name = "html"
scope = "text.html.basic"
injection-regex = "html"
file-types = ["html"]
roots = []
path = "../helix-syntax/languages/tree-sitter-html"
indent = { tab-width = 2, unit = " " }

@ -3,7 +3,8 @@
"punctuation" = "#a4a0e8" # lavender
"punctuation.delimiter" = "#a4a0e8" # lavender
"operator" = "#dbbfef" # lilac
"property" = "#a4a0e8" # lavender
# "property" = "#a4a0e8" # lavender
"property" = "#ffffff" # white
"variable.parameter" = "#a4a0e8" # lavender
# TODO distinguish type from type.builtin?
"type" = "#ffffff" # white
@ -16,6 +17,7 @@
"constant" = "#ffffff" # white
"constant.builtin" = "#ffffff" # white
"string" = "#cccccc" # silver
"number" = "#e8dca0" # chamois
"escape" = "#efba5d" # honey
# used for lifetimes
"label" = "#efba5d" # honey
@ -24,13 +26,13 @@
# TODO: diferentiate doc comment
# TODO: variable as lilac
# TODO: mod/use statements as white
# TODO: mod stuff as chamoise
# TODO: mod stuff as chamois
# TODO: add "(scoped_identifier) @path" for std::mem::
#
# concat (ERROR) @syntax-error and "MISSING ;" selectors for errors
"module" = "#ff0000"
"variable" = "#ff0000"
"variable" = "#a4a0e8" # lavender
"function.builtin" = "#ff0000"
"ui.background" = { bg = "#3b224c" } # midnight

Loading…
Cancel
Save