aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--helix-core/src/indent.rs1
-rw-r--r--helix-core/src/syntax.rs4
-rw-r--r--languages.toml13
3 files changed, 3 insertions, 15 deletions
diff --git a/helix-core/src/indent.rs b/helix-core/src/indent.rs
index 659783ba..ed5a8a47 100644
--- a/helix-core/src/indent.rs
+++ b/helix-core/src/indent.rs
@@ -304,7 +304,6 @@ where
language_id: Lang::Rust,
highlight_config: OnceCell::new(),
//
- path: "../helix-syntax/languages/tree-sitter-rust".into(),
roots: vec![],
language_server: None,
indent: Some(IndentationConfiguration {
diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs
index 4c890170..6e11e9b6 100644
--- a/helix-core/src/syntax.rs
+++ b/helix-core/src/syntax.rs
@@ -27,7 +27,7 @@ pub struct LanguageConfiguration {
pub file_types: Vec<String>, // filename ends_with? <Gemfile, rb, etc>
pub roots: Vec<String>, // these indicate project roots <.git, Cargo.toml>
- pub path: PathBuf,
+ // pub path: PathBuf,
// root_path for tree-sitter (^)
// content_regex
@@ -104,6 +104,8 @@ impl LanguageConfiguration {
let language = get_language_name(self.language_id).to_ascii_lowercase();
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");
diff --git a/languages.toml b/languages.toml
index d327e3a8..37e8ec36 100644
--- a/languages.toml
+++ b/languages.toml
@@ -4,7 +4,6 @@ scope = "source.rust"
injection-regex = "rust"
file-types = ["rs"]
roots = []
-path = "../helix-syntax/languages/tree-sitter-rust"
language-server = { command = "rust-analyzer" }
indent = { tab-width = 4, unit = " " }
@@ -15,7 +14,6 @@ scope = "source.toml"
injection-regex = "toml"
file-types = ["toml"]
roots = []
-path = "../helix-syntax/languages/tree-sitter-toml"
indent = { tab-width = 2, unit = " " }
@@ -25,7 +23,6 @@ scope = "source.json"
injection-regex = "json"
file-types = ["json"]
roots = []
-path = "../helix-syntax/languages/tree-sitter-json"
indent = { tab-width = 2, unit = " " }
@@ -35,7 +32,6 @@ scope = "source.c"
injection-regex = "c"
file-types = ["c"] # TODO: ["h"]
roots = []
-path = "../helix-syntax/languages/tree-sitter-c"
indent = { tab-width = 2, unit = " " }
@@ -45,7 +41,6 @@ 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 = " " }
@@ -55,7 +50,6 @@ scope = "source.go"
injection-regex = "go"
file-types = ["go"]
roots = ["Gopkg.toml", "go.mod"]
-path = "../helix-syntax/languages/tree-sitter-go"
language-server = { command = "gopls" }
# TODO: gopls needs utf-8 offsets
@@ -67,7 +61,6 @@ 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 = " " }
@@ -78,7 +71,6 @@ scope = "source.css"
injection-regex = "css"
file-types = ["css"]
roots = []
-path = "../helix-syntax/languages/tree-sitter-css"
indent = { tab-width = 2, unit = " " }
@@ -88,7 +80,6 @@ scope = "text.html.basic"
injection-regex = "html"
file-types = ["html"]
roots = []
-path = "../helix-syntax/languages/tree-sitter-html"
indent = { tab-width = 2, unit = " " }
@@ -98,7 +89,6 @@ scope = "source.python"
injection-regex = "python"
file-types = ["py"]
roots = []
-path = "../helix-syntax/languages/tree-sitter-python"
language-server = { command = "pyls" }
# TODO: pyls needs utf-8 offsets
@@ -110,7 +100,6 @@ scope = "source.ruby"
injection-regex = "ruby"
file-types = ["rb"]
roots = []
-path = "../helix-syntax/languages/tree-sitter-ruby"
language-server = { command = "solargraph", args = ["stdio"] }
indent = { tab-width = 2, unit = " " }
@@ -121,7 +110,6 @@ scope = "source.bash"
injection-regex = "bash"
file-types = ["sh", "bash"]
roots = []
-path = "../helix-syntax/languages/tree-sitter-bash"
language-server = { command = "bash-language-server", args = ["start"] }
indent = { tab-width = 2, unit = " " }
@@ -132,6 +120,5 @@ scope = "source.php"
injection-regex = "php"
file-types = ["php"]
roots = []
-path = "../helix-syntax/languages/tree-sitter-php"
indent = { tab-width = 2, unit = " " }