Commit Graph
4848 Commits
Author SHA1 Message Date
Filipp VakhitovandAlex Pláte 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 VakhitovandAlex Pláte 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
filippandAlex Pláte 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
filipp c8f36504d8 Fix tests for % 2024-03-03 22:05:28 +02:00
filipp d744987ac8 Add VimPsiService
We want to avoid unnecessary OOP and use interfaces only for cases where we will have different implementations for different IDEs
This service will help us in our future refactorings of SearchGroup and SearchHelper
2024-03-03 22:03:58 +02:00
Filipp Vakhitov 9a324ab448 Reset KeyHandlerState when switching Editors
Now we have a single state for all the editors, so we should not mix their states
2024-02-29 20:27:46 +02:00
Alex Plate 90f2d2ff29 Small update of the minimal version of IJ 2024-02-27 14:43:23 +02:00
Alex Plate 4c2edab406 Run optimize imports 2024-02-27 13:17:02 +02:00
Filipp Vakhitov a94a8b8539 Fix tests 2024-02-24 01:03:18 +02:00
Filipp Vakhitov 261230b23a Remove experimental showmodewidget option 2024-02-24 00:36:36 +02:00
Filipp Vakhitov b90317e00e More visible text color for mode widget
Visibility may be unexpected for custom themes with non-obvious colors
2024-02-24 00:27:48 +02:00
Filipp Vakhitov 21c9dc8785 Add statistic collector for mode widget 2024-02-24 00:15:01 +02:00
Alex Plate 31bbc60325 Fix all reports of the inspection that prohibits the use of companion objects
This is a requirement from the platform, as a huge amount of companion objects leads to a higher level of classloading
2024-02-23 18:55:01 +02:00
Alex Plate fec6e5c189 Remove the last argument in EventLogGroup as the compatibility was fixed on the platform side 2024-02-23 18:35:21 +02:00
Alex Plate 23c1493f17 Fix(VIM-3306): Vim paragraph motion won't make mappings if there is already such mapping defined by user 2024-02-23 18:26:50 +02:00
filipp 3c94091d30 Merge branch 'refs/heads/master' into fleet 2024-02-23 17:24:08 +02:00
filipp b737362aba Update CaretVisualAttributesListener to use new Editor API 2024-02-23 17:21:18 +02:00
Parker7123andAlex Pláte db722fc4e5 VIM-1472 Add support for sorting with pattern 2024-02-23 17:15:21 +02:00
filipp 7d679e68dc Merge branch 'refs/heads/master' into fleet
# Conflicts:
#	vim-engine/src/main/kotlin/com/maddyhome/idea/vim/api/VimEditorGroup.kt
#	vim-engine/src/main/kotlin/com/maddyhome/idea/vim/impl/state/VimStateMachineImpl.kt
2024-02-23 17:08:01 +02:00
Matt EllisandAlex Pláte bc808403fb Rename localEditors to getEditors
The fact that these methods only return local editors (i.e., editors for the local user while hosting a Code With Me session) is an implementation detail
2024-02-23 17:01:32 +02:00
Matt EllisandAlex Pláte cf29c50f31 Ensure editors are initialised before use
Fixes VIM-3256
2024-02-23 17:01:32 +02:00
Matt EllisandAlex Pláte bd192561ae Stop IdeaVim actions flowing into JB Client
IdeaVim actions are local only - they control local behaviour and should not be visible in the Client

Fixes VIM-3283
2024-02-23 15:54:20 +02:00
Matt EllisandAlex Pláte 66ff56a05e Move document listeners to global listeners
This means we listen to changes in all documents, rather than just the changes in the documents for open local editors. And this means that we correctly update e.g. marks when a non-local editor changes a file that isn't open in a local editor.
2024-02-23 15:54:20 +02:00
Matt EllisandAlex Pláte def86d179e Review disabled editor checks 2024-02-23 15:54:20 +02:00
Matt EllisandAlex Pláte 3c9a343f8b Review listeners to only work with local editors
Reviews all IntelliJ listeners to ensure that they only work with supported local editors. Editor creation was initialising IdeaVim for all editors, which meant that behaviour could leak into Code With Me guest editors. E.g. guest editors incorrectly drawing relative line numbers, or the host using the guest's last selected tab when switching to an alternate file.

This leads to a change in behaviour with some local editors. The editor creation listener will now check to see if the editor is local *and supported*. This means it can exclude single line editors, editors in database cells or dialogs, depending on the state of 'ideavimsupport' at creation time. The behaviour at creation time is now more correct, but if 'ideavimsupport' is modified, existing matching editors will not be initialised.

Fixes VIM-3274, fixes VIM-3275
2024-02-23 15:54:20 +02:00
Matt EllisandAlex Pláte 10b6b05fab Clear disposable after disposing 2024-02-23 15:54:20 +02:00
Matt EllisandAlex Pláte caa4ef736a Rename method for clarity 2024-02-23 15:54:20 +02:00
Matt EllisandAlex Pláte 23702345a9 Fix comments 2024-02-23 15:54:20 +02:00
Matt EllisandAlex Pláte ba89babd10 Move listener to app level
Fixes VIM-2167
2024-02-23 15:54:20 +02:00
Matt EllisandAlex Pláte 2ce3fbd677 Use common APIs to get local editors 2024-02-23 15:54:20 +02:00
Matt EllisandAlex Pláte d8de73a06d Use correct APIs to get local only editors
Always ignores non-local, hidden editors opened by remote guests in Code With Me sessions.

Fixes VIM-3268
2024-02-23 15:54:20 +02:00
Alex Plate 247aaed188 Use the property to change the state of the octopus handler 2024-02-23 15:32:35 +02:00
Filipp Vakhitovandfilipp 7523db186f Empty status bar message after each test 2024-02-23 15:09:45 +02:00
Filipp Vakhitovandfilipp db35c979b4 Move some editor methods to the base class 2024-02-23 15:09:45 +02:00
filipp d3704d602f Cleanup after moving logic to other classes 2024-02-23 15:09:45 +02:00
filipp 23fdadc32e Fix test
Sometimes it's not a plugin error and may indicate that key is propagated for later handling by IDE
But what we know for sure - that for both cases we should reset command builder
2024-02-23 15:09:45 +02:00
filipp 19fa00837c Use KeyProcessResultBuilder
It will help us to build the KeyProcessResult that we need for asynchronous key processing
2024-02-23 15:09:45 +02:00
filipp 15ae069f6f Make keyHandlerState argument not null
Applying default values may lead to unexpected results, especially if we sometimes want to use the global state (IJ), and at other times, its clone for asynchronous processing (Fleet).
2024-02-23 15:09:45 +02:00