1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2026-05-04 11:03:08 +02:00
Commit Graph

9697 Commits

Author SHA1 Message Date
Alex Plate
de2daf6ee5 Use normalized ranges for selection API
- Range.Simple and Range.Block now always have start <= end
- Document that ranges are normalized with exclusive end semantics
- Normalize Range.Block by using min/max on vimSelectionStart and offset
- Add tests verifying ranges are normalized regardless of selection direction

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 15:24:58 +02:00
Alex Plate
b671a52480 Add link to Architecture Decision Records in CONTRIBUTING.md
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 15:24:58 +02:00
Alex Plate
f3de0d647d Refactor Range.Block API to use start/end offsets instead of array
Change Range.Block from storing an array of per-line ranges to using
simple start/end offsets, matching how block selection is stored
internally in VimBlockSelection. The conversion to per-line ranges
now happens internally in CaretTransactionImpl.

Changes:
- Range.Block now uses (start: Int, end: Int) like Range.Simple
- Add replaceTextBlockwise(Range.Block, String) overload for single text
- Update CaretReadImpl to return block start/end from primary caret
- Add blockToLineRanges() helper in CaretTransactionImpl
- Update ReplaceWithRegisterNewApi to use simplified API
- Add 17 new tests for block selection and replacement

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 15:24:57 +02:00
claude[bot]
b522f39358 Maintenance: ExitCommandTest - Expand test coverage for all command variants
Added comprehensive test coverage for all ExitCommand variants that were
previously untested. The ExitCommand implementation supports multiple
command aliases (qa/qall, xa/xall, wqa/wqall, quita/quitall), but the
test suite only covered qa and qall.

Changes:
- Added tests for xa and xall commands (exit all, with save)
- Added tests for wqa and wqall commands (write quit all)
- Added tests for quita and quitall commands (alternative quit all spelling)
- Added assertPluginError(false) checks to all tests to ensure commands
  execute without errors, following the pattern used in similar test files

This ensures all command variants are properly tested and prevents
regressions in any of the exit command aliases.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-12 12:40:57 +02:00
claude[bot]
a81fb7068b Fix typo in comment: change "e.q." to "e.g."
Changed incorrect abbreviation "e.q." to the correct "e.g." (exempli gratia)
in a comment explaining change command behavior in MotionWordEndAction.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-12 12:28:34 +02:00
Alex Plate
eb98fd3e01 Pass youtrackToken gradle property as YOUTRACK_TOKEN env variable
Add environment("YOUTRACK_TOKEN", youtrackToken) to JavaExec tasks
that use YouTrack API: releaseActions, eapReleaseActions,
updateYoutrackOnCommit, integrationsTest, and updateChangelog.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 12:58:33 +02:00
Alex Plate
3f5bbf4985 Update Kotlin version 2025-12-09 12:11:18 +02:00
Alex Plate
dbf26846ee Update the platform to 2025.3
Also, replace all IC dependencies on IU dependencies. The IC is deprecated since the unified release: https://blog.jetbrains.com/platform/2025/11/intellij-platform-2025-3-what-plugin-developers-should-know/
2025-12-09 10:00:58 +02:00
Alex Plate
8ee28a3f10 Update the minimal supported intellij platform version to 253 2025-12-03 12:03:00 +02:00
Alex Plate
655ba89561 Add mode-specific mapPluginAction extension functions
Add extension functions for creating plugin mappings in specific modes:
- nmapPluginAction: normal mode
- vmapPluginAction: visual and select modes
- xmapPluginAction: visual mode
- smapPluginAction: select mode
- omapPluginAction: operator-pending mode
- imapPluginAction: insert mode
- cmapPluginAction: command-line mode

Each function checks if a mapping already exists for that specific mode
before adding, allowing users to override default mappings per-mode.

Also update mapPluginAction to check each mode individually instead of
using the generic hasmapto check.
2025-11-28 18:39:00 +02:00
Alex Plate
ef91434a7b Fix vmap to apply to both visual and select modes
- Update MappingScope documentation: v* functions now correctly
  documented as "visual and select modes", x* functions as "visual mode"
- Fix MappingScopeImpl: vmap, vnoremap, vunmap, vhasmapto now operate
  on both MappingMode.VISUAL and MappingMode.SELECT
