1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2024-10-19 04:42:46 +02:00
Commit Graph

616 Commits

Author SHA1 Message Date
filipp
a9052a068f Fix property tests 2023-11-17 13:05:30 +02:00
dependabot[bot]
c3134b9426 Bump org.junit.jupiter:junit-jupiter-engine from 5.10.0 to 5.10.1
Bumps [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5) from 5.10.0 to 5.10.1.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.10.0...r5.10.1)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-15 17:36:01 +02:00
Alex Plate
9d20061924
Do not register VimShortcutKeyAction for esc and enter keys
This is no more needed as we have a different way of getting the key. Also, this causes a bug VIM-3169
2023-11-10 17:17:13 +02:00
Filipp Vakhitov
ddfe8cf361 Support temporary options 2023-11-10 16:01:22 +02:00
Filipp Vakhitov
93c83f773a Add generated JSON files to gitignore 2023-11-10 16:01:22 +02:00
Filipp Vakhitov
876e16fa9e Support registering commands from json 2023-11-10 16:01:21 +02:00
Filipp Vakhitov
37067d5c72 Fix typos 2023-11-10 16:01:21 +02:00
Filipp Vakhitov
fe6c1ae452 Add LazyVimCommand and CommandProvider 2023-11-10 16:01:21 +02:00
Filipp Vakhitov
30165f5047 Support keypad keys in Vim key notation 2023-11-10 16:01:21 +02:00
Filipp Vakhitov
3046c61447 Generating json by annotations 2023-11-10 16:01:21 +02:00
Filipp Vakhitov
ced50bb2e8 Mark xml related classes for commands as deprecated 2023-11-10 16:01:21 +02:00
Filipp Vakhitov
dee84bcc63 Annotate commands 2023-11-10 16:01:21 +02:00
Alex Plate
288c66d8a2
Refactor execution of vim script
Now we set the flag `executingVimscript` during execution of any vimscript and we run initialization of delayed plugins after every call for execute.

This is needed to properly initialize plugins after call for `source` command. Previously this command initialized extensions as they met in the script, what may cause incorrect behaviour. With this update, we unified an approach for executing vim script.
2023-11-03 13:27:38 +02:00
Alex Plate
44c8a97f44
Consider the case when we load .ideavimrc file from using the source command
This includes updating the "ReloadIdeaVimRc" button and setting the correct mapping owner

