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

5723 Commits

Author SHA1 Message Date
Alex Plate
eed102d035 Convert VimArgTextObjExtension to kotlin 2026-01-16 15:48:33 +02:00
Alex Plate
38f428dec3 Rename .java to .kt 2026-01-16 15:48:32 +02:00
Claude
381dc2684b Remove unused SkipNeovimReason.CMD
This enum value had no documentation, a vague name, and was not used
anywhere in the codebase.
2026-01-13 06:43:22 +02:00
Alex Plate
26154061f7 Add clear output when Neovim testing is enabled
Print "NEOVIM TESTING ENABLED" message when running tests with -Dnvim
flag so AI can verify Neovim testing is actually active.

Also fix skill documentation to use correct -Dnvim flag.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 14:04:43 +02:00
Alex Plate
fa2b54bc2d Deprecate SkipNeovimReason.UNCLEAR
Similar to DIFFERENT, UNCLEAR is too vague and should be replaced
with a more specific reason after investigation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 14:00:59 +02:00
Alex Plate
3c967d1f03 Fix Neovim test annotations in SearchGroupTest
- Change `test negative lookbehind regression` to use IDEAVIM_API_USED
  (test uses internal search() helper that calls VimPlugin API directly)
- Remove outdated TestWithoutNeovim annotations from 5 tests that now
  pass with Neovim: smartcase/ignorecase search tests

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 13:55:04 +02:00
Alex Plate
47215cfda1 Deprecate SkipNeovimReason.DIFFERENT in favor of more specific reasons
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 13:55:04 +02:00
Alex Plate
20f86bc0b4 Add explanations for disabled tests in MultipleCaretsTest
Document why each disabled test is disabled:
- testCopyVisualText: CopyTextCommand processes carets sequentially,
  causing document shifts that corrupt subsequent caret operations
- testPutVisualLines: Multi-caret :put with visual selection only
  processes one caret (also fixed invokeAndWait wrapper)
- testMoveText* tests: MoveTextCommand explicitly throws exception
  for multiple carets

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 13:55:04 +02:00
Matt Ellis
3cdea85df4 Move common functions to collectionFunctions
Add a new package for functions that apply to both List and Dictionary, as well as some String functions (where a String is treated like a collection of characters). Trying to group some functions that shouldn't just sit at top level
2026-01-09 19:12:27 +02:00
Matt Ellis
5adff67ec8 Add List uniq() function 2026-01-09 19:12:27 +02:00
Matt Ellis
8340be8459 Add List sort() function 2026-01-09 19:12:27 +02:00
Matt Ellis
9fbee06890 Add filter() function 2026-01-09 19:12:27 +02:00
Matt Ellis
4bf947a143 Fix comparison of String and Number 2026-01-09 19:12:27 +02:00
Matt Ellis
5225c409d8 Add List reduce() function 2026-01-09 19:12:27 +02:00
Matt Ellis
17eddab2ac Add map() and mapnew() functions 2026-01-09 19:12:27 +02:00
Matt Ellis
00fee97117 Add List indexof() function 2026-01-09 19:12:27 +02:00
Matt Ellis
fd9b283df1 Add call() function
Vim lists call() as part of List functions. We document it the same way so we can cross-reference, but it's not really a List function, so it's implemented with varFunctions
2026-01-09 19:12:27 +02:00
Matt Ellis
e6b863f1ca Add List+Dictionary foreach() function 2026-01-09 19:12:27 +02:00
Matt Ellis
ea209d5c94 Refactor function and funcref functions 2026-01-09 19:12:27 +02:00
Matt Ellis
e2adf0af51 Handle range for builtin functions 2026-01-09 19:12:27 +02:00
Matt Ellis
1333051ad8 Make range an argument instead of a field 2026-01-09 19:12:27 +02:00
Matt Ellis
bd0edb01b6 Introduce BuiltinFunctionHandler base class 2026-01-09 19:12:27 +02:00
Matt Ellis
7600d96d0a Improve handling of dictionary functions
VimFuncref is no longer mutable, since the instance can be shared between variables. A dictionary function must be invoked with a Funcref that captures the dictionary; when accessing a dictionary entry that is a function, the returned value is a newly created partial function that captures the dictionary. This helps fix some issues when printing a dictionary and/or dictionary function with `echo`, including a stack overflow.
2026-01-09 19:12:27 +02:00
Matt Ellis
5e5005f068 Rename FunctionCallExpression for clarity 2026-01-09 19:12:27 +02:00
Matt Ellis
df48c41904 Add List flattennew() function 2026-01-09 19:12:27 +02:00
Matt Ellis
95d3aad9ff Add List flatten() function 2026-01-09 19:12:27 +02:00
Matt Ellis
1afd730083 Add error handling to reverse() function 2026-01-09 19:12:27 +02:00
Matt Ellis
5d4dd891e6 Add List+Dictionary extendnew() function 2026-01-09 19:12:27 +02:00
Matt Ellis
f27cafbae3 Add List+Dictionary extend() function 2026-01-09 19:12:27 +02:00
Matt Ellis
e1ddf7780f Add List+String slice() function 2026-01-09 19:12:27 +02:00
Matt Ellis
4103291d1a Add List+Dictionary+String items() function 2026-01-09 19:12:27 +02:00
Matt Ellis
727b94e6ff Add Dictionary values() function 2026-01-09 19:12:27 +02:00
Matt Ellis
d07a154a77 Add Dictionary keys() function 2026-01-09 19:12:27 +02:00
Matt Ellis
94736d2339 Add List+Dictionary remove() function 2026-01-09 19:12:27 +02:00
Matt Ellis
dc335e5178 Add List insert() function 2026-01-09 19:12:27 +02:00
Matt Ellis
52a1774f11 Add Dictionary has_key() function 2026-01-09 19:12:27 +02:00
Matt Ellis
6f553ec3c0 Add List add() function 2026-01-09 19:12:27 +02:00
Matt Ellis
ed50fa28f5 Refactor argument handling for functions 2026-01-09 19:12:27 +02:00
Matt Ellis
0e2349baac Refactor min/max args for function handler 2026-01-09 19:12:27 +02:00
Matt Ellis
fa06644ece Move functions to more appropriate packages 2026-01-09 19:12:27 +02:00
Alex Plate
7d8655a624 Add tests for replace with register inside empty brackets
Tests for VIM-3798: replacing inside empty braces, quotes, parentheses,
and square brackets.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 17:05:42 +02:00
Alex Plate
799d450886 Update plugin description with more detailed feature information
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 16:53:04 +02:00
Alex Plate
63275de20b Add NEOVIM_RPC_SPECIAL_KEYS_INSERT_MODE reason for clearer test documentation
Replace UNCLEAR annotations with a properly documented reason explaining why backspace and other special keys fail in Neovim RPC testing. This makes the limitation clear for future developers and consolidates 8 tests under a single, well-explained reason.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-08 17:15:58 +02:00
Matt Ellis
8f7f27caec Fix high CPU usage while showing command line
Fixes repeatedly calling repaint while trying to paint the caret. This is due to a combination of the modelToView translation returning a location instead of a bounding box (the width can be zero) and a check that one rectangle contains another returning false when one rectangle has a width of zero.

