1
0
Fork 0
Commit Graph

4533 Commits

Author SHA1 Message Date
chylex 8e8420033c
Revert "Factor disposable objects on editor opening"
This reverts commit 1fa78935
2024-05-05 18:54:35 +02:00
chylex 7b89362f9d
Fix(VIM-3364): Exception with mapped Generate action 2024-05-05 18:54:35 +02:00
chylex 567a8487de
Apply scrolloff after executing native IDEA actions 2024-05-05 18:54:35 +02:00
chylex 90ad27e55a
Stay on same line after reindenting 2024-05-05 18:54:35 +02:00
chylex 271ea2345d
Update search register when using f/t 2024-05-05 18:54:34 +02:00
chylex 82386be533
Automatically add unambiguous imports after running a macro 2024-05-05 18:54:34 +02:00
chylex a36ba6ab3d
Fix(VIM-3179): Respect virtual space below editor (imperfectly) 2024-05-05 18:54:34 +02:00
chylex ce60d1e552
Fix(VIM-3178): Workaround to support "Jump to Source" action mapping 2024-05-05 18:54:34 +02:00
chylex 4a200c23a7
Add support for count for visual and line motion surround 2024-05-05 18:54:34 +02:00
chylex 723a6b943f
Fix vim-surround not working with multiple cursors
Fixes multiple cursors with vim-surround commands `cs, ds, S` (but not `ys`).
2024-05-05 18:54:34 +02:00
chylex 1205b33195
Fix(VIM-696) Restore visual mode after undo/redo, and disable incompatible actions 2024-05-05 18:54:34 +02:00
chylex f464d25844
Change matchit plugin to use HTML patterns in unrecognized files 2024-04-26 18:55:35 +02:00
chylex acc12c5b17
Reset insert mode when switching active editor 2024-04-26 18:55:35 +02:00
chylex 0c1bbd5e92
Remove update checker 2024-04-26 18:55:35 +02:00
chylex f330e220ad
Set custom plugin version 2024-04-26 18:55:33 +02:00
Alex Plate 9d0b68b0f8
Use the correct context after executing the ex command
With the incorrect context the action EditorSelectWord didn't make any effect because it worked on the ex-entry panel editor
2024-04-26 18:22:53 +03:00
Alex Plate b66da76880
VIM-3376: Remove usages of the EditorDataContext
EditorDataContext cannot be used because the platform cannot convert it to the async data context. Taking the fact that it's not clear why this custom context exists, I decided to get rid of it at all.

```
Cannot convert to AsyncDataContext at 'keyboard shortcut' DataContextWrapper(CaretSpecificDataContext(com.maddyhome.idea.vim.helper.EditorDataContext)). Please use CustomizedDataContext or its inheritors like SimpleDataContext
```

Class EditorDataContext cannot be removed because it's used in github.zgqq.intellij-enhance plugin
2024-04-26 14:52:47 +03:00
Alex Plate 54d6119784
VIM-3376: Working on removing EditorDataContext. Remove it from ReplaceWithRegister
EditorDataContext cannot be used because the platform cannot convert it to the async data context. Taking the fact that it's not clear why this custom context exists, I decided to get rid of it at all.

```
Cannot convert to AsyncDataContext at 'keyboard shortcut' DataContextWrapper(CaretSpecificDataContext(com.maddyhome.idea.vim.helper.EditorDataContext)). Please use CustomizedDataContext or its inheritors like SimpleDataContext
```
2024-04-26 14:19:47 +03:00
Alex Plate 0b8c081425
VIM-3376: Working on removing EditorDataContext. Remove it from multiple places
EditorDataContext cannot be used because the platform cannot convert it to the async data context. Taking the fact that it's not clear why this custom context exists, I decided to get rid of it at all.

```
Cannot convert to AsyncDataContext at 'keyboard shortcut' DataContextWrapper(CaretSpecificDataContext(com.maddyhome.idea.vim.helper.EditorDataContext)). Please use CustomizedDataContext or its inheritors like SimpleDataContext
```
2024-04-26 14:16:52 +03:00
Alex Plate 209052ffa6
Create a function to get the execution context from the editor
This is a part of VIM-3376. This context will not be a custom EditorDataContext, but some context created by the platform.
In some places we don't have any kind of "current context", but we have to use it for the function. However, such context can be simply retrieved from the editor.
2024-04-26 14:03:37 +03:00
Alex Plate fe9a6b5cfb
Remove context argument when creating a pad for the string
It's unclear why it was needed to get the project from the context, but it's easy to get the project from the existing editor
2024-04-26 13:56:10 +03:00
Alex Plate 9c0f74369f
VIM-3376: Working on removing EditorDataContext. Remove from ExEditorKit
This one was added after the implementation of cmap in 5c9faba7f4

EditorDataContext cannot be used because the platform cannot convert it to the async data context. Taking the fact that it's not clear why this custom context exists, I decided to get rid of it at all.

```
Cannot convert to AsyncDataContext at 'keyboard shortcut' DataContextWrapper(CaretSpecificDataContext(com.maddyhome.idea.vim.helper.EditorDataContext)). Please use CustomizedDataContext or its inheritors like SimpleDataContext
```
2024-04-26 13:49:59 +03:00
Alex Plate cd27e5229b
VIM-3376: Working on removing EditorDataContext. Remove from CommandLineHelper
EditorDataContext cannot be used because the platform cannot convert it to the async data context. Taking the fact that it's not clear why this custom context exists, I decided to get rid of it at all.