2025-11-28 18:38:52 +02:00
Alex Plate
c6bb7963ab Prevent duplicate author entries by filtering GitHub URLs in update script. 2025-11-28 15:45:41 +02:00
Alex Plate
7a1cbe5361 Remove bot contributors and simplify bot email filtering 2025-11-28 15:43:46 +02:00
claude[bot]
fdc75f983d Fix code style: Add space after colon in class declaration
Fixed missing space after colon in CommandLineReadImpl class declaration
to comply with Kotlin coding conventions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 15:35:44 +02:00
dependabot[bot]
c3d2d54557 Bump org.jetbrains.changelog from 2.4.0 to 2.5.0
Bumps org.jetbrains.changelog from 2.4.0 to 2.5.0.

---
updated-dependencies:
- dependency-name: org.jetbrains.changelog
  dependency-version: 2.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-26 17:19:37 +02:00
dependabot[bot]
83df0f5196 Bump io.ktor:ktor-serialization-kotlinx-json from 3.3.2 to 3.3.3
Bumps [io.ktor:ktor-serialization-kotlinx-json](https://github.com/ktorio/ktor) from 3.3.2 to 3.3.3.
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/commits)

---
updated-dependencies:
- dependency-name: io.ktor:ktor-serialization-kotlinx-json
  dependency-version: 3.3.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-26 17:19:19 +02:00
