robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
b9d732c249
master
1#pragma once 2 3#include <stdio.h> // IWYU pragma: keep 4 5#include "nvim/api/private/defs.h" // IWYU pragma: keep 6#include "nvim/api/private/helpers.h" 7#include "nvim/cmdexpand_defs.h" // IWYU pragma: keep 8#include "nvim/eval/typval_defs.h" // IWYU pragma: keep 9#include "nvim/ex_cmds_defs.h" // IWYU pragma: keep 10#include "nvim/macros_defs.h" 11#include "nvim/option_defs.h" // IWYU pragma: keep 12#include "nvim/types_defs.h" // IWYU pragma: keep 13 14/// flags for buf_copy_options() 15enum { 16BCO_ENTER = 1 ,///< going to enter the buffer 17BCO_ALWAYS = 2 ,///< always copy the options 18BCO_NOHELP = 4 ,///< don't touch the help related options 19}; 20 21/// Flags for option-setting functions 22/// 23/// When OPT_GLOBAL and OPT_LOCAL are both missing, set both local and global 24/// values, get local value. 25typedef enum { 26OPT_GLOBAL = 0x01 ,///< Use global value. 27OPT_LOCAL = 0x02 ,///< Use local value. 28OPT_MODELINE = 0x04 ,///< Option in modeline. 29OPT_WINONLY = 0x08 ,///< Only set window-local options. 30OPT_NOWIN = 0x10 ,///< Don’t set window-local options. 31OPT_ONECOLUMN = 0x20 ,///< list options one per line 32OPT_NO_REDRAW = 0x40 ,///< ignore redraw flags on option 33OPT_SKIPRTP = 0x80 ,///< "skiprtp" in 'sessionoptions' 34}OptionSetFlags ; 35 36/// :set boolean option prefix 37typedef enum { 38PREFIX_NO = 0 ,///< "no" prefix 39PREFIX_NONE ,///< no prefix 40PREFIX_INV ,///< "inv" prefix 41}set_prefix_T ; 42 43/// Gets the option-domain name of an option's type. 44static inline const char * optval_type_name (const ObjectType type ) 45{ 46switch (type ) { 47case kObjectTypeBoolean : 48return "boolean" ; 49case kObjectTypeInteger : 50return "number" ; 51case kObjectTypeString : 52return "string" ; 53default : 54abort (); 55 } 56} 57 58#include "option.h.generated.h"