on master help sign in
remove hardcoded '/' from grammar source path (#1986)
b03421aMichael Davis
helix-loader/src/grammar.rs+4−2
@@ -143,7 +143,8 @@ fn fetch_grammar(grammar: GrammarConfiguration) -> Result<()> {
143 } = grammar.source
143 } = grammar.source
144 {
144 {
145 let grammar_dir = crate::runtime_dir()
145 let grammar_dir = crate::runtime_dir()
146− .join("grammars/sources")
146+ .join("grammars")
147+ .join("sources")
147 .join(&grammar.grammar_id);
148 .join(&grammar.grammar_id);
148
149
149 fs::create_dir_all(&grammar_dir).context(format!(
150 fs::create_dir_all(&grammar_dir).context(format!(
@@ -233,7 +234,8 @@ fn build_grammar(grammar: GrammarConfiguration) -> Result<()> {
233 PathBuf::from(&path)
234 PathBuf::from(&path)
234 } else {
235 } else {
235 crate::runtime_dir()
236 crate::runtime_dir()
236− .join("grammars/sources")
237+ .join("grammars")
238+ .join("sources")
237 .join(&grammar.grammar_id)
239 .join(&grammar.grammar_id)
238 };
240 };
239
241