diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2025-02-05 23:09:29 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2025-02-05 23:09:29 +0000 |
commit | d5f194ce780c95821a855aca3c19426576d28ae0 (patch) | |
tree | d45f461b19f9118ad2bb1f440a7a08973ad18832 /src/nvim/option_vars.h | |
parent | c5d770d311841ea5230426cc4c868e8db27300a8 (diff) | |
parent | 44740e561fc93afe3ebecfd3618bda2d2abeafb0 (diff) | |
download | rneovim-rahm.tar.gz rneovim-rahm.tar.bz2 rneovim-rahm.zip |
Diffstat (limited to 'src/nvim/option_vars.h')
-rw-r--r-- | src/nvim/option_vars.h | 190 |
1 files changed, 9 insertions, 181 deletions
diff --git a/src/nvim/option_vars.h b/src/nvim/option_vars.h index 9ed24c4c9c..d31e76aff8 100644 --- a/src/nvim/option_vars.h +++ b/src/nvim/option_vars.h @@ -3,12 +3,17 @@ #include "nvim/macros_defs.h" #include "nvim/os/os_defs.h" #include "nvim/sign_defs.h" +#include "nvim/statusline_defs.h" #include "nvim/types_defs.h" +#ifdef INCLUDE_GENERATED_DECLARATIONS +# include "option_vars.generated.h" // NOLINT(build/include_defs) +#endif + // option_vars.h: definition of global variables for settable options #define HIGHLIGHT_INIT \ - "8:SpecialKey,~:EndOfBuffer,z:TermCursor,Z:TermCursorNC,@:NonText,d:Directory,e:ErrorMsg," \ + "8:SpecialKey,~:EndOfBuffer,z:TermCursor,@:NonText,d:Directory,e:ErrorMsg," \ "i:IncSearch,l:Search,y:CurSearch,m:MoreMsg,M:ModeMsg,n:LineNr,a:LineNrAbove,b:LineNrBelow," \ "N:CursorLineNr,G:CursorLineSign,O:CursorLineFold,r:Question,s:StatusLine,S:StatusLineNC," \ "c:VertSplit,t:Title,v:Visual,V:VisualNOS,w:WarningMsg,W:WildMenu,f:Folded,F:FoldColumn," \ @@ -16,7 +21,7 @@ "R:SpellRare,L:SpellLocal,+:Pmenu,=:PmenuSel,k:PmenuMatch,<:PmenuMatchSel,[:PmenuKind," \ "]:PmenuKindSel,{:PmenuExtra,}:PmenuExtraSel,x:PmenuSbar,X:PmenuThumb,*:TabLine,#:TabLineSel," \ "_:TabLineFill,!:CursorColumn,.:CursorLine,o:ColorColumn,q:QuickFixLine,z:StatusLineTerm," \ - "Z:StatusLineTermNC,g:MsgArea,0:Whitespace,I:NormalNC" + "Z:StatusLineTermNC,g:MsgArea,h:ComplMatchIns,0:Whitespace,I:NormalNC" // Default values for 'errorformat'. // The "%f|%l| %m" one is used for when the contents of the quickfix window is @@ -208,49 +213,6 @@ enum { #define COM_ALL "nbsmexflrO" // all flags for 'comments' option #define COM_MAX_LEN 50 // maximum length of a part -/// 'statusline' option flags -enum { - STL_FILEPATH = 'f', ///< Path of file in buffer. - STL_FULLPATH = 'F', ///< Full path of file in buffer. - STL_FILENAME = 't', ///< Last part (tail) of file path. - STL_COLUMN = 'c', ///< Column og cursor. - STL_VIRTCOL = 'v', ///< Virtual column. - STL_VIRTCOL_ALT = 'V', ///< - with 'if different' display. - STL_LINE = 'l', ///< Line number of cursor. - STL_NUMLINES = 'L', ///< Number of lines in buffer. - STL_BUFNO = 'n', ///< Current buffer number. - STL_KEYMAP = 'k', ///< 'keymap' when active. - STL_OFFSET = 'o', ///< Offset of character under cursor. - STL_OFFSET_X = 'O', ///< - in hexadecimal. - STL_BYTEVAL = 'b', ///< Byte value of character. - STL_BYTEVAL_X = 'B', ///< - in hexadecimal. - STL_ROFLAG = 'r', ///< Readonly flag. - STL_ROFLAG_ALT = 'R', ///< - other display. - STL_HELPFLAG = 'h', ///< Window is showing a help file. - STL_HELPFLAG_ALT = 'H', ///< - other display. - STL_FILETYPE = 'y', ///< 'filetype'. - STL_FILETYPE_ALT = 'Y', ///< - other display. - STL_PREVIEWFLAG = 'w', ///< Window is showing the preview buf. - STL_PREVIEWFLAG_ALT = 'W', ///< - other display. - STL_MODIFIED = 'm', ///< Modified flag. - STL_MODIFIED_ALT = 'M', ///< - other display. - STL_QUICKFIX = 'q', ///< Quickfix window description. - STL_PERCENTAGE = 'p', ///< Percentage through file. - STL_ALTPERCENT = 'P', ///< Percentage as TOP BOT ALL or NN%. - STL_ARGLISTSTAT = 'a', ///< Argument list status as (x of y). - STL_PAGENUM = 'N', ///< Page number (when printing). - STL_SHOWCMD = 'S', ///< 'showcmd' buffer - STL_FOLDCOL = 'C', ///< Fold column for 'statuscolumn' - STL_SIGNCOL = 's', ///< Sign column for 'statuscolumn' - STL_VIM_EXPR = '{', ///< Start of expression to substitute. - STL_SEPARATE = '=', ///< Separation between alignment sections. - STL_TRUNCMARK = '<', ///< Truncation mark if line is too long. - STL_USER_HL = '*', ///< Highlight from (User)1..9 or 0. - STL_HIGHLIGHT = '#', ///< Highlight name. - STL_TABPAGENR = 'T', ///< Tab page label nr. - STL_TABCLOSENR = 'X', ///< Tab page close nr. - STL_CLICK_FUNC = '@', ///< Click region start. -}; /// C string containing all 'statusline' option flags #define STL_ALL ((char[]) { \ STL_FILEPATH, STL_FULLPATH, STL_FILENAME, STL_COLUMN, STL_VIRTCOL, \ @@ -264,12 +226,6 @@ enum { STL_CLICK_FUNC, STL_TABPAGENR, STL_TABCLOSENR, STL_CLICK_FUNC, \ 0, }) -// flags used for parsed 'wildmode' -#define WIM_FULL 0x01 -#define WIM_LONGEST 0x02 -#define WIM_LIST 0x04 -#define WIM_BUFLASTUSED 0x08 - // arguments for can_bs() // each defined char should be unique over all values // except for BS_START, that intentionally also matches BS_NOSTOP @@ -280,11 +236,6 @@ enum { #define BS_START 's' // "Start" #define BS_NOSTOP 'p' // "nostoP -// flags for the 'culopt' option -#define CULOPT_LINE 0x01 // Highlight complete line -#define CULOPT_SCRLINE 0x02 // Highlight screen line -#define CULOPT_NBR 0x04 // Highlight Number column - #define LISPWORD_VALUE \ "defun,define,defmacro,set!,lambda,if,case,let,flet,let*,letrec,do,do*,define-syntax,let-syntax,letrec-syntax,destructuring-bind,defpackage,defparameter,defstruct,deftype,defvar,do-all-symbols,do-external-symbols,do-symbols,dolist,dotimes,ecase,etypecase,eval-when,labels,macrolet,multiple-value-bind,multiple-value-call,multiple-value-prog1,multiple-value-setq,prog1,progv,typecase,unless,unwind-protect,when,with-input-from-string,with-open-file,with-open-stream,with-output-to-string,with-package-iterator,define-condition,handler-bind,handler-case,restart-bind,restart-case,with-simple-restart,store-value,use-value,muffle-warning,abort,continue,with-slots,with-slots*,with-accessors,with-accessors*,defclass,defmethod,print-unreadable-object" @@ -319,47 +270,17 @@ EXTERN char *p_bg; ///< 'background' EXTERN int p_bk; ///< 'backup' EXTERN char *p_bkc; ///< 'backupcopy' EXTERN unsigned bkc_flags; ///< flags from 'backupcopy' -#define BKC_YES 0x001 -#define BKC_AUTO 0x002 -#define BKC_NO 0x004 -#define BKC_BREAKSYMLINK 0x008 -#define BKC_BREAKHARDLINK 0x010 EXTERN char *p_bdir; ///< 'backupdir' EXTERN char *p_bex; ///< 'backupext' EXTERN char *p_bo; ///< 'belloff' EXTERN char breakat_flags[256]; ///< which characters are in 'breakat' EXTERN unsigned bo_flags; - -// values for the 'belloff' option -#define BO_ALL 0x0001 -#define BO_BS 0x0002 -#define BO_CRSR 0x0004 -#define BO_COMPL 0x0008 -#define BO_COPY 0x0010 -#define BO_CTRLG 0x0020 -#define BO_ERROR 0x0040 -#define BO_ESC 0x0080 -#define BO_EX 0x0100 -#define BO_HANGUL 0x0200 -#define BO_IM 0x0400 -#define BO_LANG 0x0800 -#define BO_MESS 0x1000 -#define BO_MATCH 0x2000 -#define BO_OPER 0x4000 -#define BO_REG 0x8000 -#define BO_SH 0x10000 -#define BO_SPELL 0x20000 -#define BO_TERM 0x40000 -#define BO_WILD 0x80000 - EXTERN char *p_bsk; ///< 'backupskip' EXTERN char *p_breakat; ///< 'breakat' EXTERN char *p_bh; ///< 'bufhidden' EXTERN char *p_bt; ///< 'buftype' EXTERN char *p_cmp; ///< 'casemap' EXTERN unsigned cmp_flags; -#define CMP_INTERNAL 0x001 -#define CMP_KEEPASCII 0x002 EXTERN char *p_enc; ///< 'encoding' EXTERN int p_deco; ///< 'delcombine' EXTERN char *p_ccv; ///< 'charconvert' @@ -367,9 +288,6 @@ EXTERN char *p_cino; ///< 'cinoptions' EXTERN char *p_cedit; ///< 'cedit' EXTERN char *p_cb; ///< 'clipboard' EXTERN unsigned cb_flags; -#define CB_UNNAMED 0x001 -#define CB_UNNAMEDPLUS 0x002 -#define CB_UNNAMEDMASK (CB_UNNAMED | CB_UNNAMEDPLUS) EXTERN OptInt p_cwh; ///< 'cmdwinheight' EXTERN OptInt p_ch; ///< 'cmdheight' EXTERN char *p_cms; ///< 'commentstring' @@ -380,18 +298,6 @@ EXTERN char *p_cia; ///< 'completeitemalign' EXTERN unsigned cia_flags; ///< order flags of 'completeitemalign' EXTERN char *p_cot; ///< 'completeopt' EXTERN unsigned cot_flags; ///< flags from 'completeopt' -// Keep in sync with p_cot_values in optionstr.c -#define COT_MENU 0x001 -#define COT_MENUONE 0x002 -#define COT_ANY_MENU 0x003 // combination of menu flags -#define COT_LONGEST 0x004 // false: insert full match, - // true: insert longest prefix -#define COT_PREVIEW 0x008 -#define COT_POPUP 0x010 -#define COT_ANY_PREVIEW 0x018 // combination of preview flags -#define COT_NOINSERT 0x020 // false: select & insert, true: noinsert -#define COT_NOSELECT 0x040 // false: select & insert, true: noselect -#define COT_FUZZY 0x080 // true: fuzzy match enabled #ifdef BACKSLASH_IN_FILENAME EXTERN char *p_csl; ///< 'completeslash' #endif @@ -410,11 +316,6 @@ EXTERN int p_dg; ///< 'digraph' EXTERN char *p_dir; ///< 'directory' EXTERN char *p_dy; ///< 'display' EXTERN unsigned dy_flags; -#define DY_LASTLINE 0x001 -#define DY_TRUNCATE 0x002 -#define DY_UHEX 0x004 -// legacy flag, not used -#define DY_MSGSEP 0x008 EXTERN char *p_ead; ///< 'eadirection' EXTERN int p_emoji; ///< 'emoji' EXTERN int p_ea; ///< 'equalalways' @@ -442,17 +343,6 @@ EXTERN char *p_fcl; ///< 'foldclose' EXTERN OptInt p_fdls; ///< 'foldlevelstart' EXTERN char *p_fdo; ///< 'foldopen' EXTERN unsigned fdo_flags; -#define FDO_ALL 0x001 -#define FDO_BLOCK 0x002 -#define FDO_HOR 0x004 -#define FDO_MARK 0x008 -#define FDO_PERCENT 0x010 -#define FDO_QUICKFIX 0x020 -#define FDO_SEARCH 0x040 -#define FDO_TAG 0x080 -#define FDO_INSERT 0x100 -#define FDO_UNDO 0x200 -#define FDO_JUMP 0x400 EXTERN char *p_fex; ///< 'formatexpr' EXTERN char *p_flp; ///< 'formatlistpat' EXTERN char *p_fo; ///< 'formatoptions' @@ -488,9 +378,6 @@ EXTERN char *p_isp; ///< 'isprint' EXTERN int p_js; ///< 'joinspaces' EXTERN char *p_jop; ///< 'jumpooptions' EXTERN unsigned jop_flags; -#define JOP_STACK 0x01 -#define JOP_VIEW 0x02 -#define JOP_CLEAN 0x04 EXTERN char *p_keymap; ///< 'keymap' EXTERN char *p_kp; ///< 'keywordprg' EXTERN char *p_km; ///< 'keymodel' @@ -506,7 +393,6 @@ EXTERN char *p_lispwords; ///< 'lispwords' EXTERN OptInt p_ls; ///< 'laststatus' EXTERN OptInt p_stal; ///< 'showtabline' EXTERN char *p_lcs; ///< 'listchars' - EXTERN int p_lz; ///< 'lazyredraw' EXTERN int p_lpl; ///< 'loadplugins' EXTERN int p_magic; ///< 'magic' @@ -520,6 +406,7 @@ EXTERN OptInt p_mfd; ///< 'maxfuncdepth' EXTERN OptInt p_mmd; ///< 'maxmapdepth' EXTERN OptInt p_mmp; ///< 'maxmempattern' EXTERN OptInt p_mis; ///< 'menuitems' +EXTERN char *p_mopt; ///< 'messagesopt' EXTERN char *p_msm; ///< 'mkspellmem' EXTERN int p_ml; ///< 'modeline' EXTERN int p_mle; ///< 'modelineexpr' @@ -536,7 +423,6 @@ EXTERN OptInt p_mousescroll_vert INIT( = MOUSESCROLL_VERT_DFLT); EXTERN OptInt p_mousescroll_hor INIT( = MOUSESCROLL_HOR_DFLT); EXTERN OptInt p_mouset; ///< 'mousetime' EXTERN int p_more; ///< 'more' -EXTERN OptInt p_mhi; ///< 'msghistory' EXTERN char *p_nf; ///< 'nrformats' EXTERN char *p_opfunc; ///< 'operatorfunc' EXTERN char *p_para; ///< 'paragraphs' @@ -551,14 +437,6 @@ EXTERN char *p_qe; ///< 'quoteescape' EXTERN int p_ro; ///< 'readonly' EXTERN char *p_rdb; ///< 'redrawdebug' EXTERN unsigned rdb_flags; -#define RDB_COMPOSITOR 0x001 -#define RDB_NOTHROTTLE 0x002 -#define RDB_INVALID 0x004 -#define RDB_NODELTA 0x008 -#define RDB_LINE 0x010 -#define RDB_FLUSH 0x020 -#define RDB_INTERSECT 0x040 - EXTERN OptInt p_rdt; ///< 'redrawtime' EXTERN OptInt p_re; ///< 'regexpengine' EXTERN OptInt p_report; ///< 'report' @@ -580,26 +458,6 @@ EXTERN char *p_sel; ///< 'selection' EXTERN char *p_slm; ///< 'selectmode' EXTERN char *p_ssop; ///< 'sessionoptions' EXTERN unsigned ssop_flags; - -#define SSOP_BUFFERS 0x001 -#define SSOP_WINPOS 0x002 -#define SSOP_RESIZE 0x004 -#define SSOP_WINSIZE 0x008 -#define SSOP_LOCALOPTIONS 0x010 -#define SSOP_OPTIONS 0x020 -#define SSOP_HELP 0x040 -#define SSOP_BLANK 0x080 -#define SSOP_GLOBALS 0x100 -#define SSOP_SLASH 0x200 // Deprecated, always set. -#define SSOP_UNIX 0x400 // Deprecated, always set. -#define SSOP_SESDIR 0x800 -#define SSOP_CURDIR 0x1000 -#define SSOP_FOLDS 0x2000 -#define SSOP_CURSOR 0x4000 -#define SSOP_TABPAGES 0x8000 -#define SSOP_TERMINAL 0x10000 -#define SSOP_SKIP_RTP 0x20000 - EXTERN char *p_sh; ///< 'shell' EXTERN char *p_shcf; ///< 'shellcmdflag' EXTERN char *p_sp; ///< 'shellpipe' @@ -636,13 +494,6 @@ EXTERN OptInt p_tpm; ///< 'tabpagemax' EXTERN char *p_tal; ///< 'tabline' EXTERN char *p_tpf; ///< 'termpastefilter' EXTERN unsigned tpf_flags; ///< flags from 'termpastefilter' -#define TPF_BS 0x001 -#define TPF_HT 0x002 -#define TPF_FF 0x004 -#define TPF_ESC 0x008 -#define TPF_DEL 0x010 -#define TPF_C0 0x020 -#define TPF_C1 0x040 EXTERN char *p_tfu; ///< 'tagfunc' EXTERN char *p_spc; ///< 'spellcapcheck' EXTERN char *p_spf; ///< 'spellfile' @@ -655,28 +506,14 @@ EXTERN int p_sol; ///< 'startofline' EXTERN char *p_su; ///< 'suffixes' EXTERN char *p_swb; ///< 'switchbuf' EXTERN unsigned swb_flags; -// Keep in sync with p_swb_values in optionstr.c -#define SWB_USEOPEN 0x001 -#define SWB_USETAB 0x002 -#define SWB_SPLIT 0x004 -#define SWB_NEWTAB 0x008 -#define SWB_VSPLIT 0x010 -#define SWB_USELAST 0x020 EXTERN char *p_spk; ///< 'splitkeep' EXTERN char *p_syn; ///< 'syntax' EXTERN char *p_tcl; ///< 'tabclose' EXTERN unsigned tcl_flags; ///< flags from 'tabclose' -#define TCL_LEFT 0x001 -#define TCL_USELAST 0x002 EXTERN OptInt p_ts; ///< 'tabstop' EXTERN int p_tbs; ///< 'tagbsearch' EXTERN char *p_tc; ///< 'tagcase' EXTERN unsigned tc_flags; ///< flags from 'tagcase' -#define TC_FOLLOWIC 0x01 -#define TC_IGNORE 0x02 -#define TC_MATCH 0x04 -#define TC_FOLLOWSCS 0x08 -#define TC_SMART 0x10 EXTERN OptInt p_tl; ///< 'taglength' EXTERN int p_tr; ///< 'tagrelative' EXTERN char *p_tags; ///< 'tags' @@ -708,16 +545,10 @@ EXTERN char *p_vsts; ///< 'varsofttabstop' EXTERN char *p_vts; ///< 'vartabstop' EXTERN char *p_vdir; ///< 'viewdir' EXTERN char *p_vop; ///< 'viewoptions' -EXTERN unsigned vop_flags; ///< uses SSOP_ flags +EXTERN unsigned vop_flags; ///< uses OptSsopFlags EXTERN int p_vb; ///< 'visualbell' EXTERN char *p_ve; ///< 'virtualedit' EXTERN unsigned ve_flags; -#define VE_BLOCK 5U // includes "all" -#define VE_INSERT 6U // includes "all" -#define VE_ALL 4U -#define VE_ONEMORE 8U -#define VE_NONE 16U // "none" -#define VE_NONEU 32U // "NONE" EXTERN OptInt p_verbose; ///< 'verbose' #ifdef IN_OPTION_C char *p_vfile = empty_string_option; ///< used before options are initialized @@ -727,9 +558,6 @@ extern char *p_vfile; ///< 'verbosefile' EXTERN int p_warn; ///< 'warn' EXTERN char *p_wop; ///< 'wildoptions' EXTERN unsigned wop_flags; -#define WOP_FUZZY 0x01 -#define WOP_TAGFILE 0x02 -#define WOP_PUM 0x04 EXTERN OptInt p_window; ///< 'window' EXTERN char *p_wak; ///< 'winaltkeys' EXTERN char *p_wig; ///< 'wildignore' |