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

1961 Commits

Author SHA1 Message Date
Matt Ellis
1f4e8f110e Fix missing parameter for resource 2026-01-09 19:12:27 +02:00
Matt Ellis
5e74cfdad7 Rename file 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
3e23903d95 Rename file 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
12ab94452b Update error message for min and max functions 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
a476583ea3 Fix(VIM-4108): Use default ANTLR output directory for Gradle 9+ compatibility
ANTLR generated files were being included twice in sourcesJar, causing
duplicate entry errors in Gradle 9+. Removed custom outputDirectory to
use the default build/generated-src/antlr/main/ location, following
Gradle best practices.

- Remove custom outputDirectory from generateGrammarSource task
- Update .gitignore (remove obsolete src/main/java generated paths)

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-05 18:14:19 +02:00
Alex Plate
5c0ca43cf0 Refactor: Replace FLAG_TEXT_BLOCK with preserveSelectionAnchor property
Replace the FLAG_TEXT_BLOCK command flag with a more descriptive
`preserveSelectionAnchor` property in TextObjectActionHandler.

This property controls what happens when the selection anchor is outside
the target text object range in visual mode:
- true (default): extends selection from current anchor
- false: jumps to select only the text object

Commands like iw/aw preserve anchor (extend), while structural text
objects like i(/a(, i"/a", is/as reset anchor (jump).

Also adds comprehensive documentation with examples to both the
internal handler and the public API.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 16:28:22 +02:00
Alex Plate
3852b0b737 Fix(VIM-4105): a" a' a` text objects now include surrounding whitespace
Per Vim docs: "Any trailing white space is included, unless there is
none, then leading white space is included."

Previously IdeaVim only selected the quotes and content without any
surrounding whitespace.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 15:38:47 +02:00
Alex Plate
850c2272b7 Add optional lambda and return scope for chaining in VimApi
Make lambda parameters optional and return scope objects in:
- mappings(), textObjects(), outputPanel(), commandLine(), digraph()

This enables both lambda style and chained style usage:
- Lambda: mappings { nmap("jk", "<Esc>") }
- Chained: mappings().nmap("jk", "<Esc>")

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 11:11:18 +02:00
Alex Plate
76bd4387ac Add text object registration API to VimApi
Introduce TextObjectScope for registering custom text objects via the
plugin API. Text objects can be used with operators (d, c, y) or in
visual mode.

- Add TextObjectScope interface with register() method
- Add TextObjectRange sealed interface (CharacterWise/LineWise)
- Implement TextObjectScopeImpl using IdeaVim's internal mechanisms
- Migrate VimTextObjEntireExtension from Java to Kotlin using new API
- Add textObjects() function to VimApi

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 10:59:07 +02:00
Alex Plate
b11f8a1895 Fix(VIM-4094): UninitializedPropertyAccessException in VimHistoryBase
Use lazy initialization for logger to avoid accessing injector during
static class initialization when the service is loaded.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-19 13:17:18 +01:00
Alex Plate
2a919ecc4f Simplify updateCaret to Vim-like behavior
Remove selection parameter from updateCaret - selection now extends
automatically if present, matching Vim's native cursor movement behavior.

- Remove selection: Range.Simple? parameter from updateCaret
- Add mode-aware range validation ([0, fileSize) vs [0, fileSize])
- Remove selection-related tests that are no longer applicable

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 19:18:22 +02:00
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
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]
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
3f5bbf4985 Update Kotlin version 2025-12-09 12:11:18 +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
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
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
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]
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