Skip to content

Commit

Permalink
use path-shash to produce a glob expression compatible with glob-match
Browse files Browse the repository at this point in the history
  • Loading branch information
glehmann committed May 6, 2024
1 parent 35c8975 commit bb09488
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ clean-path = "0.2.1"
dashmap = "5.5.3"
glob = "0.3.1"
glob-match = "0.2.1"
path-slash = "0.2.1"
ropey = "1.6.1"
serde = "1.0.200"
thiserror = "1.0.59"
Expand Down
3 changes: 2 additions & 1 deletion src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use std::time::Instant;
use clean_path::Clean;
use dashmap::DashMap;
use glob_match::glob_match;
use path_slash::PathExt;
use tower_lsp::lsp_types::request::{GotoDeclarationParams, GotoDeclarationResponse};
use tower_lsp::{jsonrpc::Result, lsp_types::*, Client, LanguageServer};
use tree_sitter::Parser;
Expand Down Expand Up @@ -65,7 +66,7 @@ impl Backend {
let path = path
.parent()
.ok_or_else(|| request_failed("can't compute the current Earthfile parent"))?;
let path = path.join(earthfile_ref).join("Earthfile").clean().to_string_lossy().to_string();
let path = path.join(earthfile_ref).join("Earthfile").clean().to_slash_lossy().to_string();
Ok(self
.docs
.iter()
Expand Down

0 comments on commit bb09488

Please sign in to comment.