neovim

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

usercmd.h (1263B)


      1 #pragma once
      2 
      3 #include <stddef.h>  // IWYU pragma: keep
      4 #include <stdint.h>
      5 
      6 #include "nvim/api/private/defs.h"  // IWYU pragma: keep
      7 #include "nvim/cmdexpand_defs.h"  // IWYU pragma: keep
      8 #include "nvim/eval/typval_defs.h"
      9 #include "nvim/ex_cmds_defs.h"
     10 #include "nvim/garray_defs.h"
     11 #include "nvim/types_defs.h"
     12 
     13 typedef struct {
     14  char *uc_name;             ///< The command name
     15  uint32_t uc_argt;          ///< The argument type
     16  char *uc_rep;              ///< The command's replacement string
     17  int64_t uc_def;            ///< The default value for a range/count
     18  int uc_compl;              ///< completion type
     19  cmd_addr_T uc_addr_type;   ///< The command's address type
     20  sctx_T uc_script_ctx;      ///< SCTX where the command was defined
     21  char *uc_compl_arg;        ///< completion argument if any
     22  LuaRef uc_compl_luaref;    ///< Reference to Lua completion function
     23  LuaRef uc_preview_luaref;  ///< Reference to Lua preview function
     24  LuaRef uc_luaref;          ///< Reference to Lua function
     25 } ucmd_T;
     26 
     27 enum { UC_BUFFER = 1, };  ///< -buffer: local to current buffer
     28 
     29 extern garray_T ucmds;
     30 
     31 #define USER_CMD(i) (&((ucmd_T *)(ucmds.ga_data))[i])
     32 #define USER_CMD_GA(gap, i) (&((ucmd_T *)((gap)->ga_data))[i])
     33 
     34 #include "usercmd.h.generated.h"