Skip to content

Commit 52d96f0

Browse files
committed
updated README
1 parent 287e8ba commit 52d96f0

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

Diff for: README.md

+16-8
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,28 @@ go test -v ./...
6262
```
6363
## Usage
6464

65-
To run the Arduino Language Server you need:
65+
The language server it's not intended for direct usage by humans via the command line terminal.
66+
The purpose of this program is to provide C++/.ino language-related functionality to the IDEs so, in general, it's the IDE that talks to the language server via stdin/stdout using the slightly modified JSONRPC protocol defined in the LSP specification.
67+
68+
The prerequisites to run the Arduino Language Server are:
6669

6770
- [Arduino CLI](https://github.com/arduino/arduino-cli)
71+
- [clangd](we suggest the builds here https://github.com/clangd/clangd/releases)
6872

69-
After building, call:
73+
To start the language server the IDE must provide the path to Arduino CLI and clangd with the following flags in addition to the target board FQBN:
7074

7175
```
72-
./arduino-language-server -cli-config <path-to-cli-config>
73-
```
74-
For example:
75-
```
76-
./arduino-language-server -cli-config $HOME/.arduino15/arduino-cli.yaml
76+
./arduino-language-server \
77+
-clangd /usr/local/bin/clangd \
78+
-cli /usr/local/bin/arduino-cli \
79+
-cli-config $HOME/.arduino15/arduino-cli.yaml \
80+
-fqbn arduino:mbed:nanorp2040connect
7781
```
78-
Note: If you do not have an Arduino CLI config file, you can create one by running:
82+
83+
The -fqbn flag represents the board you're actually working on (different boards may implement different features/API, if you change board you need to restart the language server with another fqbn).
84+
The support for the board must be installed with the `arduino-cli core install ...` command before starting the language server.
85+
86+
If you do not have an Arduino CLI config file, you can create one by running:
7987
```
8088
arduino-cli config init
8189
```

0 commit comments

Comments
 (0)