Matt Ellis and Alex Pláte
825b62a2a9
Refactor to remove lazy properties
2024-01-04 15:58:36 +02:00
Matt Ellis and Alex Pláte
5ec817776c
Use "vim" prefix for option keys
2024-01-04 15:58:36 +02:00
Matt Ellis and Alex Pláte
3ad0519add
Extract initialisation strategies to new class
2024-01-04 15:58:36 +02:00
Matt Ellis and Alex Pláte
9868522341
Only calculate stack trace if logging is enabled
2024-01-04 15:58:36 +02:00
Matt Ellis and Alex Pláte
5b8d8c617f
Improve type handling
2024-01-04 15:58:36 +02:00
Matt Ellis and Alex Pláte
a1f66061e3
Extract option storage to separate class
2024-01-04 15:58:36 +02:00
Matt Ellis and Alex Pláte
d8811933c9
Simplify resetting options for testing
2024-01-04 15:58:36 +02:00
Matt Ellis and Alex Pláte
c9864dde8d
Extract parsed values cache
2024-01-04 15:58:36 +02:00
Matt Ellis and Alex Pláte
ca849d6649
Simplify API of OptionListenersImpl
2024-01-04 15:58:36 +02:00
Matt Ellis and Alex Pláte
95a2354a86
Fix issue where global value wasn't properly set
2024-01-04 15:58:36 +02:00
Matt Ellis and Alex Pláte
538e0ac48c
Extract listener notification
...
Refactoring - no intentional changes in behaviour
2024-01-04 15:58:36 +02:00
Matt Ellis and Alex Pláte
1c17411f04
Add test for changing number global-local options
...
The local value is not unset, but set to a copy of the new value, so we need to make sure that we notify editors that are not "unset"
2024-01-04 15:58:36 +02:00
Matt Ellis and Alex Pláte
cbe0f89548
Extract listener registration to separate class
...
Refactoring - no intentional changes in behaviour
2024-01-04 15:58:36 +02:00
Matt Ellis and Alex Pláte
615b071dcb
Rename methods for clarity
2024-01-04 15:58:36 +02:00
Matt Ellis and Alex Pláte
8ab43e98fe
Remove unnecessary keeping visual mode flag
...
The value was only ever set to false.
2023-12-22 10:55:00 +02:00
Matt Ellis and Alex Pláte
4f407ccc03
Remove unused multikey-undo flag
...
It's uncertain what this was introduced for, and it's no longer used for any behaviour
2023-12-22 10:55:00 +02:00
Matt Ellis and Alex Pláte
5f3fddd3e4
Remove unnecessary post process method
...
We no longer need to post process the selection because it is up to the operator implementation to end in the correct mode
2023-12-22 10:55:00 +02:00
Matt Ellis and Alex Pláte
392f3b536d
Remove unnecessary mode reset
...
Visual mode should already have been exited before executing the operator. The operator's implementation is responsible for handling the final mode
2023-12-22 10:55:00 +02:00
Matt Ellis and Alex Pláte
155de2b396
Remove always true check and always exit visual
2023-12-22 10:55:00 +02:00
Matt Ellis and Alex Pláte
6c9930ac2a
Removes unnecessary 'exit visual' command flag
...
This flag is only used to modify the behaviour of visual operators, but all visual operators have the flag, which means it's unnecessary. The only behaviour for visual operators now is to exit visual mode.
Note that visual motions are implemented separately, and handle their own visual mode requirements (e.g. MotionArrowLeftAction).
2023-12-22 10:55:00 +02:00
Matt Ellis and Alex Pláte
9dddf4f4bc
Minor cleanup
2023-12-22 10:55:00 +02:00
Matt Ellis and Alex Pláte
1841b7c4e6
Allow tilde forward slash on Windows
2023-11-03 08:46:57 +02:00
Matt Ellis and Alex Pláte
f0abe5d80d
Fix range for fall back comment mode
...
Callback to reset caret was always called, even if action was unavailable. Fall back action would therefore act on current line only.
2023-10-27 12:45:02 +03:00
Matt Ellis and GitHub
5fd54dccd3
Add support for ShowHoverInfo action to 2023.1 and 2023.2 ( #733 )
...
* Fix(VIM-2106) Implement ShowHoverInfo if not provided by platform
* Bump minimum build to 2023.1 RTM
2023-10-27 11:06:11 +03:00
Matt Ellis and Alex Pláte
405b9ba7ea
Fix(VIM-2562): Fix hang with multi-width chars in command line
2023-10-11 11:08:08 +03:00
Matt Ellis and Alex Pláte
585b815472
Only notify changes if the value is different
...
This is primarily to avoid instantiating inactive extensions when
resetting all options back to default values, which sets extensions
inactive.
It applies to global and local options, but not to global-local. The
notifications for global-local options are already complex, as they can
be reacting to changes to both the global and local value, and only
notifying editors that are affected.
2023-09-11 11:04:09 +03:00
Matt Ellis and Alex Pláte
c37e2f4176
Update fallback window when all windows close
2023-09-11 11:04:09 +03:00
Matt Ellis and Alex Pláte
626d59d3fc
Only use fallback for first initialisation
...
Subsequent initialisation will be treated like EDIT
2023-09-11 11:04:09 +03:00
Matt Ellis and Alex Pláte
ddd058a26f
Fix name of usage statistic
2023-09-11 11:04:09 +03:00
Matt Ellis and Alex Pláte
32b8d03c5e
Improve modifying string and string list options
2023-09-11 11:04:09 +03:00
Matt Ellis and Alex Pláte
71f3e1b4f1
Support per-window global values
...
For local-to-window options
2023-09-11 11:04:09 +03:00
Matt Ellis and Alex Pláte
aa6f53fa68
Require editor when getting/setting global option
2023-09-11 11:04:09 +03:00
Matt Ellis and Alex Pláte
1335e9f7f2
Improve detection of editor open scenarios
2023-09-11 11:04:09 +03:00
Matt Ellis and Alex Pláte
c75599b6a0
Refactor editor options initialisation
2023-09-11 11:04:09 +03:00
Matt Ellis and Alex Pláte
2efdfbd988
Remove unnecessary calls from tests
2023-09-11 11:04:09 +03:00
Matt Ellis and Alex Pláte
700198d8bc
Remove test only vimscript execute method
2023-09-11 11:04:09 +03:00
Matt Ellis and Alex Pláte
3efab5928e
Evaluate ideavimrc in the fallback window context
2023-09-11 11:04:09 +03:00
Matt Ellis and Alex Pláte
93037b6866
Add fallback window to capture local option state
2023-09-11 11:04:09 +03:00
Matt Ellis and Alex Pláte
0f19e50c69
Improve hierarchy of option accessors
...
Getting the effective IJ options would allow access to Vim global and IJ global, but not Vim effective. IntelliJ specific options are now a separate hierarchy, so the Vim effective and IJ effective accessors now simply access all Vim or all IJ options.
2023-09-11 11:04:09 +03:00
Matt Ellis and Alex Pláte
66ea6ad3d4
Rename OptionScope to OptionAccessScope
2023-09-11 11:04:09 +03:00
Matt Ellis and Alex Pláte
cb8385a092
Fix issue adding back hidden status bar widget
2023-08-03 15:00:28 +03:00
Matt Ellis and Alex Pláte
d4aa1f87e0
Fix read-only stdin when running application
2023-08-03 14:58:47 +03:00
Matt Ellis and Alex Pláte
d112030a8e
Add explanatory comment about InsertExitModeAction
2023-08-01 12:22:26 +03:00
Matt Ellis and Alex Pláte
98ca4080dd
Do not enter INSERT mode for read-only editors
...
It's not enough that the document is writable, the editor needs to be non-read-only, too.
Fixes VIM-2313, fixes VIM-2318, fixes VIM-2666, fixes VIM-2951
2023-08-01 12:22:26 +03:00
Matt Ellis and Alex Pláte
dd24ebf184
Rename OptionsScope.AUTO to EFFECTIVE
2023-07-31 11:28:32 +03:00
Matt Ellis and Alex Pláte
7ef2be625f
Refactor parseOptionLine for readability
2023-07-31 11:28:32 +03:00
Matt Ellis and Alex Pláte
e3957d2207
Minor updates from code review
2023-07-31 11:28:32 +03:00
Matt Ellis and Alex Pláte
8ce1307d51
Fix tests under latest SDK
2023-07-31 11:28:32 +03:00
Matt Ellis and Alex Pláte
e1141dcd1c
Remove old option listener API
2023-07-31 11:28:32 +03:00
Matt Ellis and Alex Pláte
4e33b5f351
Migrate to effective value change listeners
2023-07-31 11:28:32 +03:00
Matt Ellis and Alex Pláte
54dc184dd0
Introduce option effective value change listener
2023-07-31 11:28:32 +03:00
Matt Ellis and Alex Pláte
1977ce3ea5
Add simple one to many collection
2023-07-31 11:28:32 +03:00
Matt Ellis and Alex Pláte
c8c9d1729e
Introduce listener for global option changes
2023-07-31 11:28:32 +03:00
Matt Ellis and Alex Pláte
e6e4b81f3b
Simplify guicursor caret attributes cache
2023-07-31 11:28:32 +03:00
Matt Ellis and Alex Pláte
1c465f028e
Fix option scopes for :let command
2023-07-31 11:28:32 +03:00
Matt Ellis and Alex Pláte
12824c22c4
Add :setglobal command
2023-07-31 11:28:32 +03:00
Matt Ellis and Alex Pláte
64c5ad72a3
Use accessor API to set global-local value
2023-07-31 11:28:32 +03:00
Matt Ellis and Alex Pláte
080c2059ee
Format unset global-local toggle options
2023-07-31 11:28:32 +03:00
Matt Ellis and Alex Pláte
a288850010
Add support for resetting option to global value
2023-07-31 11:28:32 +03:00
Matt Ellis and Alex Pláte
16811602d2
Support global-local options
2023-07-31 11:28:32 +03:00
Matt Ellis and Alex Pláte
6d94d719e3
Only notify change if option has changed
2023-07-31 11:28:32 +03:00
Matt Ellis and Alex Pláte
749d111e89
Reset options for current editor only
...
Matches Vim behaviour for `:set all&`
2023-07-31 11:28:32 +03:00
Matt Ellis and Alex Pláte
365d8d34ce
Introduce AUTO scope for effective option values
2023-07-31 11:28:32 +03:00
Matt Ellis and Alex Pláte
ced25bbf28
Initialise options when opening windows/buffers
...
Note that this temporarily changes the semantics of `:set` to always set the local option, instead of setting the global option (because we now eagerly initialise local values). Neither is correct, but we don't yet have a way to support the proper behaviour.
2023-07-31 11:28:32 +03:00
Matt Ellis and Alex Pláte
7e1ce5a203
Use Vim terminology in storage service
2023-07-31 11:28:32 +03:00
Matt Ellis and Alex Pláte
aeec754f7e
Override IjVimEditor.toString for better debugging
2023-07-31 11:28:32 +03:00
Matt Ellis and Alex Pláte
9a3fcb56a1
Support local-to-buffer options
...
Previously, all local options were treated as local-to-window
2023-07-31 11:28:32 +03:00
Matt Ellis and Alex Pláte
aff956f4c8
Update parsed value cache for declared scope
2023-07-31 11:28:32 +03:00
Matt Ellis and Alex Pláte
0f49fd6406
Introduce declared scope for all options
2023-07-31 11:28:32 +03:00
Matt Ellis and Alex Pláte
6bd1782c4b
Fix OS specific values in tests
2023-07-19 18:04:02 +03:00
Matt Ellis and Alex Pláte
2f5d402c61
Support :set! to output as a single column
2023-07-19 18:04:02 +03:00
Matt Ellis and Alex Pláte
8fb2ea5845
Output options in column order, not row order
...
This means that the last column might not be full, rather than the last row. Same as Vim.
2023-07-19 18:04:02 +03:00
Matt Ellis and Alex Pláte
a78e21a167
Use soft wraps instead of hard wraps in ex output
...
Hard wraps require figuring out the width of the panel, and all we have is the width of the associated editor, which excludes gutter, etc. Easier to let the UI toolkit handle it
2023-07-19 18:04:02 +03:00
Matt Ellis and Alex Pláte
2e9b626523
Fix formatting of value pair options
2023-07-19 18:04:02 +03:00
Matt Ellis and Alex Pláte
4487b8904c
Sort options output before formatting
...
Sorts on option name, not including "no" prefix for toggle options
2023-07-19 18:04:02 +03:00
Matt Ellis and Alex Pláte
1f01f915dc
Remove trailing padding from options list
2023-07-19 18:04:02 +03:00
Matt Ellis and Alex Pláte
94ef9692f2
Fix typo in ideajoin notification
2023-05-17 10:54:13 +02:00
Matt Ellis and Alex Pláte
798750bf95
Use options API for more cached values
2023-05-17 10:54:13 +02:00
Matt Ellis and Alex Pláte
e8d9bd551f
Add helper functions to storage service
2023-05-17 10:54:13 +02:00
Matt Ellis and Alex Pláte
d08ea2ee9b
Introduce simple cache for parsed option values
2023-05-17 10:54:13 +02:00
Matt Ellis and Alex Pláte
52dcb2d290
Treat 'iskeyword' as a local-to-buffer option
2023-05-17 10:54:13 +02:00
Matt Ellis and Alex Pláte
4cc883f174
Refactor search helper companion to interface
...
Helper functions now take the editor rather than the text, ready for search to rely on per-editor options (i.e. '`iskeyword'`). Also standardises on `Int` for search parameters. While the file size is a `Long`, the editor returns a `CharSequence`, which is indexed by `Int`.
2023-05-17 10:54:13 +02:00
Matt Ellis and Alex Pláte
5a3c5bd761
Treat 'virtualedit' as a global-local option
2023-05-17 10:54:13 +02:00
Matt Ellis and Alex Pláte
66830b7cb3
Treat 'idearefactor' as a global-local option
2023-05-17 10:54:13 +02:00
Matt Ellis and Alex Pláte
b742865e8a
Treat 'ideajoin' as a global-local option
2023-05-17 10:54:13 +02:00
Matt Ellis and Alex Pláte
fd314a3288
Treat 'matchpairs' as a local option
2023-05-17 10:54:13 +02:00
Matt Ellis and Alex Pláte
29bd7cbe6e
Update note to include how to add an option
2023-04-26 10:26:06 +03:00
Matt Ellis and Alex Pláte
a51fc9c612
Add extra notes about the history of refactorings
2023-04-26 10:26:06 +03:00
Matt Ellis and Alex Pláte
77ad9deeba
Use interface for IJ specific options
2023-04-26 10:26:06 +03:00
Matt Ellis and Alex Pláte
ffa6c45b62
Reset test injector after each test
2023-04-26 10:26:06 +03:00
Matt Ellis and Alex Pláte
957874ce2b
Remove unused @JvmField annotations
2023-04-26 10:26:06 +03:00
Matt Ellis and Alex Pláte
330d92116c
Refine inheritance of IJ specific option classes
2023-04-26 10:26:06 +03:00
Matt Ellis and Alex Pláte
899adfc1b0
More refactoring to use new API
2023-04-26 10:26:06 +03:00
Matt Ellis and Alex Pláte
23535a6ad5
Remove OptionValueAccessor
2023-04-26 10:26:06 +03:00
Matt Ellis and Alex Pláte
e8b7f00370
Remove accessor from new API
2023-04-26 10:26:06 +03:00
Matt Ellis and Alex Pláte
3f2c5070ee
Migrate local option access to new API
2023-04-26 10:26:06 +03:00
Matt Ellis and Alex Pláte
a2352525c5
Migrate global option access to new API
...
Also fixes some incorrect usages of local options as global, e.g. 'ideajoin' and 'scroll'. There are some options that should be local that are only ever accessed at global scope. These need fixing in the future, e.g. 'iskeyword', 'matchpairs' and 'virtualedit'
2023-04-26 10:26:06 +03:00
Matt Ellis and Alex Pláte
50384a526b
Introduce option accessor delegated properties
...
Also migrates tests to use new properties
2023-04-26 10:26:06 +03:00
Matt Ellis and Alex Pláte
9ade3365ff
Extract StringListOption
...
While it is conceptually very similar to StringOption, the implementation of list vs not-list operations are very different, and having a separate type will allow us to do more interesting things with overloading when we introduce delegate properties
2023-04-26 10:26:06 +03:00
Matt Ellis and Alex Pláte
f803c0aa72
Add deterministic initialisation of options
2023-03-31 17:37:48 +03:00