Files
beluga/include/define.h
T
2026-06-03 14:09:01 +02:00

57 lines
1.1 KiB
C

#ifndef DEFINE_H_
#define DEFINE_H_
#define CTRL_KEY(k) ((k) & 0x1f)
#define ALT(k) ((k) | 0x200) // set bit 9 to mark as Option combo
#define ESCAPE '\x1b'
#define CURSOR_TOP_LEFT "\x1b[H"
#define HIDE_CURSOR "\x1b[?25l"
#define SHOW_CURSOR "\x1b[?25h"
#define ERASE_END_LINE "\x1b[K"
#define TAB "\t"
#define SPACE "\x20"
#ifndef PATH_MAX
#define PATH_MAX 1024
#endif
/* Uncomment to see debug logs on stderr */
#define APP_DEBUG
#define COMPLETION_MAX_ITEMS 16
#define COMPLETION_MAX_WIDTH 40
#define COMPLETION_POPUP_H 8 // max visible rows
#define DIAG_MAX 128
#define GUTTER_WIDTH 2
enum editorKey_e {
BACKSPACE = 127,
ARROW_LEFT = 1000,
ARROW_RIGHT,
ARROW_UP,
ARROW_DOWN,
DEL_KEY,
BEG_LINE,
END_LINE,
PAGE_UP,
PAGE_DOWN,
LSP_WAKE_KEY = 2000
};
#define ABUF_INIT {NULL, 0}
#define BELUGA_VERSION "2.4"
#ifdef __APPLE__
#define CLIPBOARD_COPY_CMD "pbcopy"
#define CLIPBOARD_PASTE_CMD "pbpaste"
#else
#define CLIPBOARD_COPY_CMD "xclip -selection clipboard"
#define CLIPBOARD_PASTE_CMD "xclip -selection clipboard -o"
#endif
#endif // DEFINE_H_