From 2cb9eb8e4ac14c60ab8bb663d95a3ee00b74495e Mon Sep 17 00:00:00 2001 From: Schwa Aresty Date: Thu, 17 Oct 2024 11:17:16 -0700 Subject: [PATCH] Adds additional helpers for refactoring to intellij (#1425) this pull request adds commands to go to a line and search for some text and immediately perform an action on that. it makes it very simple to operate on words that you can see without having access to cursorless. This is very helpful in intellij since you don't have cursorless. It also expands on existing refactoring commands by adding specific ones for things like renaming and quick fixing. --------- Co-authored-by: Nicholas Riley Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- apps/jetbrains/jetbrains.talon | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/apps/jetbrains/jetbrains.talon b/apps/jetbrains/jetbrains.talon index fce2bb309a..72db4a4542 100644 --- a/apps/jetbrains/jetbrains.talon +++ b/apps/jetbrains/jetbrains.talon @@ -234,18 +234,48 @@ comment next [over]: user.idea("find next {text}, action CommentByLineComment") go last [over]: user.idea("find prev {text}, action EditorRight") go next [over]: user.idea("find next {text}, action EditorRight") +go [over]: + user.idea("goto {number} 0,find next {text}, action EditorRight") paste last [over]: user.idea("find prev {text}, action EditorRight, action EditorPaste") paste next [over]: user.idea("find next {text}, action EditorRight, action EditorPaste") +refactor [over]: + user.idea("goto {number} 0,find next {text}, action Refactorings.QuickListPopupAction") refactor last [over]: user.idea("find prev {text}, action Refactorings.QuickListPopupAction") refactor next [over]: user.idea("find next {text}, action Refactorings.QuickListPopupAction") +rename [over]: + user.idea("goto {number} 0,find next {text}, action RenameElement") +rename next [over]: user.idea("find next {text}, action RenameElement") +rename last [over]: user.idea("find prev {text}, action RenameElement") +complete [over]: + user.idea("goto {number} 0,find next {text},action CodeCompletion") +complete next [over]: user.idea("find next {text},action CodeCompletion") +complete last [over]: user.idea("find prev {text},action CodeCompletion") +quick fix [over]: + user.idea("goto {number} 0,find next {text},action ShowIntentionActions") +quick fix next [over]: + user.idea("find next {text},action ShowIntentionActions") +quick fix last [over]: + user.idea("find prev {text},action ShowIntentionActions") replace last [over]: user.idea("find prev {text}, action EditorPaste") replace next [over]: user.idea("find next {text}, action EditorPaste") + +follow [over]: + user.idea("goto {number} 0,find next {text},action GotoDeclaration") +follow next [over]: user.idea("find next {text},action GotoDeclaration") +follow last [over]: user.idea("find prev {text},action GotoDeclaration") + +reference [over]: + user.idea("goto {number} 0,find next {text},action FindUsages") +reference next [over]: user.idea("find next {text},action FindUsages") +reference last [over]: user.idea("find prev {text},action FindUsages") + select last [over]: user.idea("find prev {text}") select next [over]: user.idea("find next {text}") +select [over]: user.idea("goto {number} 0,find next {text}") select camel left: user.extend_camel_left() select camel right: user.extend_camel_right()