Skip to content

Commit cd3e634

Browse files
committed
add some develop guide
1 parent 7a0ded8 commit cd3e634

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
# 0.3.3 (unreleased)
44

5+
`NEW` Add Develop Guide
6+
57
`NEW` support `workspace/didChangeConfiguration` notification for neovim
68

79
# 0.3.2

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,25 @@ We welcome your feedback and contributions. Please feel free to submit pull requ
2727
cargo build --release -p emmylua_ls
2828
```
2929

30+
## Develop
31+
32+
The language service supports both stdio and TCP communication, with stdio communication as the default. It has several startup parameters:
33+
- `-c` specifies the communication method. Acceptable values are `stdio` and `tcp`, with the default being `stdio`.
34+
- `--port` When the `-c` parameter is set to `tcp`, the `--port` parameter can specify the port number, with the default value of `5007`.
35+
- `--log-level` specifies the log level. Acceptable values are `debug`, `info`, `warn`, `error`, with the default being `info`.
36+
- `--log-path` specifies the directory path for the log files.
37+
38+
For example:
39+
40+
```shell
41+
emmylua_ls -c tcp --port 5007 --log-level debug
42+
# Without parameters, it uses stdio communication
43+
emmylua_ls
44+
```
45+
46+
However, having only the executable is not enough. It needs to load some resource files, which are located in the project's `resources` directory. By default, it will first look for the `resources` directory in the current directory or its parent directories. Alternatively, you can specify the path to the resources directory through the `EMMYLUA_LS_RESOURCES` environment variable.
47+
48+
3049
## License
3150

3251
[MIT](./LICENSE)

0 commit comments

Comments
 (0)