Commit Graph

58 Commits

Author SHA1 Message Date
Maxime Coste
a49e175727 Migrate to a more value based meta programming model
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-15 17:42:02 +00:00
Maxime Coste
89fa6d4fbf Small code simplification 2017-03-07 16:11:40 +00:00
Maxime Coste
dcd8f6ef01 Apply clang-tidy modernize to the codebase 2017-01-08 22:39:01 +00:00
Maxime Coste
1b9eb2c6ba Validate option names to be in [a-zA-Z0-9_]
Closes #824
2016-09-27 09:54:55 +01:00
Maxime Coste
a0c20a924a OptionDescs are const in OptionRegistry 2016-09-26 22:59:02 +01:00
Maxime Coste
0de4fc75d0 Dont consider OptionManager watcher list as part of the state of the option manager 2016-08-21 20:24:18 +01:00
Maxime Coste
ac0c746072 Tweak format of option docstrings 2016-08-07 10:47:26 +01:00
Maxime Coste
f73e89a716 Add information of types of options 2016-08-06 09:05:50 +01:00
Maxime Coste
f1a93a0e61 Replace some const String& with StringView in option_manager.hh 2016-08-06 06:52:11 +01:00
Maxime Coste
3a699c8ac3 Include tweak 2016-03-14 13:41:20 +00:00
Maxime Coste
986c91a835 Support validating some options values before setting them
Fixes #583
2016-02-11 22:07:18 +00:00
Maxime Coste
4cb74623bb Store the buffer timestamp in line flags options respect it for highlighting
Option content is auto updated to match current buffer, so that line flags
are updated according to buffer modifications.
2015-12-12 11:45:45 +00:00
Maxime Coste
70250fc1e3 Pass directly the StringView to option_add and let it do the option parsing 2015-12-12 11:26:34 +00:00
Maxime Coste
94ec1cdde7 Add an unset command to remove an option value (falling back to parent)
unset is not applicable to global scope.
2015-08-10 13:54:52 +01:00
Maxime Coste
10d8cf64cf Move option docstring obtention to OptionRegistry 2015-08-10 13:53:30 +01:00
Maxime Coste
bfb116b8b4 Move option name completion to the OptionRegistry
Option names are the same for every option manager.
2015-08-10 13:38:06 +01:00
Maxime Coste
ea02467564 Disable notifications when disabling an option temporarly 2015-07-23 23:42:48 +01:00
Maxime Coste
8f6fc6a0f3 Port even more code to use format function 2015-06-01 21:15:59 +01:00
Maxime Coste
720c54c759 Move option_not_found exception to the cpp file 2015-04-26 20:40:32 +01:00
Maxime Coste
0bdf1778cb Some more memory tracking 2015-01-12 13:32:14 +00:00
Maxime Coste
b6ff15aa75 Unify completion from container content logic 2014-12-23 13:54:09 +00:00
Maxime Coste
064fb81b8d Move containers utils to containers.hh and add filtered/transformed utils 2014-12-23 13:40:26 +00:00
Maxime Coste
f32ab5793e Remove unneeded includes 2014-12-11 13:10:41 +00:00
Maxime Coste
b43f0fb853 Yet more StringView params, less const String& 2014-11-16 20:55:36 +00:00
Maxime Coste
ece03c3599 More const String& to StringView 2014-11-15 18:45:56 +00:00
Maxime Coste
abfc016321 Remove AutoRegister util template 2014-11-02 16:04:24 +00:00
Maxime Coste
e38ba6ce3d Add scope class and encapsulate Options, Keymaps, Aliases and Hooks in it 2014-10-30 14:04:57 +00:00
Maxime Coste
3e797a3d15 centralize bit operation support for enum used as flags 2014-10-23 19:02:39 +01:00
Maxime Coste
fa85f0fc32 Refactor regex uses, do not reference boost except in regex.hh 2014-10-13 13:14:23 +01:00
Maxime Coste
bea53d09b2 Remove option checkers, handle that through the type system
Use a specific type for InsertCompleterDesc with checks in
the option_{from,to}_string functions
2014-08-19 18:56:11 +01:00
Maxime Coste
fe70add4b7 Disable 'interactive' options in :exec/:eval
Incremental search, automatic info and completion are
not needed in non interactive context.
2014-05-25 17:36:12 +01:00
Maxime Coste
dfb1246697 Complete option values with the current value of the option
Fixes #32
2014-05-05 12:55:04 +01:00
Maxime Coste
3efeb67861 Fix Option destructor that was not virtual 2014-04-30 19:40:23 +01:00
Maxime Coste
adde2fef75 Use StringView for completion functions 2014-04-18 14:02:14 +01:00
Maxime Coste
9ff356cb2b Extract option descriptions in an shared OptionDesc class 2014-04-12 20:03:26 +01:00
Maxime Coste
e9276a0a85 Add a docstring to options 2014-04-11 18:43:25 +01:00
Maxime Coste
19868f01c8 return a const String& in Option::name() 2014-04-09 19:33:37 +01:00
Maxime Coste
e12bf4978c Try prefix completion and then subsequence completion for option names
fixes #4
2014-01-03 19:00:05 +00:00
Maxime Coste
5a4650aecc Add support for hidden options, not showed by completion
the decl command can take a -hidden parameter to hide an option
2013-11-12 19:21:07 +00:00
Maxime Coste
3a49e05832 Option can be declared with a checker function.
The checker function may throw if to be set option value is invalid.
Implemented with the completers option.
2013-05-06 13:52:41 +02:00
Maxime Coste
42d7fcacd8 add a completers option for specifying which completer to use for BufferCompleter 2013-05-03 18:44:27 +02:00
Maxime Coste
11bc24f992 FlagLines: use a shared updaters for options
previously, having two windows showing the same buffer with
the same line flags would have updated the options twice, resulting
in wrong lines in option. Now line flags options are updated only
once by a shared object along all FlagLines highlighter using the
same option.
2013-04-29 14:20:42 +02:00
Maxime Coste
021756dfd4 redeclaring an option with the same type is not an error 2013-04-17 19:10:51 +02:00
Maxime Coste
270e950cf1 sort includes directives 2013-04-09 20:05:40 +02:00
Maxime Coste
b9f5dbd3b5 add an OptionManagerWatcher_AutoRegister class 2013-04-02 13:57:04 +02:00
Maxime Coste
f09e24607a add support for adding to options instead of replacing 2013-03-31 14:53:32 +02:00
Maxime Coste
4ec9c4c32a Make TypedOption templates public 2013-03-26 13:47:14 +01:00
Maxime Coste
fac222a427 Strongly typed options support
* non builtins options require declaration using the decl command

* At the moment, only int and string options are supported, however
the goal of this change is to provide a consistent way to support
more complex options, namely lists and booleans
2013-03-05 18:49:26 +01:00
Maxime Coste
7acd4e3e6a minor code cleanup 2013-01-06 21:58:02 +01:00
Maxime Coste
3b5530ac09 rename (hook|option)_manager to (hook|option)s.
And Global(Hook|Option)Manager to Global(Hook|Option)s
2012-11-22 13:50:29 +01:00