Skip to content

Commit e82833c

Browse files
committed
Update the development guide
1 parent a2ed4fd commit e82833c

File tree

2 files changed

+31
-25
lines changed

2 files changed

+31
-25
lines changed

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ Bash language server implementation based on [Tree Sitter][tree-sitter] and its
1818
Currently the client has only been implemented for Visual Studio Code. You can
1919
install it from the marketplace - It's called [Bash IDE][vscode-marketplace].
2020

21-
**prerequisite:** The extension is using [node-gyp][node-gyp] to build the Bash
22-
tree-sitter parser. See node-gyps [system requirements][node-gyp-installation].
23-
2421
## Development Guide
2522

2623
Please see [docs/development-guide][dev-guide] for more information.
@@ -29,4 +26,3 @@ Please see [docs/development-guide][dev-guide] for more information.
2926
[tree-sitter-bash]: https://github.com/tree-sitter/tree-sitter-bash
3027
[vscode-marketplace]: https://marketplace.visualstudio.com/items?itemName=mads-hartmann.bash-ide-vscode
3128
[dev-guide]: https://github.com/mads-hartmann/bash-language-server/blob/master/docs/development-guide.md
32-
[node-gyp-installation]: https://github.com/nodejs/node-gyp#installation

docs/development-guide.md

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,58 @@
11
# Development guide
22

3-
**Note:** This is outdated until I figure out how to distribute this extension
4-
in a way that actually works on other peoples computers.
5-
6-
This guide will help you set up your local development environment.
7-
83
There are two moving parts.
94

105
- **Server**: A node server written in Typescript that implements the
11-
[Language Server Protocol (LSP)][lsp].
12-
- **Client**: A super tiny vscode extension which basically just tells vscode
13-
how to launch the LSP server.
6+
[Language Server Protocol (LSP)][LSP].
7+
8+
- **Client**: A super tiny Visual Studio Code (vscode) extension which basically
9+
just tells vscode how to launch the LSP server.
1410

1511
The project has a root `package.json` file which is really just there for
1612
convenience - it proxies to the `package.json` files in the `vscode-client` and
1713
`server` folders.
1814

19-
To **install all the required dependencies** run
15+
## Initial setup
16+
17+
Run the following in the root of the project
2018

2119
```
2220
npm install
2321
```
2422

2523
This uses the `postinstall` hook to install the dependencies in each of the
26-
sub-projects as well as using [npm link][npm-link] to get your local client to
27-
use your local version of the server.
24+
sub-projects.
2825

29-
To **compile everything** run
26+
To make sure that everything is configured correctly run the following command
27+
to compile both the client and the server once
3028

3129
```
3230
npm run compile
3331
```
3432

35-
Now, as most of the interesting things are happening in the server you'll probably want to
36-
re-compile it whenever you make a change to any of the source files:
33+
Now, depending on which part you want to work on follow the relevant section
34+
below.
35+
36+
## Working on the client
37+
38+
Working on the client is simply a matter of starting vscode and using the Debug
39+
View to launch the `Launch Client` task. This will open a new vscode window with the
40+
extension loaded. It also looks for changes to your client code and recompiles
41+
it whenever you save your changes.
42+
43+
## Working on the server
44+
45+
The easiest way right now is to simple compile and install the server globally
46+
whenever you've made a change, and then reload you vscode window to re-launch
47+
the server.
3748

3849
```
39-
npm run watch:server
50+
cd server
51+
npm run compile
52+
npm i -g .
53+
# Reload vscode window.
4054
```
4155

42-
Finally Launch the extension using `Launch Client` task from within vscode. For
43-
now you'll have to re-launch the extension whenever you've made any changes to
44-
the source.
56+
I'm open to suggestions on how to improve this workflow.
4557

46-
[lsp]: https://microsoft.github.io/language-server-protocol/
47-
[node-gyp]: https://github.com/nodejs/node-gyp
48-
[npm-link]: https://docs.npmjs.com/cli/link
58+
[LSP]: https://microsoft.github.io/language-server-protocol/

0 commit comments

Comments
 (0)