Skip to content

Commit c228761

Browse files
committed
install from cargo
1 parent 0ccc00b commit c228761

File tree

4 files changed

+72
-2
lines changed

4 files changed

+72
-2
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ jobs:
3434
submodules: recursive
3535
- name: Install Rust toolchain
3636
uses: dtolnay/rust-toolchain@stable
37+
- name: edit version
38+
if: startsWith(github.ref, 'refs/tags/')
39+
run: |
40+
echo "current ref ${{ github.ref }}"
41+
cargo run -p edit_version -- ${{ github.ref }}
3742
- name: Build - General
3843
if: ${{ matrix.cross == 'general' }}
3944
run: |
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Upload Crates
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
upload:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
submodules: recursive
15+
- name: Install Rust toolchain
16+
uses: dtolnay/rust-toolchain@stable
17+
18+
- name: Set version
19+
run: |
20+
echo "current ref ${{ github.ref }}""
21+
cargo run -p edit_version -- ${{ github.ref }}
22+
- name: Publish
23+
run: |
24+
cd crates/emmylua_code_analysis
25+
cargo publish
26+
cd ../emmylua_ls
27+
cargo publish
28+
cd ../emmylua_doc_cli
29+
cargo publish
30+
env:
31+
CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }}

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# CHANGELOG
22

3-
# 0.4.1 (unreleased)
3+
# 0.4.2(unreleased)
4+
5+
# 0.4.1
6+
7+
`NEW` all the crates release to crates.io. now you can get `emmylua_parser`, `emmylua_code_analysis`, `emmylua_ls`, `emmylua_doc_cli` from crates.io.
8+
```shell
9+
cargo install emmylua_ls
10+
cargo install emmylua_doc_cli
11+
```
412

513
# 0.4.0
614

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,32 @@ We welcome your feedback and contributions. Please feel free to submit pull requ
2121
- [Emmyrc Config](./docs/config/emmyrc_json_EN.md)
2222
- [Formatting Config](https://github.com/CppCXY/EmmyLuaCodeStyle/blob/master/README_EN.md)
2323

24+
## Install
25+
26+
if you want to install emmylua_ls and emmylua_doc_cli, you can use the following command:
27+
```shell
28+
# install emmylua_ls
29+
cargo install emmylua_ls
30+
# install emmylua_doc_cli
31+
cargo install emmylua_doc_cli
32+
```
33+
34+
if you are using vscode, you can install the vscode extension [EmmyLua](https://marketplace.visualstudio.com/items?itemName=tangzx.emmylua) to get a better experience.
35+
36+
## Usage
37+
38+
### emmylua_ls
39+
40+
If you have installed emmylua_ls using cargo install, you can simply run emmylua_ls to start the language server without any additional parameters.
41+
42+
### emmylua_doc_cli
43+
44+
If you have installed emmylua_doc_cli using cargo install, you can simply run emmylua_doc_cli to generate documentation. You can use the --input parameter to specify the directory of Lua files and the --output parameter to specify the output directory for the generated documentation.
45+
46+
```shell
47+
emmylua_doc_cli --input ./tests/lua --output ./tests/doc
48+
```
49+
2450
## Build
2551

2652
```shell
@@ -29,7 +55,7 @@ cargo build --release -p emmylua_ls
2955

3056
## Develop
3157

32-
The language service supports both stdio and TCP communication, with stdio communication as the default. It has several startup parameters:
58+
The language server supports both stdio and TCP communication, with stdio communication as the default. It has several startup parameters:
3359
- `-c` specifies the communication method. Acceptable values are `stdio` and `tcp`, with the default being `stdio`.
3460
- `--port` When the `-c` parameter is set to `tcp`, the `--port` parameter can specify the port number, with the default value of `5007`.
3561
- `--log-level` specifies the log level. Acceptable values are `debug`, `info`, `warn`, `error`, with the default being `info`.

0 commit comments

Comments
 (0)