@prisma/language-server 31.0.8044 → 31.1.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/CONTRIBUTING.md +31 -26
- package/README.md +35 -6
- package/package.json +1 -1
package/CONTRIBUTING.md
CHANGED
|
@@ -1,37 +1,42 @@
|
|
|
1
|
-
# Contributing
|
|
2
|
-
|
|
3
|
-
##
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
# Contributing to Prisma Language Server
|
|
2
|
+
|
|
3
|
+
## Getting Started
|
|
4
|
+
|
|
5
|
+
See the [Development Guide](../../docs/development.md) for setup instructions.
|
|
6
|
+
|
|
7
|
+
Quick start:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install && npm run bootstrap
|
|
11
|
+
npm run watch
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Then press `F5` in VS Code → **Launch VS Code extension**.
|
|
15
|
+
|
|
16
|
+
To debug the language server, also run **Attach to Server**.
|
|
16
17
|
|
|
17
18
|
## Testing
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
See the [Testing Guide](../../docs/testing.md) for patterns and helpers.
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
|
|
22
|
+
```bash
|
|
23
|
+
cd packages/language-server
|
|
24
|
+
npm test
|
|
25
|
+
```
|
|
24
26
|
|
|
25
27
|
## Publishing
|
|
26
28
|
|
|
27
|
-
The
|
|
29
|
+
The language server is automatically published to npm via GitHub Actions.
|
|
30
|
+
See [CI/CD](../../docs/ci-cd.md) for workflow details.
|
|
28
31
|
|
|
29
|
-
## Nix
|
|
32
|
+
## Nix Users
|
|
30
33
|
|
|
31
|
-
The flake in this repository
|
|
34
|
+
The flake in this repository includes a language server package:
|
|
32
35
|
|
|
33
|
-
|
|
34
|
-
|
|
36
|
+
```bash
|
|
37
|
+
# Build the language server
|
|
38
|
+
nix build .#prisma-language-server
|
|
35
39
|
|
|
36
|
-
Run
|
|
37
|
-
|
|
40
|
+
# Run directly
|
|
41
|
+
nix run .#prisma-language-server -- --stdio
|
|
42
|
+
```
|
package/README.md
CHANGED
|
@@ -1,19 +1,48 @@
|
|
|
1
1
|
# Prisma Language Server
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
The Prisma Language Server implements the
|
|
4
|
+
[Language Server Protocol (LSP)](https://microsoft.github.io/language-server-protocol/)
|
|
5
|
+
to provide IDE features for Prisma schema files (`.prisma`).
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
|
-
```
|
|
9
|
+
```bash
|
|
10
10
|
npm install -g @prisma/language-server
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Run via stdio (for editor integration)
|
|
17
|
+
prisma-language-server --stdio
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Features
|
|
21
|
+
|
|
22
|
+
- **Diagnostics** — Real-time error and warning highlighting
|
|
23
|
+
- **Completions** — Context-aware suggestions for keywords, types, attributes
|
|
24
|
+
- **Hover** — Documentation on hover for models, fields, attributes
|
|
25
|
+
- **Go to Definition** — Jump to model/enum definitions
|
|
26
|
+
- **Document Formatting** — Format `.prisma` files
|
|
27
|
+
- **Code Actions** — Quick fixes for common issues
|
|
28
|
+
- **Rename** — Rename models, enums, fields with automatic `@map` handling
|
|
29
|
+
- **Document Symbols** — Outline view of models, enums, generators
|
|
30
|
+
- **References** — Find all usages of a model or enum
|
|
31
|
+
|
|
32
|
+
## Documentation
|
|
33
|
+
|
|
34
|
+
For development and architecture details, see:
|
|
35
|
+
|
|
36
|
+
- [Architecture](../../docs/architecture.md) — System design and file structure
|
|
37
|
+
- [Language Server](../../docs/language-server.md) — Key abstractions and internals
|
|
38
|
+
- [Development](../../docs/development.md) — Setup and debugging
|
|
39
|
+
- [Testing](../../docs/testing.md) — Test patterns and helpers
|
|
40
|
+
|
|
13
41
|
## Contributing
|
|
14
42
|
|
|
15
|
-
|
|
43
|
+
See [CONTRIBUTING.md](./CONTRIBUTING.md) for development workflow details.
|
|
16
44
|
|
|
17
45
|
## Security
|
|
18
46
|
|
|
19
|
-
|
|
47
|
+
Report security issues to
|
|
48
|
+
[security@prisma.io](mailto:security@prisma.io?subject=[GitHub]%20Prisma%202%20Security%20Report%20VSCode)
|
package/package.json
CHANGED