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

9716 Commits

Author SHA1 Message Date
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
NaMinhyeok
7efd050065 Enhance InsertExitModeAction to handle read-only files gracefully and ensure ESC functionality
Signed-off-by: NaMinhyeok <nmh9097@gmail.com>
2025-11-21 11:59:37 +02:00
NaMinhyeok
1b10943c6b Prevent entering insert mode in read-only files
Signed-off-by: NaMinhyeok <nmh9097@gmail.com>
2025-11-21 11:59:37 +02:00
dependabot[bot]
df52c7a6f5 Bump org.jetbrains.intellij.platform from 2.10.2 to 2.10.4
Bumps org.jetbrains.intellij.platform from 2.10.2 to 2.10.4.

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

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

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-12 17:19:15 +02:00
IdeaVim Bot
a3707d232c Add github-actions[bot] to contributors list 2025-11-08 09:02:09 +00:00
Alex Plate
58aa01113a Bring back a missing property 2025-11-07 17:48:02 +02:00
claude[bot]
16eb382dfa Maintenance: Statistics - Fix thread safety issues
Fix potential ConcurrentModificationException in statistics collection by using thread-safe collections.

Issues found:
- VimscriptState.Util and PluginState.Util used non-thread-safe HashSets
- Collections were modified from EDT/user actions but read from getMetrics()
- IntelliJ's ApplicationUsagesCollector.getMetrics() may be called on background threads
- Race conditions could cause ConcurrentModificationException or data corruption

Changes:
- Replace HashSet with ConcurrentHashMap.newKeySet() for thread-safe add/read operations
- Add @Volatile annotations to boolean flags to ensure visibility across threads
- This ensures safe concurrent access between statistics writers and collectors

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 16:36:30 +02:00
Alex Plate
66402f499d Restrict claude-review workflow to PRs from the same repository 2025-11-07 16:34:14 +02:00
Matt Ellis
bcb76421b2 Implement let unpack 2025-11-07 16:31:24 +02:00
Matt Ellis
592ff5f774 Rearrange bits of grammar in alphabetical order
No changes!
2025-11-07 16:31:24 +02:00
Alex Plate
a4b370bb55 Remove Junie for now 2025-11-07 16:25:00 +02:00
Matt Ellis
6f3ed33f6e Add support for getting env var expressions
The JVM doesn't provide a way to set
2025-11-07 16:15:39 +02:00
Matt Ellis
e135392d8b Implement bitwise shift expressions 2025-11-07 15:56:39 +02:00
Matt Ellis
4c9951dde6 Rename the binary expression parser rules 2025-11-07 15:56:39 +02:00
Matt Ellis
7e7a08a718 Implement parsing function call through funcref
This breaks a specific construct: `echo(42)(999)`. The `echo` command can parse multiple expressions without separating whitespace. IdeaVim now treats this example as a function call of the resul of the `(42)` expression, which is, of course, invalid. Vim evaluates expressions as it is parsing and declines to apply the `(999)` subscript because it knows the first expression is not a funcref/partial.

IdeaVim does not have this context, so cannot know that this is two expressions and not a function call.

I think it is better to support the `expr10(expr1, ...)` syntax and break this (what feels like niche) functionality than not have function calls through expression results at all.
2025-11-07 15:56:39 +02:00
Matt Ellis
5dde53c4d5 Reorder rules to reflect Vim's precedence
The only change to the rules themselves is to add unary plus/minus to IntExpression and FloatExpression. This matches Vim's precedence, where the unary operator applies to numeric constants at a higher precedence than to other expressions. E.g. `-4->abs()` invokes `abs` on `-4`, while `-a->abs()` is the negative value of `abs(a)`.
2025-11-07 15:56:39 +02:00
Matt Ellis
f83e982730 Fix associativity of ternary and falsy operators
Fixes VIM-3835
2025-11-07 15:56:39 +02:00
Matt Ellis
115937f642 Consolidate unary expressions 2025-11-07 15:56:39 +02:00
Matt Ellis
3278b5e8cf Add tests for expression precedence 2025-11-07 15:56:39 +02:00
Matt Ellis
5d96a682f6 Fix test base classes 2025-11-07 15:56:39 +02:00
Matt Ellis
63cbb5b736 Fix use of is operator as variable name 2025-11-07 15:56:39 +02:00
Matt Ellis
fc6f2905be Fix is and isnot operators
The parser was treating `is` and `isnot` as identifiers instead of operators
2025-11-07 15:56:39 +02:00
claude[bot]
dec2a89643 Remove dead code from VimStateMachineImpl
The companion function `modeToMappingMode` was not used anywhere in the codebase.
The extension function `toMappingMode()` serves the same purpose and is used throughout.
Also removed unused import and extra blank line for cleaner code formatting.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 15:14:35 +02:00
claude[bot]
3f2b716e72 Remove unused VimEditorGroupBase class
VimEditorGroupBase has been unused since its creation in April 2022. Unlike other
*Base classes in the api package (VimApplicationBase, VimMessagesBase, etc.),
VimEditorGroupBase is never extended. The actual EditorGroup implementation
directly implements the VimEditorGroup interface instead of extending this base class.

This removal cleans up dead code and reduces maintenance overhead.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 15:12:26 +02:00
Alex Plate
a1032c55c0 Adjust codebase maintenance cron schedule to run weekly 2025-11-07 15:11:01 +02:00
dependabot[bot]
e98ad5aff3 Bump org.junit.jupiter:junit-jupiter from 6.0.0 to 6.0.1
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit-framework) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r6.0.0...r6.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-05 17:38:16 +02:00
dependabot[bot]
b76c242af5 Bump com.squareup.okhttp3:okhttp from 5.0.0 to 5.3.0
Bumps [com.squareup.okhttp3:okhttp](https://github.com/square/okhttp) from 5.0.0 to 5.3.0.
- [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/okhttp/compare/parent-5.0.0...parent-5.3.0)

---
updated-dependencies:
- dependency-name: com.squareup.okhttp3:okhttp
  dependency-version: 5.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-05 17:19:51 +02:00
dependabot[bot]
86cc1259ad Bump io.ktor:ktor-serialization-kotlinx-json from 3.3.1 to 3.3.2
Bumps [io.ktor:ktor-serialization-kotlinx-json](https://github.com/ktorio/ktor) from 3.3.1 to 3.3.2.
- [Release notes](https://github.com/ktorio/ktor/releases)
- [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ktorio/ktor/compare/3.3.1...3.3.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-05 17:19:36 +02:00
dependabot[bot]
9dc3c341bd Bump org.junit.vintage:junit-vintage-engine from 6.0.0 to 6.0.1
Bumps [org.junit.vintage:junit-vintage-engine](https://github.com/junit-team/junit-framework) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r6.0.0...r6.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-05 17:19:14 +02:00
dependabot[bot]
7e27c1eb92 Bump org.junit:junit-bom from 6.0.0 to 6.0.1
Bumps [org.junit:junit-bom](https://github.com/junit-team/junit-framework) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r6.0.0...r6.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-05 17:18:32 +02:00
dependabot[bot]
3024c21f86 Bump org.jetbrains.kotlin:kotlin-stdlib from 2.2.20 to 2.2.21
Bumps [org.jetbrains.kotlin:kotlin-stdlib](https://github.com/JetBrains/kotlin) from 2.2.20 to 2.2.21.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v2.2.20...v2.2.21)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib
  dependency-version: 2.2.21
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-01 02:34:14 +02:00