summaryrefslogtreecommitdiff
path: root/src/option_manager.hh
AgeCommit message (Collapse)Author
2024-08-16include headers cleanupAdrià Arrufat
2024-08-12Reduce headers dependency graphMaxime Coste
Move more code into the implementation files to reduce the amount of code pulled by headers.
2024-04-12Introduce "local" scope in evaluate-commandsMaxime Coste
When using `eval` a new scope named 'local' gets pushed for the whole evaluation, this makes it possible to temporarily set an option/hook/alias... Local scopes nest so nested evals do work as expected. Remove the now trivial with-option command
2020-09-09Add support for removing from optionsMaxime Coste
`set -remove ...` will remove from the current option value, substracting from int, removing elements from vectors and maps.
2020-06-09Do not include non-primitive option value in *SetOption hook filterMaxime Coste
Only include the value for int/str/bool options, for the rest just write '<option name>=...'. This should reduce the cost of some patterns such as repeatedly adding a value inside a list option. It seems very unlikely that the actual value would be matched by a hook regex string for non primitive types.
2019-01-24Header and dependency cleanupMaxime Coste
2019-01-20Defer deletion of unsetted option to return to main loopMaxime Coste
Fixes #2572
2018-11-28Fix hooks triggering on unset-option even if parent has same valueMaxime Coste
2018-08-29Use shell specific quoting for env varsMaxime Coste
Add a test case to validate roundtrips between Kakoune and the shell.
2018-07-05Change option lists to be specified as separate arguments on commands lineMaxime Coste
Option lists and maps are specified using separate arguments, avoiding the need for additional escaping of their separator and reusing the existing command line spliting logic instead. As discussed on #2087, this should make it much easier to work with list options, and make the general option system feel cleaner.
2018-05-27Refactor option_from_string to return directly the option valueMaxime Coste
2018-05-26Do not expose C++ typeid().name to user facing errors on wrong option typeMaxime Coste
Fixes #2079
2018-05-09Mark Client, Window, Buffer and OptionManager as finalMaxime Coste
Avoids warning about non virtual destructor calls on them, as they have a vtable due to OptionManagerWatcher.
2018-03-25Unify code that validates identifiers in KakouneMaxime Coste
Session/Client/User modes names are now requiered to be "identifiers" they must be in [a-zA-Z0-9_-]. Option names are the same except they do not allow '-' as they need to be made available through the env vars and '-' is not supported there. Fixes #1946
2018-03-13ranges: Add transform overload taking directly a pointer to memberMaxime Coste
This overload will forward to the general transform implementation using std::mem_fn to generate a callable.
2018-02-20Rewrite OptionManager::flatten_options to use rangesMaxime Coste
Avoid accumulating the flattened options into a vector, generate a lazy range that will give the proper list.
2017-10-10Move all non-core string code to string_utils.{hh,cc}Maxime Coste
2017-08-29Rename containers.hh to ranges.hh (and Container to Range)Maxime Coste
2017-07-19Migrate code to c++14Maxime Coste
2017-06-23Use an HashMap to store options in option managerMaxime Coste
Turns out looking for options can get pretty slow, so O(1) lookup seems better. This should improve the performance of the #1460 issue
2017-05-25Add an update-option command to update range-descs/line-descs optionsMaxime Coste
update-option will make the range-descs and line-descs option up to date with the latest buffer modfications, changing the ranges/lines to where they moved according the modifications since the timestamp on the option.
2017-05-22Remove virtual destructor from OptionManagerWatcherMaxime Coste
We should never destruct anything through an OptionManagerWatcher pointer, so having all those destructor virtual makes no sense.
2017-03-16Fixes some clang-tidy warning and add a few missing meta.hh includeMaxime Coste
2017-03-16Try to clean up option include a bitMaxime Coste
2017-03-15Migrate WithBitOps template specialization to with_bit_ops functionMaxime Coste
This way we dont depend on knowing the base template to enable bit ops on an enum type.
2017-03-15Migrate to a more value based meta programming modelMaxime Coste
Introduce Meta::Type<T> to store a type as value, and pass it around, migrate enum_desc and option_type_name to this.
2017-03-07Small code simplificationMaxime Coste
2017-01-08Apply clang-tidy modernize to the codebaseMaxime Coste
2016-09-27Validate option names to be in [a-zA-Z0-9_]Maxime Coste
Closes #824
2016-09-26OptionDescs are const in OptionRegistryMaxime Coste
2016-08-21Dont consider OptionManager watcher list as part of the state of the option ↵Maxime Coste
manager
2016-08-07Tweak format of option docstringsMaxime Coste
2016-08-06Add information of types of optionsMaxime Coste
2016-08-06Replace some const String& with StringView in option_manager.hhMaxime Coste
2016-03-14Include tweakMaxime Coste
2016-02-11Support validating some options values before setting themMaxime Coste
Fixes #583
2015-12-12Store the buffer timestamp in line flags options respect it for highlightingMaxime Coste
Option content is auto updated to match current buffer, so that line flags are updated according to buffer modifications.
2015-12-12Pass directly the StringView to option_add and let it do the option parsingMaxime Coste
2015-08-10Add an unset command to remove an option value (falling back to parent)Maxime Coste
unset is not applicable to global scope.
2015-08-10Move option docstring obtention to OptionRegistryMaxime Coste
2015-08-10Move option name completion to the OptionRegistryMaxime Coste
Option names are the same for every option manager.
2015-07-23Disable notifications when disabling an option temporarlyMaxime Coste
2015-06-01Port even more code to use format functionMaxime Coste
2015-04-26Move option_not_found exception to the cpp fileMaxime Coste
2015-01-12Some more memory trackingMaxime Coste
2014-12-23Unify completion from container content logicMaxime Coste
2014-12-23Move containers utils to containers.hh and add filtered/transformed utilsMaxime Coste
2014-12-11Remove unneeded includesMaxime Coste
2014-11-16Yet more StringView params, less const String&Maxime Coste
2014-11-15More const String& to StringViewMaxime Coste