on master help sign in
Remove the path specifier.
c1e5733Blaž Hrastnik
helix-core/src/indent.rs−1
@@ -304,7 +304,6 @@ where
304 language_id: Lang::Rust,
304 language_id: Lang::Rust,
305 highlight_config: OnceCell::new(),
305 highlight_config: OnceCell::new(),
306 //
306 //
307− path: "../helix-syntax/languages/tree-sitter-rust".into(),
308 roots: vec![],
307 roots: vec![],
309 language_server: None,
308 language_server: None,
310 indent: Some(IndentationConfiguration {
309 indent: Some(IndentationConfiguration {
helix-core/src/syntax.rs+3−1
@@ -27,7 +27,7 @@ pub struct LanguageConfiguration {
27 pub file_types: Vec<String>, // filename ends_with? <Gemfile, rb, etc>
27 pub file_types: Vec<String>, // filename ends_with? <Gemfile, rb, etc>
28 pub roots: Vec<String>, // these indicate project roots <.git, Cargo.toml>
28 pub roots: Vec<String>, // these indicate project roots <.git, Cargo.toml>
29
29
30− pub path: PathBuf,
30+ // pub path: PathBuf,
31 // root_path for tree-sitter (^)
31 // root_path for tree-sitter (^)
32
32
33 // content_regex
33 // content_regex
@@ -104,6 +104,8 @@ impl LanguageConfiguration {
104 let language = get_language_name(self.language_id).to_ascii_lowercase();
104 let language = get_language_name(self.language_id).to_ascii_lowercase();
105
105
106 let highlights_query = read_query(&language, "highlights.scm");
106 let highlights_query = read_query(&language, "highlights.scm");
107+ // always highlight syntax errors
108+ // highlights_query += "\n(ERROR) @error";
107
109
108 let injections_query = read_query(&language, "injections.scm");
110 let injections_query = read_query(&language, "injections.scm");
109
111
languages.toml−13
@@ -4,7 +4,6 @@ scope = "source.rust"
4injection-regex = "rust"
4injection-regex = "rust"
5file-types = ["rs"]
5file-types = ["rs"]
6roots = []
6roots = []
7−path = "../helix-syntax/languages/tree-sitter-rust"
8
7
9language-server = { command = "rust-analyzer" }
8language-server = { command = "rust-analyzer" }
10indent = { tab-width = 4, unit = " " }
9indent = { tab-width = 4, unit = " " }
@@ -15,7 +14,6 @@ scope = "source.toml"
15injection-regex = "toml"
14injection-regex = "toml"
16file-types = ["toml"]
15file-types = ["toml"]
17roots = []
16roots = []
18−path = "../helix-syntax/languages/tree-sitter-toml"
19
17
20indent = { tab-width = 2, unit = " " }
18indent = { tab-width = 2, unit = " " }
21
19
@@ -25,7 +23,6 @@ scope = "source.json"
25injection-regex = "json"
23injection-regex = "json"
26file-types = ["json"]
24file-types = ["json"]
27roots = []
25roots = []
28−path = "../helix-syntax/languages/tree-sitter-json"
29
26
30indent = { tab-width = 2, unit = " " }
27indent = { tab-width = 2, unit = " " }
31
28
@@ -35,7 +32,6 @@ scope = "source.c"
35injection-regex = "c"
32injection-regex = "c"
36file-types = ["c"] # TODO: ["h"]
33file-types = ["c"] # TODO: ["h"]
37roots = []
34roots = []
38−path = "../helix-syntax/languages/tree-sitter-c"
39
35
40indent = { tab-width = 2, unit = " " }
36indent = { tab-width = 2, unit = " " }
41
37
@@ -45,7 +41,6 @@ scope = "source.cpp"
45injection-regex = "cpp"
41injection-regex = "cpp"
46file-types = ["cc", "cpp", "hpp", "h"]
42file-types = ["cc", "cpp", "hpp", "h"]
47roots = []
43roots = []
48−path = "../helix-syntax/languages/tree-sitter-cpp" # TODO: also C highlights
49
44
50indent = { tab-width = 2, unit = " " }
45indent = { tab-width = 2, unit = " " }
51
46
@@ -55,7 +50,6 @@ scope = "source.go"
55injection-regex = "go"
50injection-regex = "go"
56file-types = ["go"]
51file-types = ["go"]
57roots = ["Gopkg.toml", "go.mod"]
52roots = ["Gopkg.toml", "go.mod"]
58−path = "../helix-syntax/languages/tree-sitter-go"
59
53
60language-server = { command = "gopls" }
54language-server = { command = "gopls" }
61# TODO: gopls needs utf-8 offsets
55# TODO: gopls needs utf-8 offsets
@@ -67,7 +61,6 @@ scope = "source.js"
67injection-regex = "^(js|javascript)$"
61injection-regex = "^(js|javascript)$"
68file-types = ["js"]
62file-types = ["js"]
69roots = []
63roots = []
70−path = "../helix-syntax/languages/tree-sitter-javascript"
71# TODO: highlights-jsx, highlights-params
64# TODO: highlights-jsx, highlights-params
72
65
73indent = { tab-width = 2, unit = " " }
66indent = { tab-width = 2, unit = " " }
@@ -78,7 +71,6 @@ scope = "source.css"
78injection-regex = "css"
71injection-regex = "css"
79file-types = ["css"]
72file-types = ["css"]
80roots = []
73roots = []
81−path = "../helix-syntax/languages/tree-sitter-css"
82
74
83indent = { tab-width = 2, unit = " " }
75indent = { tab-width = 2, unit = " " }
84
76
@@ -88,7 +80,6 @@ scope = "text.html.basic"
88injection-regex = "html"
80injection-regex = "html"
89file-types = ["html"]
81file-types = ["html"]
90roots = []
82roots = []
91−path = "../helix-syntax/languages/tree-sitter-html"
92
83
93indent = { tab-width = 2, unit = " " }
84indent = { tab-width = 2, unit = " " }
94
85
@@ -98,7 +89,6 @@ scope = "source.python"
98injection-regex = "python"
89injection-regex = "python"
99file-types = ["py"]
90file-types = ["py"]
100roots = []
91roots = []
101−path = "../helix-syntax/languages/tree-sitter-python"
102
92
103language-server = { command = "pyls" }
93language-server = { command = "pyls" }
104# TODO: pyls needs utf-8 offsets
94# TODO: pyls needs utf-8 offsets
@@ -110,7 +100,6 @@ scope = "source.ruby"
110injection-regex = "ruby"
100injection-regex = "ruby"
111file-types = ["rb"]
101file-types = ["rb"]
112roots = []
102roots = []
113−path = "../helix-syntax/languages/tree-sitter-ruby"
114
103
115language-server = { command = "solargraph", args = ["stdio"] }
104language-server = { command = "solargraph", args = ["stdio"] }
116indent = { tab-width = 2, unit = " " }
105indent = { tab-width = 2, unit = " " }
@@ -121,7 +110,6 @@ scope = "source.bash"
121injection-regex = "bash"
110injection-regex = "bash"
122file-types = ["sh", "bash"]
111file-types = ["sh", "bash"]
123roots = []
112roots = []
124−path = "../helix-syntax/languages/tree-sitter-bash"
125
113
126language-server = { command = "bash-language-server", args = ["start"] }
114language-server = { command = "bash-language-server", args = ["start"] }
127indent = { tab-width = 2, unit = " " }
115indent = { tab-width = 2, unit = " " }
@@ -132,6 +120,5 @@ scope = "source.php"
132injection-regex = "php"
120injection-regex = "php"
133file-types = ["php"]
121file-types = ["php"]
134roots = []
122roots = []
135−path = "../helix-syntax/languages/tree-sitter-php"
136
123
137indent = { tab-width = 2, unit = " " }
124indent = { tab-width = 2, unit = " " }