dependabot[bot]
3d7f37b61c Bump com.google.devtools.ksp:symbol-processing-api from 2.3.2 to 2.3.3
Bumps [com.google.devtools.ksp:symbol-processing-api](https://github.com/google/ksp) from 2.3.2 to 2.3.3.
- [Release notes](https://github.com/google/ksp/releases)
- [Commits](https://github.com/google/ksp/compare/2.3.2...2.3.3)

---
updated-dependencies:
- dependency-name: com.google.devtools.ksp:symbol-processing-api
  dependency-version: 2.3.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-26 17:19:03 +02:00
dependabot[bot]
4d0b35851d Bump org.jetbrains.intellij.platform from 2.10.4 to 2.10.5
Bumps org.jetbrains.intellij.platform from 2.10.4 to 2.10.5.

---
updated-dependencies:
- dependency-name: org.jetbrains.intellij.platform
  dependency-version: 2.10.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-26 17:18:48 +02:00
IdeaVim Bot
816a82911d Add github-actions[bot] to contributors list 2025-11-22 09:02:07 +00:00
Alex Plate
89c0d232f0 Update the tests for the 253 version 2025-11-22 00:58:27 +02:00
Alex Plate
559ca472ed Fix the tests for the 253 version 2025-11-22 00:43:08 +02:00
Alex Plate
35df913746 Remove the wrong test 2025-11-22 00:16:15 +02:00
Alex Plate
938e4acb22 Fix(VIM-4072): Do not log error when the source file doesn't exist
This is a normal situation, we can just show a warning in the log.
2025-11-22 00:16:15 +02:00
Matt Ellis
33adcd3f04 Add deepcopy() function 2025-11-22 00:09:32 +02:00
Matt Ellis
aa346a3dfa Add copy() function 2025-11-22 00:09:32 +02:00
Matt Ellis
ec13dd398b Ensure functions handle recursion and equality
Specifically, index() and count(). Moves the implementation of equality from EqualToHandler to VimDataType and friends
2025-11-22 00:09:32 +02:00
Matt Ellis
8b61d33c2c Improve not equal to operator support
List, Dictionary, Funcref and recursion
2025-11-22 00:09:32 +02:00
Matt Ellis
f062ceb898 Support equal to operator for Funcref 2025-11-22 00:09:32 +02:00
Matt Ellis
89115bdfb2 Support equal to operator for Dictionary 2025-11-22 00:09:32 +02:00
Matt Ellis
4baf80130f Support equal to operator for Lists 2025-11-22 00:09:32 +02:00
Matt Ellis
cede08b536 Support string output for recursive datatypes 2025-11-22 00:09:32 +02:00
Matt Ellis
1b7b1cb8ed Remove value semantics from VimList and Dictionary
Also VimFuncref. This is required to protect against unbounded recursion in generated equals and hashCode functions when the list or dictionary contains internally recursive references
2025-11-22 00:09:32 +02:00
Matt Ellis
28ec2ed694 Add comments and tests for Vim data types
Some tests are disabled, will implement next
2025-11-22 00:09:32 +02:00
Matt Ellis
c1c18c44ae Fix review comments for is operator 2025-11-22 00:09:32 +02:00
Alex Plate
378ae22863 Fix expansion of env variables for the options
Relates to VIM-2143
2025-11-21 23:48:43 +02:00
Alex Plate
5bb4a69d88 Fix(VIM-2143): Add env variables expansion for the source command 2025-11-21 23:48:42 +02:00
Alex Plate
c1ccb5cfc2 Clarify testing recommendations in CLAUDE.md. 2025-11-21 23:48:42 +02:00
Alex Plate
2a56f50767 Fix(VIM-4073): Fix off-by-one error in inline element position check 2025-11-21 23:48:42 +02:00
Alex Plate
37f5821ad1 Clarify commit splitting guidelines in maintenance instructions. 2025-11-21 23:48:42 +02:00
claude[bot]
25a62d4ade Maintenance: IndexFunctionTest - Add comprehensive edge case tests
Add tests for previously uncovered edge cases in the index() function:
- Start index beyond list size
- Start index at list size boundary
- Negative start beyond list size
- Nested list comparisons
- Float value comparisons
- Float vs int type distinction
- ignoreCase parameter with non-string types

These tests ensure the implementation correctly handles boundary
conditions and type distinctions, improving test coverage and
preventing regressions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 15:34:19 +02:00
claude[bot]
7a0ba81a89 Maintenance: List functions - Remove redundant type conversions
Remove redundant `.toVimString()` conversions in `compareValues()` methods
of IndexFunctionHandler and CountFunctionHandler. When we already know
`expr is VimString` from the type check, calling `.toVimString()` again
is unnecessary.

This improves code clarity and removes a redundant method call.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 15:34:19 +02:00
claude[bot]
50d0422b10 Fix tab selection after :tabclose command
The removeTabAt method was incorrectly passing indexToDelete twice
instead of using the indexToSelect parameter. This caused the wrong
tab to be selected after closing a tab.

The TabCloseCommand calculates which tab should be selected after
deletion (either index + 1 if closing current tab, or keep current
selection), but this information was being ignored.

This fix ensures the correct tab is selected after :tabclose, matching
expected Vim behavior.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 15:32:47 +02:00
claude[bot]
595eae9476 Add test for DeleteToCaretAction edge case
Add test case for when caret is at the beginning of the command line
to ensure the action correctly handles this edge case without side effects.
This matches test coverage patterns in similar actions like
DeletePreviousWordActionTest and DeletePreviousCharActionTest.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 15:26:53 +02:00
claude[bot]
c3616babe4 Add edge case guard to DeleteToCaretAction
Add early return when caret is at position 0 to match the pattern used by
similar command line delete actions (DeletePreviousWordAction,
DeletePreviousCharAction). This makes the intent clearer and avoids
unnecessary calls to deleteText with length 0.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 15:26:53 +02:00
claude[bot]
c0922fcee7 Fix logic bug in CommandAlias.Ex.getCommand()
The condition was checking `maximumNumberOfArguments` twice instead of
checking both `minimumNumberOfArguments` and `maximumNumberOfArguments`.
This prevented the early return optimization from working correctly for
aliases with zero required and zero maximum arguments.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 15:25:14 +02:00
Alex Plate
b01040fb44 Create a function for warn log with an exception 2025-11-21 15:16:25 +02:00
Alex Plate
a497270186 Fix an issue with function dict
This was originally found in https://github.com/JetBrains/ideavim/pull/1359
2025-11-21 15:16:03 +02:00
NaMinhyeok
e8db799ca2 Prevent entering insert mode in read-only files
Add writability check in initInsert() to prevent insert mode entry for read-only files. Shows dialog for temporarily read-only files(e.g., ~/ideavimrc) or blocks entry for non-writable files

Signed-off-by: NaMinhyeok <nmh9097@gmail.com>
2025-11-21 11:59:37 +02:00
NaMinhyeok
034f968e98 revert CommandBuilder usage
Signed-off-by: NaMinhyeok <nmh9097@gmail.com>
2025-11-21 11:59:37 +02:00
NaMinhyeok
2aec8858ba Refactor insert mode handling to check writability for new and repeat operations
Signed-off-by: NaMinhyeok <nmh9097@gmail.com>
2025-11-21 11:59:37 +02:00