Skip to content

Commit

Permalink
fix runtime path for grammar sources
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mikedavis committed Feb 15, 2022
1 parent 4ee5780 commit 157cd4b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions helix-term/src/grammars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ where

pub fn fetch_grammar(grammar: GrammarConfiguration) {
if let GrammarSource::Git { remote, revision } = grammar.source {
let grammar_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"))
.join("../runtime/grammars/sources")
let grammar_dir = helix_core::runtime_dir()
.join("grammars/sources")
.join(grammar.grammar_id.clone());

fs::create_dir_all(grammar_dir.clone()).expect("Could not create grammar directory");
Expand Down Expand Up @@ -148,8 +148,8 @@ fn build_grammar(grammar: GrammarConfiguration) {
let grammar_dir = if let GrammarSource::Local { ref path } = grammar.source {
PathBuf::from(path)
} else {
PathBuf::from(env!("CARGO_MANIFEST_DIR"))
.join("../runtime/grammars/sources")
helix_core::runtime_dir()
.join("grammars/sources")
.join(grammar.grammar_id.clone())
};

Expand Down

0 comments on commit 157cd4b

Please sign in to comment.