Skip to content

Commit

Permalink
Update tree sitter deps to 0.23 (#1091)
Browse files Browse the repository at this point in the history
* Update tree-sitter to 0.23

* Use forked tree-sitter-toml

* Fix clippy

* Fixes
  • Loading branch information
liuchengxu authored Sep 22, 2024
1 parent 3e8d001 commit 3ca64d5
Show file tree
Hide file tree
Showing 7 changed files with 173 additions and 117 deletions.
141 changes: 78 additions & 63 deletions Cargo.lock

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

10 changes: 2 additions & 8 deletions crates/maple_core/src/stdio_server/provider/hooks/on_move.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,18 +445,12 @@ impl<'a> CachedPreviewImpl<'a> {
self.max_line_width(),
max_fname_len,
)
.map_err(|e| {
handle_io_error(&e);
e
})?
.inspect_err(handle_io_error)?
}
_ => {
let (lines, abs_path) =
previewer::preview_file(path, self.preview_height, self.max_line_width())
.map_err(|e| {
handle_io_error(&e);
e
})?;
.inspect_err(handle_io_error)?;
// cwd is shown via the popup title, no need to include it again.
let cwd_relative = abs_path.replacen(self.ctx.cwd.as_str(), ".", 1);
let mut lines = lines;
Expand Down
2 changes: 1 addition & 1 deletion crates/maple_core/src/stdio_server/vim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ static EXTENSION_TO_FILETYPE_MAP: OnceCell<HashMap<String, String>> = OnceCell::

pub fn initialize_filetype_map(output: &str) -> HashMap<&str, &str> {
let ext_map: HashMap<&str, &str> = output
.split(|x| x == '\n')
.split('\n')
// Only process the normal cases.
.filter(|s| s.contains("setf"))
.filter_map(|s| {
Expand Down
3 changes: 1 addition & 2 deletions crates/maple_core/src/tools/ctags/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,8 @@ impl ProjectCtagsCommand {
#[allow(unused)]
fn create_cache(&self) -> Result<(usize, PathBuf)> {
let mut total = 0usize;
let mut formatted_tags_iter = self.formatted_tags_iter()?.map(|x| {
let mut formatted_tags_iter = self.formatted_tags_iter()?.inspect(|_x| {
total += 1;
x
});
let lines = formatted_tags_iter.join("\n");

Expand Down
Loading

0 comments on commit 3ca64d5

Please sign in to comment.