Skip to content

Commit

Permalink
update tree-grepper
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHicks committed Jan 15, 2021
1 parent 2d8ae8d commit 1b5b05d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nix/sources.json
Expand Up @@ -173,7 +173,7 @@
"tree-grepper": {
"branch": "main",
"repo": "https://git.bytes.zone/brian/tree-grepper.git",
"rev": "7f1edd11d115eec84d91e33ec30f73fc5efdfd40",
"rev": "1d423444cf824f8b596d8d65f463decc2b91d189",
"type": "git"
},
"tug": {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/kak-tree-grepper/rc/kak-tree-grepper.kak
Expand Up @@ -21,7 +21,7 @@ define-command -override -docstring "jump somewhere in an Elm file's definition
QUERY="(function_declaration_left (lower_case_identifier)@function) (type_declaration (type) (upper_case_identifier)@type) (type_alias_declaration (type) (alias) (upper_case_identifier)@alias) (union_variant (upper_case_identifier)@constructor) (field_type (lower_case_identifier)@field)"
# TODO: maybe also (import_clause (import) (upper_case_qid)@import)?

EDIT_LOCATION="$("$TREE_GREPPER" "$QUERY" "$FILE" | fzf --with-nth 4,5 --nth 2,1 --delimiter=: --query "$FZF_QUERY" --select-1 | cut -d : -f 1-3 | tr : ' ')"
EDIT_LOCATION="$("$TREE_GREPPER" --language elm "$QUERY" "$FILE" | fzf --with-nth 4,5 --nth 2,1 --delimiter=: --query "$FZF_QUERY" --select-1 | cut -d : -f 1-3 | tr : ' ')"
printf "evaluate-commands -client %s edit %s\n" "$CLIENT" "$EDIT_LOCATION" | indiekak -p "$SESSION"
} -- %opt{tree_grepper_path} %opt{tree_grepper_fzf_path} %val{bufname} %arg{1} %val{client} %val{session}
}

0 comments on commit 1b5b05d

Please sign in to comment.