Skip to content

Commit 823e1f4

Browse files
committed
Moved over from mads-hartmann/random
1 parent e6823d5 commit 823e1f4

19 files changed

+4492
-2
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
**/node_modules
2+
3+
vscode-client/out
4+
vscode-client/server

.vscode/launch.json

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Launch Client",
6+
"type": "extensionHost",
7+
"request": "launch",
8+
"runtimeExecutable": "${execPath}",
9+
"args": [
10+
"--extensionDevelopmentPath=${workspaceRoot}/vscode-client"
11+
],
12+
"stopOnEntry": false,
13+
"sourceMaps": true,
14+
"outFiles": [
15+
"${workspaceRoot}/vscode-client/out/**/*.js"
16+
],
17+
"preLaunchTask": "watch:client"
18+
},
19+
{
20+
"name": "Attach to Server",
21+
"type": "node",
22+
"request": "attach",
23+
"port": 6009,
24+
"sourceMaps": true,
25+
"outFiles": [
26+
"${workspaceRoot}/vscode-client/server/**/*.js"
27+
],
28+
"preLaunchTask": "watch:server"
29+
}
30+
]
31+
}

.vscode/settings.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"files.exclude": {
3+
"out": false // set this to true to hide the "out" folder with the compiled JS files
4+
},
5+
"search.exclude": {
6+
"out": true // set this to false to include "out" folder in search results
7+
},
8+
"typescript.tsdk": "./node_modules/typescript/lib",
9+
"typescript.tsc.autoDetect": "off"
10+
}

.vscode/tasks.json

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"taskName": "compile",
6+
"dependsOn": [
7+
"compile:client",
8+
"compile:server"
9+
],
10+
"problemMatcher": []
11+
},
12+
{
13+
"label": "compile:client",
14+
"type": "npm",
15+
"script": "compile:client",
16+
"group": "build",
17+
"presentation": {
18+
"panel": "dedicated",
19+
"reveal": "never"
20+
},
21+
"problemMatcher": [
22+
"$tsc"
23+
]
24+
},
25+
{
26+
"label": "compile:server",
27+
"type": "npm",
28+
"script": "compile:server",
29+
"group": "build",
30+
"presentation": {
31+
"panel": "dedicated",
32+
"reveal": "never"
33+
},
34+
"problemMatcher": [
35+
"$tsc"
36+
]
37+
},
38+
{
39+
"taskName": "watch",
40+
"dependsOn": [
41+
"watch:client",
42+
"watch:server"
43+
],
44+
"group": {
45+
"kind": "build",
46+
"isDefault": true
47+
},
48+
"problemMatcher": []
49+
},
50+
{
51+
"label": "watch:client",
52+
"type": "npm",
53+
"script": "watch:client",
54+
"isBackground": true,
55+
"group": "build",
56+
"presentation": {
57+
"panel": "dedicated",
58+
"reveal": "never"
59+
},
60+
"problemMatcher": [
61+
"$tsc-watch"
62+
]
63+
},
64+
{
65+
"label": "watch:server",
66+
"type": "npm",
67+
"script": "watch:server",
68+
"isBackground": true,
69+
"group": "build",
70+
"presentation": {
71+
"panel": "dedicated",
72+
"reveal": "never"
73+
},
74+
"problemMatcher": [
75+
"$tsc-watch"
76+
]
77+
}
78+
]
79+
}

README.md

+23-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,23 @@
1-
# bash-language-server
2-
A language server for Bash
1+
# Bash Language Server
2+
3+
Bash language server implementation based on the [Tree Sitter][tree-sitter]
4+
[grammar for Bash][tree-sitter-bash]
5+
6+
## How to run locally
7+
8+
Install the dependencies:
9+
10+
npm install
11+
12+
Compile the server and vscode extension
13+
14+
npm run compile
15+
16+
Continuously compile the server using
17+
18+
npm run watch:server
19+
20+
Launch the extension using `Launch Client` from within vscode.
21+
22+
[tree-sitter]: https://github.com/tree-sitter/tree-sitter
23+
[tree-sitter-bash]: https://github.com/tree-sitter/tree-sitter-bash

TODO.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# TODO
2+
3+
- [ ] Parse all files in the repo on init
4+
- [ ] Perform incremental updates instead
5+
- [ ] Maybe just use an index of identifier => uri and then run through the AST
6+
in those files on every search? That would be less state and I doubt people
7+
have HUGE bash files.
8+
- [x] Jump to definition (in file)
9+
- [x] Jump to definition (in project)
10+
- [ ] Look up man pages / --help to show inline help

0 commit comments

Comments
 (0)