Commit Graph
100 Commits
Author SHA1 Message Date
filippandAlex Pláte 0dd63c7b57 Fix nullable editor in tests 2024-11-22 17:15:07 +02:00
filippandAlex Pláte 94d7902ef2 Remove more deprecated methods 2024-11-22 17:15:07 +02:00
filippandAlex Pláte 3d08170d54 Post-rebase fixes 2024-11-22 17:15:07 +02:00
filippandAlex Pláte cccb23d9ee Specify which commands perform mode change
We need this for undo subsystem. Mode change is not something that we want to be a separate entity in the undo log

P.S. It's not a full list of such commands, e.g. <ESC> for leaving insert mode is missing. It is because <ESC> may insert some text after visual block mode, I'll figure out a solution for this later
2024-11-22 17:15:07 +02:00
filippandAlex Pláte 43d770ff5a Simplify getTransferableData method signature 2024-11-22 17:15:07 +02:00
filippandAlex Pláte 9bbeab8062 VIM-2074 Backspace behaviour is incorrect in Replace mode 2024-08-23 14:22:48 +03:00
filippandAlex Pláte 373bfc4eab Add endOffset to LiveRange 2024-08-23 14:22:48 +03:00
filippandAlex Pláte 050f2f7b97 Respect emojis and don't assume that every character is a single offset 2024-08-23 14:18:03 +03:00
filippandAlex Pláte 883744e4ee Move blockInsert to vim-engine 2024-07-26 17:30:08 +03:00
filippandAlex Pláte 66173e03be Move reformatCodeRange to vim-engine 2024-07-26 17:30:08 +03:00
filippandAlex Pláte e455722758 Move more methods to vim-engine 2024-07-26 17:30:08 +03:00
filippandAlex Pláte 823bdc1561 Replace VimYankGroup with implementation that works with VimListenersNotifier 2024-07-26 17:30:08 +03:00
filippandAlex Pláte f91fda2ca5 Remove VimInsertListener
It can be replaced by ModeChangeListener
2024-07-26 17:30:08 +03:00
filippandAlex Pláte 92abd76615 Move more methods to engine 2024-07-26 17:30:08 +03:00
filippandAlex Pláte 57c45ca153 Move more methods to engine 2024-07-26 17:30:08 +03:00
filippandAlex Pláte 7c623ae4b5 Move case change methods to engine 2024-07-26 17:30:08 +03:00
filippandAlex Pláte f2ef92cdef Remove unused method 2024-07-26 17:30:08 +03:00
filipp 7e28deb328 Better logic
In case that user will unsubscribe via setting UI and won't call IdeaVim's action
2024-07-19 16:29:15 +03:00
filipp f3767b53b7 Subscribe IDE EAP users to IdeaVim EAP 2024-07-19 16:12:33 +03:00
filippandlippfi c0419d6018 Fix project leak 2024-07-08 13:09:08 +03:00
filippandlippfi ea98e50f65 Sometimes safety is a bad thing 2024-07-08 13:09:08 +03:00
filippandlippfi 168174e383 Add missing resetOpPending to KeyHandler.reset 2024-07-08 13:09:08 +03:00
filippandlippfi 53cd4e1b88 Remove KeyHandlerStateResetter
It's an oneliner that we can live without
2024-07-08 13:09:08 +03:00
filippandlippfi 27e3561bb8 Safer VimListenersNotifier 2024-07-08 13:09:08 +03:00
filippandlippfi 9bb9cb13e3 Fix possible bug in the ExOutputModel.show() method and add documentation 2024-07-08 13:09:08 +03:00
filippandlippfi 16455f7241 Remove the update() method from VimOutputPanel 2024-07-08 13:09:08 +03:00
filippandlippfi 82225aa519 Use new interface instead of the old one 2024-07-08 13:09:08 +03:00
filippandlippfi 8a1e3eb066 Move toggleInsertOverwrite() to VimEditor
If we execute it from VimStateMachine directly, then mode change listeners are not notified
2024-07-08 13:09:08 +03:00
filipp 8de2b8976b Avoid using deprecated RegExp in VimRegexService 2024-06-28 16:58:13 +03:00
filipp a6aa26b5d9 Remove deprecated methods 2024-06-28 16:58:13 +03:00
filipp 2505651c68 Deprecate methods in VimStateMachine that duplicate KeyHandler functionality 2024-06-28 16:58:13 +03:00
filipp e67c7b23ff Remove deprecated code from VimStateMachine 2024-06-28 16:58:13 +03:00
filipp 453cca3b0c Remove resetState() from editor
It mostly resets KeyHandler, so it's more a KeyHandler responsibility. It also utilises deprecated API.
2024-06-28 16:58:13 +03:00
filipp 6cee04a4be Remove old compatibility layers
It is necessary to remove deprecated code from VimStateMachine in future commits
2024-06-28 16:58:13 +03:00
filipp ae8b9b4773 Mark isOperatorPending as deprecated
It calls the same method in KeyHandler. We do not need it in VimStateMachine
2024-06-28 16:58:12 +03:00
filipp 7e56331e47 Fix failing test 2024-06-28 15:47:19 +03:00
filippandAlex Pláte 4255ef68a3 Post review improvements
Add explanatory comment
2024-06-28 13:55:06 +03:00
filipp cf41a3a76c Fix(VIM-3507): Mapping exits early on double backslash 2024-06-28 13:46:06 +03:00
filipp 948520f90a Fix(VIM-3485): Stay in the same split when using (Back) or (Forward) 2024-06-21 17:44:44 +03:00
filippandAlex Pláte cb40426976 Fix(FL-25338): Vim plugin stopped working in 1.31.107 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
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 0914cda7e5 Better matching for a sequence of single-line comments 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 06e1af371e Add SearchGroup.kt
In the future, it should become a container for all the search methods that we have in IdeaVim
At the moment we have a bunch of SearchGroups and SearchHelpers, and it may be confusing.
We also want to avoid using unnecessary OOP.
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 b4eef17aaa Add StringUtil.kt class
Methods in this file will be helpful in future search refactorings
2024-03-03 22:03:58 +02:00
filipp 5c50e8607c Fix search 2024-03-01 08:50:18 +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
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
filipp 4aac113522 Remove duplicate method 2024-02-23 15:09:45 +02:00
filipp 795abd77a7 Add documentation 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 ea62f227bf Remove piece of code for handling bad commands
Bad commands are handled in consumers
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 e9bf06686f Add synchronize blocks to minimize risk of concurrent key processing and changing of the KeyHandlerState 2024-02-23 15:09:45 +02:00
filipp 7842b155c1 Move some logic to ModeInputConsumer 2024-02-23 15:09:45 +02:00
filipp 74a8277e10 Move some logic to SelectRegisterConsumer 2024-02-23 15:09:45 +02:00
filipp ddb1b80463 Move some logic to CommandConsumer 2024-02-23 15:09:45 +02:00
filipp eea3336934 Move some logic to CommandConsumer 2024-02-23 15:09:45 +02:00
filipp f801145712 Update MappingInfo to match newer signature 2024-02-23 15:09:45 +02:00
filipp e033b08535 Move some logic to DigraphConsumer 2024-02-23 15:09:45 +02:00
filipp 1d9514a205 Move some logic to RegisterConsumer 2024-02-23 15:09:45 +02:00
filipp 6741120f19 Move some logic to CharArgumentConsumer 2024-02-23 15:09:45 +02:00
filipp c501457322 Move some logic to EditorResetConsumer 2024-02-23 15:09:45 +02:00
filipp 46425a24c3 Move some logic to DeleteCommandConsumer 2024-02-23 15:09:45 +02:00
filipp 9826f0a7f0 Move some logic to CommandCountConsumer 2024-02-23 15:09:45 +02:00
filipp 43175061e0 Fix broken digraphSequence
It shouldn't be retested on partial reset
2024-02-23 15:09:45 +02:00
filipp 0ab32cac34 Make MappingProcessor a KeyConsumer 2024-02-23 15:09:45 +02:00
filipp e3ec9c614b Add KeyConsumer
It will help us to have a more modular KeyHandler in future (chain of different consumers)
2024-02-23 15:09:45 +02:00
filipp f454d60234 Add MutableBoolean to be able to pass and modify shouldRecord in methods 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 275c5d28e1 Add KeyProcessResultBuilder 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
filipp 7966a6dc91 Create KeyHandlerState
We do not need multiple commandBuilder, digraphSequence or mappingState and this class will be a singleton containing them
2024-02-23 15:09:45 +02:00
filipp 5fc2f04224 Remove mappingMode from MappingState
It unnecessarily binds mappingState to mode and thus to editor. And we want to simplify things and have a single MappingState instead of multiple of them
2024-02-23 15:09:45 +02:00
filipp 6edfd8ed22 Remove deprecated showmode status bar text update that does not work with the new UI and will be replaced with widget 2024-02-23 15:09:45 +02:00
filipp 363db05db7 Macro recording state is no longer per editor
It will not only simplify VimStateMachine, but also help us to support multi-editor macros in future
2024-02-23 15:09:45 +02:00
filipp 3738012dd6 Listeners refactoring
1. Listeners now disposed after turning plugin off
2. Change widget listeners to be recreated on plugin toggle
3. Add CaretVisualAttributesListener
2024-02-23 15:09:45 +02:00
filipp 355cfe035d Remove Editor from VimStateMachine
Rationale:
1. A much more experienced developer, whom I highly respect, suggested to empty VimStateMachineImpl constructor in his TODO comment.
2. I aim for VimStateMachine to be a data class rather than being a container for both data and complex logic.
3. From an architectural perspective, it is more correct. Editors do have state (or they may possess a single global state if the corresponding option is set), but a state does not own an editor.
2024-02-23 15:09:44 +02:00
filipp 7769985439 Merge remote-tracking branch 'origin/master' 2024-01-28 13:37:58 +02:00
filipp 0137de5ca2 Add Term widget theme 2024-01-26 15:52:07 +02:00
filipp f8f046f193 Fix plugin.xml 2024-01-26 14:00:07 +02:00
filipp 6c9ad4ded2 Remove deprecated xml-related code 2024-01-26 13:45:46 +02:00
filipp 32cae8ca11 Remove more deprecated things 2024-01-26 13:05:48 +02:00
filipp 0cb65279d9 Remove deprecated mark-related methods 2024-01-26 13:02:23 +02:00
filipp 412da06554 Remove deprecated ToggleOption.kt 2024-01-26 12:47:06 +02:00
filipp 247f8a2778 Remove deprecated OptionsManager.kt 2024-01-26 12:45:46 +02:00
filipp 017c9a6a70 Remove deprecated OptionService.kt 2024-01-26 12:43:06 +02:00
filipp eccb2430b5 Remove deprecated MarkGroup.java 2024-01-26 12:39:30 +02:00
filipp 5c64ebf1cc Remove deprecated VimScriptGlobalEnvironment.java 2024-01-26 12:38:28 +02:00
filipp 1d7796805c Fix(VIM-3183): Execute .ideavimrc on pooled thread 2024-01-26 12:27:03 +02:00
filipp 280e1ec16d Fix updating widget for cases when statusbar is not initialized 2024-01-17 11:15:54 +02:00
filipp 4dc7982baa (EA-480768) Better exception message 2022-06-27 16:19:45 +06:00
filipp 38292e97af Fix context for function argument evaluation 2022-06-24 03:13:07 +06:00