-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.h
41 lines (36 loc) · 1013 Bytes
/
config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include "cJSON.h"
#include <stdbool.h>
#include <sys/types.h>
#ifndef CONFIG_H_INCLUDED
#define CONFIG_H_INCLUDED
// CLI stuff
#define SERVER_NAME "frls"
#define FRLS_VERSION "0.0.1"
#define HELP_MESSAGE \
"\n\
OVERVIEW: Fast Ruby Language Server\n\
\n\
See more on https://github.com/k0va1/frls\n\
USAGE: frls [options]\n\
\n\
OPTIONS:\n\
--help, -h - Display available options\n\
--version, -v - Display the version of this program\n\
--host - Specify host(default: 127.0.0.1)\n\
--port - Specify port(default: 1488)\n\
"
#define HOST "127.0.0.1"
#define PORT 1488
typedef struct {
uint port;
uint client_process_id;
char *host;
char *project_root;
char *client_name;
char *client_version;
cJSON *client_capabilities;
} Config;
Config *create_config(int argc, char *argv[]);
void destroy_config(Config *config);
void print_config(Config *config);
#endif