Commit Graph
1951 Commits
Author SHA1 Message Date
Alex Plate 492bd62166 Rename VimScope to VimApi and move it into a different package
`VimApi` would be a better entry point name. Also, the API term is clearer than the scope.
2025-08-08 12:44:30 +03:00
Alex Plate a0c213b90d Refactor Mode in API to be a simple enum
The current representation of Mode with `returnTo` is quite complicated and we're not even sure it'll remain like that.
At the same time, `mode()` function in Vim has quite a reach specification and there is a small chance it'll be changed. With this approach, we use values from Vim, yet in a form of enum.
2025-08-08 12:44:30 +03:00
Alex Plate fee75001f6 Do not allow to change the mode from the API
The details why we don't want this for now are logged in the code
2025-08-08 12:44:29 +03:00
Alex Plate df3fb1a8a3 Convert VimScope into the interface 2025-08-08 12:44:29 +03:00
Alex Plate 057f4eee5d The ReadImpl does not inherit the VimScopeImpl
`ReadImpl` didn't use anything from `VimScopeImpl`. This would make sense if `Read` inherited `VimScope`, but it doesn't.
Also, we'll always be able to bring back the dependency if we figure out it's necessary.
2025-08-08 12:44:29 +03:00
Mia VucinicandAlex Plate 3cb5308193 fix failing tests 2025-08-01 16:16:29 +03:00
Mia VucinicandAlex Plate 807dff45a9 add a new ReplaceWithRegister plugin implementation 2025-08-01 16:16:27 +03:00
Mia VucinicandAlex Plate a25b88327e implement PlugDisable command 2025-08-01 16:16:27 +03:00
Mia VucinicandAlex Plate fbb2351ec2 implement PlugEnable command 2025-08-01 16:16:26 +03:00
Mia VucinicandAlex Plate 621969faec implement a new way for registering extensions 2025-08-01 16:16:26 +03:00
Mia VucinicandAlex Plate 26e33c088c implement ksp for extensions processing 2025-08-01 16:16:26 +03:00
Alex PlãteandGitHub 38fba69c33 Merge pull request #1246 from JetBrains/thin-api-first-draft
API for writing plugins
2025-08-01 15:43:46 +03:00
Mia Vucinic 8ae792e74e add return value to with and withPrimaryCaret 2025-07-29 16:23:12 +02:00
Mia Vucinic 15660a9f3d make functions in output panel scope non suspend 2025-07-29 16:10:15 +02:00
Matt EllisandAlex Plãte 7d9fa418ce Support :k{mark} without separating whitespace
Fixes VIM-3915
2025-07-28 12:21:46 +03:00
Matt EllisandAlex Plãte 68e9538ac5 Remove unnecessary special case handling of subst
This was added before the grammar made whitespace optional between command and argument
2025-07-28 12:21:46 +03:00
Mia Vucinic f74552ef19 fix replaceText when editor is empty 2025-07-28 10:07:17 +02:00
Mia Vucinic a4e9e70df7 add test for inserting empty text and fix coerceIn function 2025-07-28 07:32:29 +02:00
Mia Vucinic 55b44aab53 implement add caret and remove caret functions 2025-07-28 07:32:18 +02:00
Mia Vucinic c95421518e fix path handling for jump and marks 2025-07-24 17:13:41 +02:00
Mia Vucinic a45b642d1e fix exceptions 2025-07-24 09:26:16 +02:00
Mia Vucinic 5d731ff818 fix editor size 2025-07-24 08:15:47 +02:00
Mia Vucinic 5f4cd75898 remove unnecessary getNextWordStartOffset function from VimScope 2025-07-24 08:15:09 +02:00
Mia Vucinic 9443f16551 remove unused variable and some comments 2025-07-24 08:00:00 +02:00
dependabot[bot]andgithub-actions[bot] e0c7f05c1e Bump org.junit.jupiter:junit-jupiter-api from 5.13.3 to 5.13.4
Bumps [org.junit.jupiter:junit-jupiter-api](https://github.com/junit-team/junit-framework) from 5.13.3 to 5.13.4.
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.3...r5.13.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-23 18:32:42 +03:00
dependabot[bot]andgithub-actions[bot] f474d44d27 Bump org.junit.vintage:junit-vintage-engine from 5.13.2 to 5.13.4
Bumps [org.junit.vintage:junit-vintage-engine](https://github.com/junit-team/junit-framework) from 5.13.2 to 5.13.4.
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.2...r5.13.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-23 18:32:32 +03:00
Mia Vucinic d5e64a8f28 split read into Read and ReadScope
- We want to be able to execute functions defined on read scope under write lock as well, which means we want to have transaction extend read. However, due to conflicting names for caret scope builders (forEachCaret, withPrimaryCaret etc.) it was necessary to split it into two scopes:
1) Read - contains only functions available under read lock
2) ReadScope - contains both caret scope builders and functions defined on Read
2025-07-23 12:01:28 +02:00
Mia Vucinic e7ec16e8f1 remove variable locking 2025-07-22 13:46:04 +02:00
Mia Vucinic 246e6e4444 remove onRemove method from listener 2025-07-22 13:41:18 +02:00
Mia Vucinic 02a9d284b3 repackage files 2025-07-22 12:47:00 +02:00
Mia Vucinic f5cf751a0a move files to appropriate packages 2025-07-22 12:31:53 +02:00
Mia Vucinic 6f4bd936f9 update docs 2025-07-22 12:12:39 +02:00
Mia Vucinic 657f7f5f9c fix modal input tests after rebasing 2025-07-22 08:22:45 +02:00
Mia Vucinic 62c816c80e refactor insert and replace text in caret transaction impl 2025-07-21 21:06:39 +02:00
Mia Vucinic 1b1d5815f4 fix validating offsets for replace text 2025-07-21 21:06:39 +02:00
Mia Vucinic 34af17d18e rename caretAfterInsertedText to caret at end 2025-07-21 21:06:39 +02:00
Mia Vucinic 67fa38d999 add caret transaction test 2025-07-21 21:06:39 +02:00
Mia Vucinic 891b6316eb add a replace text blockwise function 2025-07-21 21:06:39 +02:00
Mia Vucinic b00274699d add option scope test 2025-07-21 21:06:39 +02:00
Mia Vucinic 9e6fb85325 add test for digraph scope 2025-07-21 21:06:39 +02:00
Mia Vucinic f23e190849 delete on global option change listener 2025-07-21 21:06:39 +02:00
Mia Vucinic 36c2f797a9 add tests for search functions in VimScope 2025-07-21 21:06:39 +02:00
Mia Vucinic 98b19b2396 add variable tests 2025-07-21 21:06:39 +02:00
Mia Vucinic f9f4c6b17c add modes test 2025-07-21 21:06:39 +02:00
Mia Vucinic 8642f4afe9 remove suspend from some functions 2025-07-21 21:06:39 +02:00
Mia Vucinic 560689399b wrap body of export operator function in command 2025-07-21 21:06:39 +02:00
Mia Vucinic 758809f7d5 make some functions not suspend 2025-07-21 21:06:39 +02:00
Mia Vucinic cd1a7adc9e make listeners work with coroutines 2025-07-21 21:06:39 +02:00
Mia Vucinic 979ef3fa1c make api use coroutines 2025-07-21 21:06:39 +02:00
Mia Vucinic 6aebedfbc0 add a coroutines library to the vim-engine module 2025-07-21 21:06:39 +02:00