Previously, the `source` command loaded ~/.ideavimrc file as a regular file, thus several features didn't work properly.
This refactoring was caused by this PR: https://github.com/JetBrains/ideavim/pull/736
2023-11-03 13:27:38 +02:00
Alex Plate
60c27b1dea
Add documentation about some aspects of IdeaVim implementation 2023-11-03 13:27:38 +02:00
filipp
06ef1c1182 VIM-1639 Ctrl-o and Ctrl-i jumping in files of different projects 2023-10-26 10:23:16 +03:00
filipp
a9ba9789fd Fix(VIM-696): Vim selection issue after undo 2023-10-25 16:55:32 +03:00
Alex Plate
8c06767fdc
Show error instead of warning in case of exception 2023-10-20 11:10:55 +03:00
Alex Plate
25877e369b
Add comment saying that the ideaglobalmode option is experimental 2023-10-20 10:15:42 +03:00
Alex Plate
0271a475a2
Update docs 2023-10-20 10:15:42 +03:00
Alex Plate
26f48c5820
Fix(VIM-3095): Fix missing ellipsis digraph 2023-10-11 12:27:00 +03:00
Alex Plate
9eeeb15c6c
Enable octopus handler by default 2023-10-10 11:39:14 +03:00
Alex Plate
4731eb9db8
Bring back removed functions 2023-09-14 16:50:52 +03:00
Alex Plate
337f5ade59
Get rid of deprecated method 2023-09-14 16:31:26 +03:00
Alex Plate
fe8bbcb11a
Bring back a method to keep the compatibility 2023-09-14 16:26:14 +03:00
Alex Plate
b1b6b0bf80
Add links to the new page about modes 2023-09-14 15:44:00 +03:00
Matt Ellis
585b815472 Only notify changes if the value is different
This is primarily to avoid instantiating inactive extensions when
resetting all options back to default values, which sets extensions
inactive.
It applies to global and local options, but not to global-local. The
notifications for global-local options are already complex, as they can
be reacting to changes to both the global and local value, and only
notifying editors that are affected.
2023-09-11 11:04:09 +03:00
Matt Ellis
c37e2f4176 Update fallback window when all windows close 2023-09-11 11:04:09 +03:00
Matt Ellis
32b8d03c5e Improve modifying string and string list options 2023-09-11 11:04:09 +03:00
Matt Ellis
71f3e1b4f1 Support per-window global values
For local-to-window options
2023-09-11 11:04:09 +03:00
Matt Ellis
aa6f53fa68 Require editor when getting/setting global option 2023-09-11 11:04:09 +03:00
Matt Ellis
700198d8bc Remove test only vimscript execute method 2023-09-11 11:04:09 +03:00
Matt Ellis
3efab5928e Evaluate ideavimrc in the fallback window context 2023-09-11 11:04:09 +03:00
Matt Ellis
93037b6866 Add fallback window to capture local option state 2023-09-11 11:04:09 +03:00
Matt Ellis
0f19e50c69 Improve hierarchy of option accessors
Getting the effective IJ options would allow access to Vim global and IJ global, but not Vim effective. IntelliJ specific options are now a separate hierarchy, so the Vim effective and IJ effective accessors now simply access all Vim or all IJ options.
2023-09-11 11:04:09 +03:00
Matt Ellis
66ea6ad3d4 Rename OptionScope to OptionAccessScope 2023-09-11 11:04:09 +03:00
filipp
0c1dc51db4 Fix(VIM-3060): Clipboard interaction stopped working
Fix for Windows
2023-09-07 14:42:00 +03:00
filipp
74a710c5e8 VIM-3060 Clipboard interaction stopped working
Fixed issue and tests (for Linux)
2023-09-07 02:39:23 +03:00
Alex Plate
456055bcf0
Do not run multiple carets from ChangeEditorActionHandler and instead pass this information to EditorActionHandlerBase
This is needed for the new way we register handlers. As we can't be sure that this commands won't be called from the `runForEachCaret` context, we have to avoid this method
2023-09-01 17:25:14 +03:00
Alex Plate
4532d68743
Convert change group to kotlin 2023-09-01 14:29:51 +03:00
Alex Plate
26e9bf5197
Detect if we run the action in runForEachCaret scope or not 2023-09-01 13:25:15 +03:00
dependabot[bot]
38e1a62f19 Bump org.jetbrains.kotlinx:kotlinx-serialization-json-jvm
Bumps [org.jetbrains.kotlinx:kotlinx-serialization-json-jvm](https://github.com/Kotlin/kotlinx.serialization) from 1.5.1 to 1.6.0.
- [Release notes](https://github.com/Kotlin/kotlinx.serialization/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Kotlin/kotlinx.serialization/compare/v1.5.1...v1.6.0)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-serialization-json-jvm
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-30 18:36:38 +03:00
Alex Plate
e7a8b45c10
[VIM-3051] Refactor the way we store modes in IdeaVim
Now we have a single variable with current mode instead of stack of modes.
2023-08-25 11:38:21 +03:00
dependabot[bot]
336f1c3b80 Bump org.jetbrains.kotlinx:kotlinx-serialization-json-jvm
Bumps [org.jetbrains.kotlinx:kotlinx-serialization-json-jvm](https://github.com/Kotlin/kotlinx.serialization) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/Kotlin/kotlinx.serialization/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Kotlin/kotlinx.serialization/compare/v1.5.0...v1.5.1)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-serialization-json-jvm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-16 16:21:36 +00:00
Alex Plate
22ca74a1a3
Use a different approach for switching to visual mode. The previous way caused "recursive runForEachCaret exception" 2023-08-14 16:17:47 +03:00
Alex Plate
3093c9212c
Add note about visual type in text objects 2023-08-14 16:17:46 +03:00
dependabot[bot]
6b8a4e6e63 Bump org.junit.jupiter:junit-jupiter-engine from 5.9.2 to 5.10.0
Bumps [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5) from 5.9.2 to 5.10.0.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.9.2...r5.10.0)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-14 11:28:23 +03:00
dependabot[bot]
d256870953 Bump org.junit.jupiter:junit-jupiter-api from 5.9.2 to 5.10.0
Bumps [org.junit.jupiter:junit-jupiter-api](https://github.com/junit-team/junit5) from 5.9.2 to 5.10.0.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.9.2...r5.10.0)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-14 08:16:59 +00:00
Ludwig Valda Vasquez
068d610e3a Add grapheme cluster handling tests
GraphemeBreakTest.txt was downloaded from the Unicode Character Database [0].

Changes to build.gradle.kts were required to stop `gradlew test` from
regenerating the resources with empty JSON objects. And adding a
dependency.

[0]: https://www.unicode.org/Public/UCD/latest/ucd/auxiliary/GraphemeBreakTest.txt
2023-08-14 09:04:41 +03:00
Ludwig Valda Vasquez
41177b91be Handle unicode grapheme clusters
Some characters that render as a single symbol can span over a sequence
of several unicode code points (e.g., flag emojis, combination of a
letter and a diacritic, Hangul syllables, etc.).

Such composites are called grapheme clusters in the unicode standard,
and this patch introduces recognition of extended grapheme cluster
boundaries, allowing to iterate over rendered characters. Without this,
user may observe the cursor being "stuck" inside a character for several
keystrokes, while it's making its way through each code point in the
grapheme cluster.

The implementation follows the boundaries search algorithm outlined in
the technical report 29 of the Unicode standard[1]. The implementation was
tested against the set of test cases provided by the unicode character
database[2].

Additionally to the grapheme cluster boundaries search itself, this
patch adds `isExtendedPictographic` function, that answers whether the
given code point has a unicode "Extended_Pictographic" property, which
is required to correctly determine grapheme cluster boundaries. This
method is implemented natively in the JDK 21 and can be removed once we
start targeting that version.

Extended_Pictographic property is stored as a bitmap. I was considering
making a similar map for the code point classification in the grapheme
cluster boundary search implementation, which could yield better
performance, but that would require adding another half a megabyte (at
least) of data into the JAR and I've settled for the bunch of `if`s way.

That is something that can be reconsidered and shouldn't be difficult to
change if the impact on performance would be noticeable (in my simple
tests it didn't show).

A few functions in the vim-engine were adjusted to handle grapheme
clusters (such as getting the horizontal offset and adjusting the cursor
to not reach over the end of the line).

[1]: https://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries
[2]: https://www.unicode.org/Public/UCD/latest/ucd/auxiliary/GraphemeBreakTest.txt
2023-08-14 09:04:41 +03:00
Alex Plate
5d4996c085
Optimize imports on the project 2023-08-11 11:54:38 +03:00
filipp
1fe64e69ca Support running tests if headless 2023-08-04 19:00:47 +03:00
filipp
41df06a48b Fix failing tests second attempt
(please please)
2023-08-03 14:00:03 +03:00
filipp
4188e636f3 Fix failing tests
(please)
2023-08-03 13:39:33 +03:00
filipp
e2c0d59e3a Fix default register for unnamedplus without X 2023-08-03 11:24:29 +03:00
Alex Plate
a62cc3618c
Fix an issue with disposed caret when moving up
There was an issue that when we enter visual block, move up, then try to switch to the visual line, we get a disposed caret issue.
This was caused by the fact that we get the list of carets, then process them one by one. However, as we update the first caret, the second gets disposed.
2023-08-01 16:17:39 +03:00
Matt Ellis
d112030a8e Add explanatory comment about InsertExitModeAction 2023-08-01 12:22:26 +03:00
Matt Ellis
dd24ebf184 Rename OptionsScope.AUTO to EFFECTIVE 2023-07-31 11:28:32 +03:00
Matt Ellis
7ef2be625f Refactor parseOptionLine for readability 2023-07-31 11:28:32 +03:00
Matt Ellis
e3957d2207 Minor updates from code review 2023-07-31 11:28:32 +03:00
Matt Ellis
e1141dcd1c Remove old option listener API 2023-07-31 11:28:32 +03:00
Matt Ellis
54dc184dd0 Introduce option effective value change listener 2023-07-31 11:28:32 +03:00
Matt Ellis
1977ce3ea5 Add simple one to many collection 2023-07-31 11:28:32 +03:00
Matt Ellis
c8c9d1729e Introduce listener for global option changes 2023-07-31 11:28:32 +03:00
Matt Ellis
1c465f028e Fix option scopes for :let command 2023-07-31 11:28:32 +03:00
Matt Ellis
12824c22c4 Add :setglobal command 2023-07-31 11:28:32 +03:00
Matt Ellis
080c2059ee Format unset global-local toggle options 2023-07-31 11:28:32 +03:00
Matt Ellis
a288850010 Add support for resetting option to global value 2023-07-31 11:28:32 +03:00
Matt Ellis
16811602d2 Support global-local options 2023-07-31 11:28:32 +03:00
Matt Ellis
6d94d719e3 Only notify change if option has changed 2023-07-31 11:28:32 +03:00
Matt Ellis
749d111e89 Reset options for current editor only
Matches Vim behaviour for `:set all&`
2023-07-31 11:28:32 +03:00
Matt Ellis
365d8d34ce Introduce AUTO scope for effective option values 2023-07-31 11:28:32 +03:00
Matt Ellis
ced25bbf28 Initialise options when opening windows/buffers
Note that this temporarily changes the semantics of `:set` to always set the local option, instead of setting the global option (because we now eagerly initialise local values). Neither is correct, but we don't yet have a way to support the proper behaviour.
2023-07-31 11:28:32 +03:00
Matt Ellis
7e1ce5a203 Use Vim terminology in storage service 2023-07-31 11:28:32 +03:00
Matt Ellis
9a3fcb56a1 Support local-to-buffer options
Previously, all local options were treated as local-to-window
2023-07-31 11:28:32 +03:00
Matt Ellis
aff956f4c8 Update parsed value cache for declared scope 2023-07-31 11:28:32 +03:00
Matt Ellis
0f49fd6406 Introduce declared scope for all options 2023-07-31 11:28:32 +03:00
Filipp Vakhitov
dfbefe96da Fix(VIM-802): IdeaVim vs. Vim: discrepancies in using registers 2023-07-28 19:58:51 +03:00
filipp
a71b35097f Fix(VIM-2246): X11/Xorg Primary selection register "* not supported 2023-07-28 19:56:42 +03:00
filipp
0058f81e76 VIM-3022 Search is broken in folded regions 2023-07-27 01:03:12 +03:00
Alex Plate
78ea4e4e30
Set up publishing of the vim-engine library 2023-07-20 16:50:14 +03:00
Matt Ellis
2f5d402c61 Support :set! to output as a single column 2023-07-19 18:04:02 +03:00
Matt Ellis
8fb2ea5845 Output options in column order, not row order
This means that the last column might not be full, rather than the last row. Same as Vim.
2023-07-19 18:04:02 +03:00
Matt Ellis
a78e21a167 Use soft wraps instead of hard wraps in ex output
Hard wraps require figuring out the width of the panel, and all we have is the width of the associated editor, which excludes gutter, etc. Easier to let the UI toolkit handle it
2023-07-19 18:04:02 +03:00
Matt Ellis
2e9b626523 Fix formatting of value pair options 2023-07-19 18:04:02 +03:00
Matt Ellis
4487b8904c Sort options output before formatting
Sorts on option name, not including "no" prefix for toggle options
2023-07-19 18:04:02 +03:00
Matt Ellis
1f01f915dc Remove trailing padding from options list 2023-07-19 18:04:02 +03:00
filipp
a769a8d1a4 Fix(VIM-2818): Wrong caret position after multicaret paste 2023-07-14 16:24:36 +03:00
filipp
9e203898b6 Support more registers for secondary carets 2023-07-14 13:42:43 +03:00
Ludwig Valda Vasquez
28887c1da2 Update VimMessages#updateStatusBar to accept VimEditor
This is required for vim support in Fleet.
2023-07-07 10:57:56 +03:00
filipp
2582f1e907 Fix(VIM-1294): unvoluntary unfolding when using ideavim 2023-06-30 12:32:41 +03:00
filipp
c376feb4d8 Fix(VIM-2685): Register command outputs different values for same registers 2023-06-27 17:40:56 +03:00
filipp
1205bb67f2 VIM-2973 Multiline editing like "ciw" doesn't work well when have remappings to stop c and d from using the default register 2023-06-21 01:20:46 +03:00
filipp
10bcd20cd8 Retire obsolete commands
With all the gratefulness for 20 years of service. Thank you, pioneers of our plugin's legacy.
2023-06-20 15:59:09 +03:00
filipp
1b1680f7b0 Fix typo 2023-06-20 15:59:09 +03:00
filipp
6cc52570ac Add missing ExCommand annotations 2023-06-20 15:59:09 +03:00
filipp
6425791ed9 Attempt to avoid broken jsons after partial compilation 2023-06-20 15:59:09 +03:00
Alex Plate
0192009482
Fix(VIM-2975): Fix the offset after the rendered docs 2023-06-15 14:25:09 +03:00
Alex Plate
7b71af9e1d
Fix(VIM-2964): Fix an issue with leaking caret instance
Now I use the subscription to the disposer, but I think we can update it to the flow
2023-06-06 16:12:54 +03:00
Alex Plate
51c464f8d2
Fix out of bounds exception 2023-06-06 12:07:33 +03:00