neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

main.h (2190B)


      1 #pragma once
      2 
      3 #include <stdbool.h>
      4 
      5 #include "nvim/types_defs.h"
      6 
      7 // Maximum number of commands from + or -c arguments.
      8 #define MAX_ARG_CMDS 10
      9 
     10 extern Loop main_loop;
     11 
     12 // Struct for various parameters passed between main() and other functions.
     13 typedef struct {
     14  int argc;
     15  char **argv;
     16 
     17  char *use_vimrc;                      // vimrc from -u argument
     18  bool clean;                           // --clean argument
     19 
     20  int n_commands;                       // no. of commands from + or -c
     21  char *commands[MAX_ARG_CMDS];         // commands from + or -c arg
     22  char cmds_tofree[MAX_ARG_CMDS];       // commands that need free()
     23  int n_pre_commands;                   // no. of commands from --cmd
     24  char *pre_commands[MAX_ARG_CMDS];     // commands from --cmd argument
     25  char *luaf;                           // Lua script filename from "-l"
     26  int lua_arg0;                         // Lua script args start index.
     27 
     28  int edit_type;                        // type of editing to do
     29  char *tagname;                        // tag from -t argument
     30  char *use_ef;                         // 'errorfile' from -q argument
     31 
     32  bool input_istext;                    // stdin is text, not executable (-E/-Es)
     33 
     34  int no_swap_file;                     // "-n" argument used
     35  int use_debug_break_level;
     36  int window_count;                     // number of windows to use
     37  int window_layout;                    // 0, WIN_HOR, WIN_VER or WIN_TABS
     38 
     39  int diff_mode;                        // start with 'diff' set
     40 
     41  char *listen_addr;                    // --listen {address}
     42  int remote;                           // --remote-[subcmd] {file1} {file2}
     43  char *server_addr;                    // --server {address}
     44  char *scriptin;                       // -s {filename}
     45  char *scriptout;                      // -w/-W {filename}
     46  bool scriptout_append;                // append (-w) instead of overwrite (-W)
     47  bool had_stdin_file;                  // explicit - as a file to edit
     48 } mparm_T;
     49 
     50 #if defined(MSWIN) && !defined(ENABLE_ASAN_UBSAN)
     51 # define __asan_default_options vim__asan_default_options
     52 # define __ubsan_default_options vim__ubsan_default_options
     53 #endif
     54 
     55 #include "main.h.generated.h"