@herb-tools/language-server 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +45 -7
- package/bin/herb-language-server +19 -0
- package/dist/herb-language-server.js +1 -1
- package/dist/herb-language-server.js.map +1 -1
- package/package.json +22 -7
- package/src/config.ts +101 -0
- package/src/diagnostics.ts +116 -0
- package/src/document_service.ts +35 -0
- package/src/project.ts +20 -0
- package/src/server.ts +93 -0
- package/src/service.ts +51 -0
- package/src/settings.ts +63 -0
- package/src/utils.ts +11 -0
- package/dist/herb-language-server +0 -20526
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## 0.3.1 (2025-06-23)
|
|
2
|
+
|
|
3
|
+
This was a version bump only for @herb-tools/language-server to align it with other projects, there were no code changes.
|
|
4
|
+
|
|
1
5
|
## 0.3.0 (2025-06-21)
|
|
2
6
|
|
|
3
7
|
This was a version bump only for @herb-tools/language-server to align it with other projects, there were no code changes.
|
package/README.md
CHANGED
|
@@ -1,22 +1,52 @@
|
|
|
1
|
-
|
|
1
|
+
## Herb Language Server
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
##### Package: [`@herb-tools/language-server`](https://www.npmjs.com/package/@herb-tools/language-server)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[Language Server Protocol](https://github.com/Microsoft/language-server-protocol) integration for HTML-aware ERB parsing using the [Herb Parser](https://herb-tools.dev).
|
|
4
8
|
|
|
5
9
|

|
|
6
10
|
|
|
7
|
-
|
|
11
|
+
### Installation
|
|
12
|
+
|
|
13
|
+
#### Visual Studio Code
|
|
14
|
+
|
|
15
|
+
Install the [Herb LSP extension](https://marketplace.visualstudio.com/items?itemName=marcoroth.herb-lsp) from the Visual Studio Marketplace.
|
|
16
|
+
|
|
17
|
+
#### Cursor (Open VSX Registry)
|
|
18
|
+
|
|
19
|
+
Install the [Herb LSP extension](https://open-vsx.org/extension/marcoroth/herb-lsp) from the Open VSX Registry.
|
|
20
|
+
|
|
21
|
+
#### Zed
|
|
22
|
+
|
|
23
|
+
The Herb Language Server is part of the official [Ruby extension for Zed](https://github.com/zed-extensions/ruby). Just install the Ruby extension in Zed and you should be good to go.
|
|
24
|
+
|
|
25
|
+
Read more in the [documentation](https://zed.dev/docs/languages/ruby).
|
|
26
|
+
|
|
27
|
+
#### Neovim (using `nvim-lspconfig`)
|
|
8
28
|
|
|
9
|
-
|
|
29
|
+
Coming soon, see [#3925](https://github.com/neovim/nvim-lspconfig/pull/3925).
|
|
30
|
+
|
|
31
|
+
#### Manual Installation
|
|
32
|
+
|
|
33
|
+
You can use the language server in any editor that supports the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/).
|
|
34
|
+
|
|
35
|
+
##### Install
|
|
36
|
+
|
|
37
|
+
###### NPM (Global)
|
|
10
38
|
|
|
11
39
|
```bash
|
|
12
|
-
npm install -g herb-language-server
|
|
40
|
+
npm install -g @herb-tools/language-server
|
|
13
41
|
```
|
|
14
42
|
|
|
43
|
+
###### Yarn (Global)
|
|
44
|
+
|
|
15
45
|
```bash
|
|
16
|
-
yarn global add herb-language-server
|
|
46
|
+
yarn global add @herb-tools/language-server
|
|
17
47
|
```
|
|
18
48
|
|
|
19
|
-
|
|
49
|
+
##### Run
|
|
20
50
|
|
|
21
51
|
```bash
|
|
22
52
|
herb-language-server --stdio
|
|
@@ -31,3 +61,11 @@ Options:
|
|
|
31
61
|
--node-ipc use node-ipc
|
|
32
62
|
--socket=<port> use socket
|
|
33
63
|
```
|
|
64
|
+
|
|
65
|
+
##### NPX
|
|
66
|
+
|
|
67
|
+
Alternatively you can also run the language server directly with `npx` without installing anything:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npx @herb-tools/language-server --stdio
|
|
71
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const usage = `
|
|
4
|
+
Usage: herb-language-server [options]
|
|
5
|
+
|
|
6
|
+
Options:
|
|
7
|
+
--stdio use stdio
|
|
8
|
+
--node-ipc use node-ipc
|
|
9
|
+
--socket=<port> use socket
|
|
10
|
+
`
|
|
11
|
+
|
|
12
|
+
if (process.argv.length <= 2) {
|
|
13
|
+
console.error(`Error: Connection input stream is not set. Set command line parameters: '--node-ipc', '--stdio' or '--socket=<port>'`)
|
|
14
|
+
console.error(usage)
|
|
15
|
+
|
|
16
|
+
process.exit(1)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
import("../dist/herb-language-server.js")
|
|
@@ -20342,7 +20342,7 @@ class Diagnostics {
|
|
|
20342
20342
|
}
|
|
20343
20343
|
}
|
|
20344
20344
|
|
|
20345
|
-
var version = "0.3.
|
|
20345
|
+
var version = "0.3.1";
|
|
20346
20346
|
|
|
20347
20347
|
class Config {
|
|
20348
20348
|
constructor(projectPath, config) {
|