Remove the path specifier.

pull/11/head
Blaž Hrastnik 4 years ago
parent 61872de6c0
commit c1e5733b02

@ -304,7 +304,6 @@ where
language_id: Lang::Rust, language_id: Lang::Rust,
highlight_config: OnceCell::new(), highlight_config: OnceCell::new(),
// //
path: "../helix-syntax/languages/tree-sitter-rust".into(),
roots: vec![], roots: vec![],
language_server: None, language_server: None,
indent: Some(IndentationConfiguration { indent: Some(IndentationConfiguration {

@ -27,7 +27,7 @@ pub struct LanguageConfiguration {
pub file_types: Vec<String>, // filename ends_with? <Gemfile, rb, etc> pub file_types: Vec<String>, // filename ends_with? <Gemfile, rb, etc>
pub roots: Vec<String>, // these indicate project roots <.git, Cargo.toml> pub roots: Vec<String>, // these indicate project roots <.git, Cargo.toml>
pub path: PathBuf, // pub path: PathBuf,
// root_path for tree-sitter (^) // root_path for tree-sitter (^)
// content_regex // content_regex
@ -104,6 +104,8 @@ impl LanguageConfiguration {
let language = get_language_name(self.language_id).to_ascii_lowercase(); let language = get_language_name(self.language_id).to_ascii_lowercase();
let highlights_query = read_query(&language, "highlights.scm"); let highlights_query = read_query(&language, "highlights.scm");
// always highlight syntax errors
// highlights_query += "\n(ERROR) @error";
let injections_query = read_query(&language, "injections.scm"); let injections_query = read_query(&language, "injections.scm");

@ -4,7 +4,6 @@ scope = "source.rust"
injection-regex = "rust" injection-regex = "rust"
file-types = ["rs"] file-types = ["rs"]
roots = [] roots = []
path = "../helix-syntax/languages/tree-sitter-rust"
language-server = { command = "rust-analyzer" } language-server = { command = "rust-analyzer" }
indent = { tab-width = 4, unit = " " } indent = { tab-width = 4, unit = " " }
@ -15,7 +14,6 @@ scope = "source.toml"
injection-regex = "toml" injection-regex = "toml"
file-types = ["toml"] file-types = ["toml"]
roots = [] roots = []
path = "../helix-syntax/languages/tree-sitter-toml"
indent = { tab-width = 2, unit = " " } indent = { tab-width = 2, unit = " " }
@ -25,7 +23,6 @@ scope = "source.json"
injection-regex = "json" injection-regex = "json"
file-types = ["json"] file-types = ["json"]
roots = [] roots = []
path = "../helix-syntax/languages/tree-sitter-json"
indent = { tab-width = 2, unit = " " } indent = { tab-width = 2, unit = " " }
@ -35,7 +32,6 @@ scope = "source.c"
injection-regex = "c" injection-regex = "c"
file-types = ["c"] # TODO: ["h"] file-types = ["c"] # TODO: ["h"]
roots = [] roots = []
path = "../helix-syntax/languages/tree-sitter-c"
indent = { tab-width = 2, unit = " " } indent = { tab-width = 2, unit = " " }
@ -45,7 +41,6 @@ scope = "source.cpp"
injection-regex = "cpp" injection-regex = "cpp"
file-types = ["cc", "cpp", "hpp", "h"] file-types = ["cc", "cpp", "hpp", "h"]
roots = [] roots = []
path = "../helix-syntax/languages/tree-sitter-cpp" # TODO: also C highlights
indent = { tab-width = 2, unit = " " } indent = { tab-width = 2, unit = " " }
@ -55,7 +50,6 @@ scope = "source.go"
injection-regex = "go" injection-regex = "go"
file-types = ["go"] file-types = ["go"]
roots = ["Gopkg.toml", "go.mod"] roots = ["Gopkg.toml", "go.mod"]
path = "../helix-syntax/languages/tree-sitter-go"
language-server = { command = "gopls" } language-server = { command = "gopls" }
# TODO: gopls needs utf-8 offsets # TODO: gopls needs utf-8 offsets
@ -67,7 +61,6 @@ scope = "source.js"
injection-regex = "^(js|javascript)$" injection-regex = "^(js|javascript)$"
file-types = ["js"] file-types = ["js"]
roots = [] roots = []
path = "../helix-syntax/languages/tree-sitter-javascript"
# TODO: highlights-jsx, highlights-params # TODO: highlights-jsx, highlights-params
indent = { tab-width = 2, unit = " " } indent = { tab-width = 2, unit = " " }
@ -78,7 +71,6 @@ scope = "source.css"
injection-regex = "css" injection-regex = "css"
file-types = ["css"] file-types = ["css"]
roots = [] roots = []
path = "../helix-syntax/languages/tree-sitter-css"
indent = { tab-width = 2, unit = " " } indent = { tab-width = 2, unit = " " }
@ -88,7 +80,6 @@ scope = "text.html.basic"
injection-regex = "html" injection-regex = "html"
file-types = ["html"] file-types = ["html"]
roots = [] roots = []
path = "../helix-syntax/languages/tree-sitter-html"
indent = { tab-width = 2, unit = " " } indent = { tab-width = 2, unit = " " }
@ -98,7 +89,6 @@ scope = "source.python"
injection-regex = "python" injection-regex = "python"
file-types = ["py"] file-types = ["py"]
roots = [] roots = []
path = "../helix-syntax/languages/tree-sitter-python"
language-server = { command = "pyls" } language-server = { command = "pyls" }
# TODO: pyls needs utf-8 offsets # TODO: pyls needs utf-8 offsets
@ -110,7 +100,6 @@ scope = "source.ruby"
injection-regex = "ruby" injection-regex = "ruby"
file-types = ["rb"] file-types = ["rb"]
roots = [] roots = []
path = "../helix-syntax/languages/tree-sitter-ruby"
language-server = { command = "solargraph", args = ["stdio"] } language-server = { command = "solargraph", args = ["stdio"] }
indent = { tab-width = 2, unit = " " } indent = { tab-width = 2, unit = " " }
@ -121,7 +110,6 @@ scope = "source.bash"
injection-regex = "bash" injection-regex = "bash"
file-types = ["sh", "bash"] file-types = ["sh", "bash"]
roots = [] roots = []
path = "../helix-syntax/languages/tree-sitter-bash"
language-server = { command = "bash-language-server", args = ["start"] } language-server = { command = "bash-language-server", args = ["start"] }
indent = { tab-width = 2, unit = " " } indent = { tab-width = 2, unit = " " }
@ -132,6 +120,5 @@ scope = "source.php"
injection-regex = "php" injection-regex = "php"
file-types = ["php"] file-types = ["php"]
roots = [] roots = []
path = "../helix-syntax/languages/tree-sitter-php"
indent = { tab-width = 2, unit = " " } indent = { tab-width = 2, unit = " " }

Loading…
Cancel
Save