```
Cannot convert to AsyncDataContext at 'keyboard shortcut' DataContextWrapper(CaretSpecificDataContext(com.maddyhome.idea.vim.helper.EditorDataContext)). Please use CustomizedDataContext or its inheritors like SimpleDataContext
```
2024-04-26 13:40:18 +03:00
Alex Plate 472732905c
VIM-3376: Get rid of IjCaretAndEditorExecutionContext
This context was added long ago, but I wasn't able to find specific reasons for that. Currently, such custom contexts cannot work with the intellij platform and should be refactored or removed. The issues with this context are that it cannot be converted to the async data context by the platform.
Taking the fact that the reason for this context was not found, I decided to get rid of it.

The issue from the platform looks like this

```
Cannot convert to AsyncDataContext at 'keyboard shortcut' DataContextWrapper(CaretSpecificDataContext(com.maddyhome.idea.vim.helper.EditorDataContext)). Please use CustomizedDataContext or its inheritors like SimpleDataContext
```
Here the EditorDataContext is mentioned instead of CaretAndEditorData context, however, I'll clean up both contexts during this refactoring

It was used in the action system for mapping to the `<Action>` keyword and in commit 256f5fcd0e it's mentioned that the EditorActionHandler was not working without this context. However, currently both cases work fine without addition wrapping.
2024-04-26 13:27:56 +03:00
Alex Plate 485d9f81cd
VIM-3376: Use SimpleDataContext in tests 2024-04-26 12:25:56 +03:00
Alex Plate 8cf136ce4c
Add toString representations for IjNativeAction and ActionEnableStatus 2024-04-26 10:22:50 +03:00
Alex Plate 116a8ac9d2
Reformat test code 2024-04-26 09:58:27 +03:00
Alex Plate c4d92ebe73
VIM-308 In intellij 2024.1+ the caret movement won't be detected as a separate undo action 2024-04-05 17:50:42 +03:00
Alex Plate dc2ce64823
Revert changes in action processing to fix VIM-3351 2024-04-02 11:52:56 +03:00
Alex Plate d0d86d9178
Print the exceptin in logger.warn instead of just a message 2024-03-29 16:53:22 +02:00
Alex Plate f417af6148
Specify ActionUpdateThread for FindActionIdAction 2024-03-29 15:38:05 +02:00
Alex Plate 2fe2860a09
Remove Offset and Pointer and switch to the regular Ints
Details on that can be found here: VIM-3368
2024-03-29 15:38:05 +02:00
Filipp Vakhitov 7652b16ca6 Move more MotionGroup methods to its base class 2024-03-29 14:52:52 +02:00
Filipp Vakhitov 618a010c15 Move some MotionGroup methods to its base class 2024-03-29 14:52:52 +02:00
Filipp Vakhitov d44a34ed9b Remove unnecessary abstract method 2024-03-29 14:52:52 +02:00
Filipp Vakhitov c84fc996db Move some methods to vim-engine
The more methods we have in the engine, the fewer number of methods we will need to implement in the Fleet
2024-03-29 14:52:52 +02:00
Filipp Vakhitov 43f232543b Replace findBlockRange with newer implementation
The newer implementation is a part of the vim-engine library and uses new methods from the SearchGroup.kt, but it is not fully refactored yet
2024-03-29 14:52:52 +02:00
filipp 3f65d1d99a Revert "Revert changes to SearchGroup"
This reverts commit 00ccddf8cf.
2024-03-29 14:52:52 +02:00
Alex Plate 8c1103c461
Add comment about the fix for project leak in tests 2024-03-28 10:30:19 +02:00
Alex Plate ab75ace8db
Fix(VIM-3331): Support custom registers in replaceWithRegister plugin 2024-03-25 09:40:45 +02:00
Alex Plate 4a58e6a282
Add test with custom register for textObjEntire extension 2024-03-25 09:34:58 +02:00
Alex Plate 58a8b96c3c
Revert "Stop IdeaVim actions flowing into JB Client"
This reverts commit bd192561ae.

This commit reverts the fix for VIM-3283 because it causes VIM-3346 and VIM-3347
2024-03-20 13:08:04 +02:00
Alex Plate a9ddfac782
Add test that shows an issue when deleting a line at the end of file 2024-03-12 21:21:15 +02:00
Alex Plate 79437df894
Fix(VIM-3330): Use `Z` backward visual search in sneak plugin 2024-03-12 20:01:35 +02:00
Alex Plate 4bad129caf
Do not register clipboard option change listener for caret registers
Register groups for the caret do not use some fields from the base class, however the listener for these fiels is still registered. Now we don't register this listener.
Generally it looks like a bigger refactoring can be performed in order to separate the common registers logic from caret registers logic.

This change should improve the performance of the IjVimCaret initialization because now we won't register a new disposable on each instance of IjVimCaret

This is a part of VIM-3336
2024-03-11 17:41:54 +02:00
filipp 00ccddf8cf Revert changes to SearchGroup
Wrong branch. The changes should be merged to master only after review in the Fleet branch
2024-03-03 22:16:19 +02:00
filipp 00cbf188fb Replace findUnmatchedBlock method with a new implementation 2024-03-03 22:05:28 +02:00
filipp 988ea74461 Fix(VIM-3294): %-movement mismatches braces 2024-03-03 22:05:28 +02:00
filipp 5959e9aaa1 Fix(VIM-1399): Uncommented brackets are matched to commented ones in VIM mode 2024-03-03 22:05:28 +02:00
filipp 434df565ae Migrate % command to work with newer method in SearchGroup.kt 2024-03-03 22:05:28 +02:00