add ports to tree grepper outline jumping
parent
08edf2a17e
commit
eb62260176
|
@ -18,7 +18,7 @@ define-command -override -docstring "jump somewhere in an Elm file's definition
|
|||
SESSION=$6
|
||||
|
||||
# do the magic!
|
||||
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) (lower_pattern)@pattern (exposed_type)@exposed_type (exposed_value)@exposed_value (as_clause (as) (upper_case_identifier)@module_alias)"
|
||||
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) (lower_pattern)@pattern (exposed_type)@exposed_type (exposed_value)@exposed_value (as_clause (as) (upper_case_identifier)@module_alias) (port_annotation (port) (lower_case_identifier)@port)"
|
||||
|
||||
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"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module KitchenSink exposing (..)
|
||||
port module KitchenSink exposing (..)
|
||||
|
||||
|
||||
type Id
|
||||
|
@ -30,3 +30,9 @@ deconstructions =
|
|||
"nope"
|
||||
in
|
||||
b
|
||||
|
||||
|
||||
port outgoingPort : Int -> Cmd msg
|
||||
|
||||
|
||||
port incomingPort : Sub Int
|
||||
|
|
Reference in New Issue