robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
1787965d77
master
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 13typedef struct { 14char * uc_name ;///< The command name 15uint32_t uc_argt ;///< The argument type 16char * uc_rep ;///< The command's replacement string 17int64_t uc_def ;///< The default value for a range/count 18int uc_compl ;///< completion type 19cmd_addr_T uc_addr_type ;///< The command's address type 20sctx_T uc_script_ctx ;///< SCTX where the command was defined 21char * uc_compl_arg ;///< completion argument if any 22LuaRef uc_compl_luaref ;///< Reference to Lua completion function 23LuaRef uc_preview_luaref ;///< Reference to Lua preview function 24LuaRef uc_luaref ;///< Reference to Lua function 25char * uc_desc ;///< Command description 26}ucmd_T ; 27 28enum {UC_BUFFER = 1 , };///< -buffer: local to current buffer 29 30extern garray_T ucmds ; 31 32#define USER_CMD (i ) (&((ucmd_T *)(ucmds.ga_data))[i]) 33#define USER_CMD_GA (gap ,i ) (&((ucmd_T *)((gap)->ga_data))[i]) 34 35#include "usercmd.h.generated.h"