@likec4/lsp 1.53.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023-2026 Denis Davydkov
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,89 @@
1
+ # `@likec4/lsp`
2
+
3
+ Standalone [LikeC4](https://likec4.dev) Language Server for third-party editor integrations.
4
+
5
+ Self-contained, fully-bundled CommonJS binary with **zero runtime dependencies**.
6
+ Works with Neovim, Zed, JetBrains, Helix, and any editor that supports LSP.
7
+
8
+ [Documentation](https://likec4.dev/tooling/editors/)
9
+
10
+ ## Installation
11
+
12
+ ```sh
13
+ npm install -g @likec4/lsp
14
+ ```
15
+
16
+ ## Usage
17
+
18
+ The `likec4-lsp` binary auto-detects transport from command-line arguments:
19
+
20
+ ```sh
21
+ likec4-lsp --stdio
22
+ likec4-lsp --node-ipc
23
+ likec4-lsp --socket=<port>
24
+ likec4-lsp --pipe=<name>
25
+ ```
26
+
27
+ ### Neovim
28
+
29
+ With [likec4.nvim](https://github.com/likec4/likec4.nvim):
30
+
31
+ ```lua
32
+ {
33
+ 'likec4/likec4.nvim',
34
+ build = 'npm install -g @likec4/lsp'
35
+ }
36
+ ```
37
+
38
+ ### Emacs
39
+
40
+ Use with [lsp-mode](https://emacs-lsp.github.io/lsp-mode/) or [eglot](https://github.com/joaotavora/eglot):
41
+
42
+ ```elisp
43
+ ;; eglot
44
+ (add-to-list 'eglot-server-programs
45
+ '((likec4-mode) . ("likec4-lsp" "--stdio")))
46
+ ```
47
+
48
+ See [#2268](https://github.com/likec4/likec4/issues/2268) for discussion on Emacs support.
49
+
50
+ ### Zed
51
+
52
+ See [zed-likec4](https://github.com/Lenivvenil/zed-likec4).
53
+
54
+ ## Programmatic API
55
+
56
+ ```javascript
57
+ const { startStandaloneLsp } = require('@likec4/lsp')
58
+
59
+ startStandaloneLsp({
60
+ loggerOptions: {
61
+ logLevel: 'debug',
62
+ },
63
+ })
64
+ ```
65
+
66
+ ## Getting help
67
+
68
+ We are always happy to help you get started:
69
+
70
+ - [Join Discord community](https://discord.gg/86ZSpjKAdA) – it is the easiest way to get help
71
+ - [GitHub Discussions](https://github.com/likec4/likec4/discussions) – ask anything about the project or give feedback
72
+
73
+ ## Contributors
74
+
75
+ <a href="https://github.com/likec4/likec4/graphs/contributors">
76
+ <img src="https://contrib.rocks/image?repo=likec4/likec4" />
77
+ </a>
78
+
79
+ [Become a contributor](../../CONTRIBUTING.md)
80
+
81
+ ## Support development
82
+
83
+ LikeC4 is a MIT-licensed open source project with its ongoing development made possible entirely by your support.\
84
+ If you like the project, please consider contributing financially to help grow and improve it.\
85
+ You can support us via [OpenCollective](https://opencollective.com/likec4) or [GitHub Sponsors](https://github.com/sponsors/likec4).
86
+
87
+ ## License
88
+
89
+ This project is released under the [MIT License](LICENSE)
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { startStandaloneLsp } from '../dist/standalone.mjs'
4
+ startStandaloneLsp()
@@ -0,0 +1 @@
1
+ import{createRequire as e}from"node:module";var t=Object.create,n=Object.defineProperty,__name=(e,t)=>n(e,`name`,{value:t,configurable:!0}),r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,__esmMin=(e,t)=>()=>(e&&(t=e(e=0)),t),__commonJSMin=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),__exportAll=(e,t)=>{let r={};for(var i in e)n(r,i,{get:e[i],enumerable:!0});return t||n(r,Symbol.toStringTag,{value:`Module`}),r},__copyProps=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},__reExport=(e,t,n)=>(__copyProps(e,t,`default`),n&&__copyProps(n,t,`default`)),__toESM=(e,r,i)=>(i=e==null?{}:t(a(e)),__copyProps(r||!e||!e.__esModule?n(i,`default`,{value:e,enumerable:!0}):i,e)),__toCommonJS=e=>o.call(e,`module.exports`)?e[`module.exports`]:__copyProps(n({},`__esModule`,{value:!0}),e),s=e(import.meta.url);export{__reExport as a,__toESM as c,__name as i,__esmMin as n,s as o,__exportAll as r,__toCommonJS as s,__commonJSMin as t};
@@ -0,0 +1,49 @@
1
+ import { i as __name } from "./chunk-CY3skOUf.mjs";
2
+
3
+ //#region src/standalone.d.ts
4
+ interface StandaloneLspOptions {
5
+ /**
6
+ * Whether to enable file system watching.
7
+ * @default false
8
+ */
9
+ enableWatcher?: boolean;
10
+ /**
11
+ * Options for configuring the language server logger.
12
+ * By default, logs are sent to stderr to avoid corrupting LSP protocol on stdout.
13
+ */
14
+ loggerOptions?: {
15
+ /**
16
+ * Whether to use stderr for logging instead of stdout.
17
+ * @default true
18
+ */
19
+ useStdErr?: boolean;
20
+ /**
21
+ * The log level to use.
22
+ * @default 'info'
23
+ */
24
+ logLevel?: 'trace' | 'debug' | 'info' | 'warning' | 'error' | undefined;
25
+ /**
26
+ * @default false
27
+ */
28
+ enableTelemetry?: boolean;
29
+ /**
30
+ * Enable non-blocking logging (async).
31
+ * @default false
32
+ */
33
+ nonBlocking?: boolean;
34
+ /**
35
+ * Whether to use colors in logging.
36
+ * @default false
37
+ */
38
+ colors?: boolean;
39
+ };
40
+ }
41
+ /**
42
+ * Start the LikeC4 standalone language server.
43
+ *
44
+ * Transport is auto-detected from process.argv:
45
+ * --stdio, --node-ipc, --socket=<port>, --pipe=<name>
46
+ */
47
+ declare function startStandaloneLsp(options?: StandaloneLspOptions): void;
48
+ //#endregion
49
+ export { StandaloneLspOptions, startStandaloneLsp };