Also fixes the caret not redrawing properly while flashing when first shown. This is due to the width and height not being properly initialised.
2026-01-06 10:15:56 +02:00
Alex Plate
8805ddac37 Update tests with refined skip reasons and add @VimBehaviorDiffers annotations
- Use `INTELLIJ_PLATFORM_INHERITED_DIFFERENCE` for skip reasons where IntelliJ Platform constraints lead to behavioral differences with Neovim.
- Introduce `@VimBehaviorDiffers` for reverse search test, providing a detailed description of the behavior and marking it for investigation.
2026-01-05 09:43:59 +02:00
Alex Plate
1f9528a38a Add marks verification to Neovim tests
- Implement comprehensive marks verification checking local (a-z),
  global (A-Z), numbered (0-9), and special marks (<>'^")
- Add ignoredMarks configuration to allow test-specific exclusions
- Exclude '[' and ']' (change marks) from verification due to
  VIM-4107: undo behavior differs between IdeaVim and Neovim
- Add test documenting the change marks undo behavior difference

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-04 00:19:27 +02:00
Alex Plate
db3eb3a006 Add SEE_DESCRIPTION skip reason and remove PLUG
Introduces SEE_DESCRIPTION as a catch-all SkipNeovimReason for
case-specific differences that don't fit standard categories. This
reason requires a mandatory description parameter explaining why
the test cannot be compared with Neovim.

Removes the PLUG reason and replaces its only usage in testPlugMapping
with SEE_DESCRIPTION, explaining that Neovim represents <Plug> as a
single character, causing map state comparison failures.

Updates tests-maintenance skill documentation to reflect the new reason
and its usage guidelines.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-03 23:45:22 +02:00
Alex Plate
21d72b150f Use INTELLIJ_PLATFORM_INHERITED_DIFFERENCE for testAllLinesRange
The test verifies behavior where deleting all lines results in an empty
buffer in IdeaVim, while Neovim always maintains at least one newline
character. This difference is inherited from the IntelliJ Platform's
editor implementation, which allows completely empty editors.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-03 23:31:53 +02:00
Alex Plate
46b4e1f600 Clarify description in @TestWithoutNeovim annotation to specify deleted line range 2026-01-03 23:30:50 +02:00
Alex Plate
e2c86e9eda Add INTELLIJ_PLATFORM_INHERITED_DIFFERENCE skip reason for Neovim tests
This skip reason is for cases where IdeaVim behavior differs from Neovim due
to constraints or design decisions inherited from the IntelliJ Platform.

Examples include:
- Empty buffer handling: Platform editors can be empty while Neovim buffers
  always contain at least one newline character
- Position/offset calculations for newline characters
- Line/column indexing differences

The description parameter is mandatory and must explain what Platform behavior
causes the difference and how it manifests in the test.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-03 23:30:18 +02:00