From 7758a48d52b8995482d5e5e4c34707e2a75e980c Mon Sep 17 00:00:00 2001 From: Sophie Atkins Date: Mon, 5 Dec 2022 13:09:02 +0100 Subject: [PATCH 01/27] skeleton draft --- .../02-code-actions.mdx | 198 ++++++++++++++++++ .../03-auto-complete.mdx | 38 ++++ .../09-prisma-language-server/index.mdx | 19 ++ 3 files changed, 255 insertions(+) create mode 100644 content/200-concepts/100-components/09-prisma-language-server/02-code-actions.mdx create mode 100644 content/200-concepts/100-components/09-prisma-language-server/03-auto-complete.mdx create mode 100644 content/200-concepts/100-components/09-prisma-language-server/index.mdx diff --git a/content/200-concepts/100-components/09-prisma-language-server/02-code-actions.mdx b/content/200-concepts/100-components/09-prisma-language-server/02-code-actions.mdx new file mode 100644 index 0000000000..11b7eea6f8 --- /dev/null +++ b/content/200-concepts/100-components/09-prisma-language-server/02-code-actions.mdx @@ -0,0 +1,198 @@ +--- +title: 'Code Actions' +metaTitle: 'Code Actions (Reference)' +metaDescription: 'Code Actions ...' +tocDepth: 2 +--- + + + +- [**Quick Fixes**](#quick-fixes): ... +- [**Refactorings**](#refactorings): ... + + + +## Quick Fixes +| Editor | Keybind | +| ------ | --------------- | +| VSCode | `Cmd / Win + .` | + +### Add Index for Relation Fields +![applying a quick-fix for relationMode to add index](prisma-ls-relation_mode-index.gif) + +### Add Unique +- Referencing +, + +]}> + + +```prisma +datasource db { + provider = "postgresql" + url = env("DATABASE_URL") +} + +model B { + id Int @id + bId Int + A A @relation(fields: [bId], references: [field]) +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Quick Fix: Make referencing field(s) unique +} + +model A { + id Int @id + field Int @unique + B B? +} +``` + + + + +```prisma +datasource db { + provider = "postgresql" + url = env("DATABASE_URL") +} + +model B { + id Int @id + aField Int @unique + A A @relation(fields: [aField], references: [field]) +} + +model A { + id Int @id + field Int @unique + B B? +} +``` + + + + +- Referenced +, + +]}> + + +```prisma +model B { + id Int @id + aField Int @unique + A A @relation(fields: [aField], references: [field]) +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Quick Fix: Make referenced field(s) unique +} + +model A { + id Int @id + field Int + B B? +} +``` + + + + +### Fix Spelling +, + , +]}> + + +```prisma +model SomeUser { + id Int @id + posts Poste|[] + // ^^^^^^ Quick Fix: Change spelling to 'Post' +} + +model Post { + id Int @id + SomeUser SomeUser? @relation(fields: [someUserId], references: [id]) + someUserId Int? +} +``` + + + + +```prisma +model SomeUser { + id Int @id + posts Post[] +} + +model Post { + id Int @id + SomeUser SomeUser? @relation(fields: [someUserId], references: [id]) + someUserId Int? +} +``` + + + +### Create New Model / Enum +When adding an unknown type to a field ... + +, + , + , + ]}> + + +```prisma +model SomeUser { + id Int @id + posts Post|[] + // ^^^^ Quick Fix: Create new model/enum 'Post' +} +``` + +```prisma +model SomeUser { + id Int @id + posts Post[] +} + +model Post { + +} +``` + + + + +```prisma +model SomeUser { + id Int @id + posts Post[] +} + +enum Post { + +} +``` + + + + + +### Rename Property `experimentalFeatures` -> `previewFeatures` +![rename legacy datasource property experimentalFeatures]() + +## Refactorings +### Rename +| Editor | Keybind | +| ------ | ------- | +| VSCode | `F2` | + +Renames the word currently below the cursor and any references within the same file. This currently only handles surface-level renames with a `@map()` to the original name. Therefore the client will use the new name but the underlying db will still use the old. + +![Gif of renaming a model in VSCode](prisma-ls-rename.gif) \ No newline at end of file diff --git a/content/200-concepts/100-components/09-prisma-language-server/03-auto-complete.mdx b/content/200-concepts/100-components/09-prisma-language-server/03-auto-complete.mdx new file mode 100644 index 0000000000..bb6ede4978 --- /dev/null +++ b/content/200-concepts/100-components/09-prisma-language-server/03-auto-complete.mdx @@ -0,0 +1,38 @@ +--- +title: 'Completions' +metaTitle: 'Completions (Reference)' +metaDescription: 'Completions ...' +tocDepth: 2 +--- + + + +- [**Field Attributes**](#field-attributes): ... +- [**Native Types**](#native-types): ... +- [**Supported Fields**](#supported-fields): ... + + + +## Field Attributes + +### Example +![completions-field-attributes](completion-field-attributes.png) + +## Native Types + +### Example +![completions-native-db-types](completion-native-db-types.png) + +## Suggested Fields +| block | field | +| ---------- | --------------- | +| generator | provider | +| generator | engineType | +| generator | previewFeatures | +| --- | --- | +| datasource | provider | +| datasource | url | +| datasource | relationMode | + +### Example +![completions-supported-fields-datasource-provider](completion-datasource-provider-fields.png) \ No newline at end of file diff --git a/content/200-concepts/100-components/09-prisma-language-server/index.mdx b/content/200-concepts/100-components/09-prisma-language-server/index.mdx new file mode 100644 index 0000000000..5ac1d350e2 --- /dev/null +++ b/content/200-concepts/100-components/09-prisma-language-server/index.mdx @@ -0,0 +1,19 @@ +--- +title: 'Prisma Language Server' +metaTitle: 'Prisma Language Server (Reference)' +metaDescription: 'The Prisma Language Server ...' +--- + + +The Prisma Language Server ... and offers functionality in the following areas: + + +- [**Formatting**](formatting): ... +- [**Linting / Validation**](linting): +- [**Auto-Completion**](auto-complete): ... +- [**Code Actions**](code-actions): ... +- [**Tooltips**](tooltips): ... +- [**Go to Definition**](go-to-definition): ... +- [**Document Symbols**](document-symbols): ... + + \ No newline at end of file From 1af311fc491f26019f5a15f54f2783e0c26a9f81 Mon Sep 17 00:00:00 2001 From: Lucy Keer Date: Tue, 6 Dec 2022 11:45:26 +0000 Subject: [PATCH 02/27] Fix build errors --- .../02-code-actions.mdx | 124 +++++++++--------- .../09-prisma-language-server/index.mdx | 38 ++++-- 2 files changed, 91 insertions(+), 71 deletions(-) diff --git a/content/200-concepts/100-components/09-prisma-language-server/02-code-actions.mdx b/content/200-concepts/100-components/09-prisma-language-server/02-code-actions.mdx index 11b7eea6f8..b803e5ed19 100644 --- a/content/200-concepts/100-components/09-prisma-language-server/02-code-actions.mdx +++ b/content/200-concepts/100-components/09-prisma-language-server/02-code-actions.mdx @@ -13,38 +13,39 @@ tocDepth: 2 ## Quick Fixes + | Editor | Keybind | | ------ | --------------- | | VSCode | `Cmd / Win + .` | ### Add Index for Relation Fields + ![applying a quick-fix for relationMode to add index](prisma-ls-relation_mode-index.gif) ### Add Unique + - Referencing -, - -]}> + +, ]}> ```prisma datasource db { - provider = "postgresql" - url = env("DATABASE_URL") + provider = "postgresql" + url = env("DATABASE_URL") } model B { - id Int @id - bId Int - A A @relation(fields: [bId], references: [field]) -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Quick Fix: Make referencing field(s) unique + id Int @id + bId Int + A A @relation(fields: [bId], references: [field]) + // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Quick Fix: Make referencing field(s) unique } model A { - id Int @id - field Int @unique - B B? + id Int @id + field Int @unique + B B? } ``` @@ -53,20 +54,20 @@ model A { ```prisma datasource db { - provider = "postgresql" - url = env("DATABASE_URL") + provider = "postgresql" + url = env("DATABASE_URL") } model B { - id Int @id - aField Int @unique - A A @relation(fields: [aField], references: [field]) + id Int @id + aField Int @unique + A A @relation(fields: [aField], references: [field]) } model A { - id Int @id - field Int @unique - B B? + id Int @id + field Int @unique + B B? } ``` @@ -74,48 +75,45 @@ model A { - Referenced -, - -]}> + +, ]}> ```prisma model B { - id Int @id - aField Int @unique - A A @relation(fields: [aField], references: [field]) -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Quick Fix: Make referenced field(s) unique + id Int @id + aField Int @unique + A A @relation(fields: [aField], references: [field]) + // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Quick Fix: Make referenced field(s) unique } model A { - id Int @id - field Int - B B? + id Int @id + field Int + B B? } ``` + ### Fix Spelling -, - , -]}> + +, ]}> ```prisma model SomeUser { - id Int @id - posts Poste|[] - // ^^^^^^ Quick Fix: Change spelling to 'Post' + id Int @id + posts Poste|[] + // ^^^^^^ Quick Fix: Change spelling to 'Post' } model Post { - id Int @id - SomeUser SomeUser? @relation(fields: [someUserId], references: [id]) - someUserId Int? + id Int @id + SomeUser SomeUser? @relation(fields: [someUserId], references: [id]) + someUserId Int? } ``` @@ -124,45 +122,47 @@ model Post { ```prisma model SomeUser { - id Int @id - posts Post[] + id Int @id + posts Post[] } model Post { - id Int @id - SomeUser SomeUser? @relation(fields: [someUserId], references: [id]) - someUserId Int? + id Int @id + SomeUser SomeUser? @relation(fields: [someUserId], references: [id]) + someUserId Int? } ``` + ### Create New Model / Enum + When adding an unknown type to a field ... , - , - , + , + , ]}> ```prisma model SomeUser { - id Int @id - posts Post|[] - // ^^^^ Quick Fix: Create new model/enum 'Post' + id Int @id + posts Post|[] + // ^^^^ Quick Fix: Create new model/enum 'Post' } ``` ```prisma model SomeUser { - id Int @id - posts Post[] + id Int @id + posts Post[] } model Post { - + } ``` @@ -171,28 +171,30 @@ model Post { ```prisma model SomeUser { - id Int @id - posts Post[] + id Int @id + posts Post[] } enum Post { - + } ``` - ### Rename Property `experimentalFeatures` -> `previewFeatures` + ![rename legacy datasource property experimentalFeatures]() ## Refactorings -### Rename + +### Rename + | Editor | Keybind | | ------ | ------- | | VSCode | `F2` | Renames the word currently below the cursor and any references within the same file. This currently only handles surface-level renames with a `@map()` to the original name. Therefore the client will use the new name but the underlying db will still use the old. -![Gif of renaming a model in VSCode](prisma-ls-rename.gif) \ No newline at end of file +![Gif of renaming a model in VSCode](prisma-ls-rename.gif) diff --git a/content/200-concepts/100-components/09-prisma-language-server/index.mdx b/content/200-concepts/100-components/09-prisma-language-server/index.mdx index 5ac1d350e2..f210ca749d 100644 --- a/content/200-concepts/100-components/09-prisma-language-server/index.mdx +++ b/content/200-concepts/100-components/09-prisma-language-server/index.mdx @@ -5,15 +5,33 @@ metaDescription: 'The Prisma Language Server ...' --- + The Prisma Language Server ... and offers functionality in the following areas: - -- [**Formatting**](formatting): ... -- [**Linting / Validation**](linting): -- [**Auto-Completion**](auto-complete): ... -- [**Code Actions**](code-actions): ... -- [**Tooltips**](tooltips): ... -- [**Go to Definition**](go-to-definition): ... -- [**Document Symbols**](document-symbols): ... - - \ No newline at end of file + + +- [**Formatting**](#formatting): ... +- [**Linting / Validation**](#linting): +- [**Auto-Completion**](#auto-complete): ... +- [**Code Actions**](#code-actions): ... +- [**Tooltips**](#tooltips): ... +- [**Go to Definition**](#go-to-definition): ... +- [**Document Symbols**](#document-symbols): ... + + + + + +## Formatting + +## Linting + +## Auto-complete + +## Code Actions + +## Tooltips + +## Go to definition + +## Document symbols From d664f53fd45dd357ad29b1926ad213791eef4a04 Mon Sep 17 00:00:00 2001 From: Lucy Keer Date: Tue, 6 Dec 2022 11:54:18 +0000 Subject: [PATCH 03/27] Fix broken link --- .../09-prisma-language-server/03-auto-complete.mdx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/content/200-concepts/100-components/09-prisma-language-server/03-auto-complete.mdx b/content/200-concepts/100-components/09-prisma-language-server/03-auto-complete.mdx index bb6ede4978..84012cb349 100644 --- a/content/200-concepts/100-components/09-prisma-language-server/03-auto-complete.mdx +++ b/content/200-concepts/100-components/09-prisma-language-server/03-auto-complete.mdx @@ -16,14 +16,17 @@ tocDepth: 2 ## Field Attributes ### Example + ![completions-field-attributes](completion-field-attributes.png) ## Native Types ### Example + ![completions-native-db-types](completion-native-db-types.png) -## Suggested Fields +## Supported Fields + | block | field | | ---------- | --------------- | | generator | provider | @@ -35,4 +38,5 @@ tocDepth: 2 | datasource | relationMode | ### Example -![completions-supported-fields-datasource-provider](completion-datasource-provider-fields.png) \ No newline at end of file + +![completions-supported-fields-datasource-provider](completion-datasource-provider-fields.png) From 111c2c49fd9ae0f079dfb725326602f273eebf7e Mon Sep 17 00:00:00 2001 From: Lucy Keer Date: Tue, 6 Dec 2022 12:23:24 +0000 Subject: [PATCH 04/27] Reorganise directory structure --- .../02-code-actions.mdx | 0 .../03-auto-complete.mdx | 0 .../01-prisma-language-server}/index.mdx | 0 .../09-prisma-language-tools/05-vs-code/index.mdx | 15 +++++++++++++++ .../09-prisma-language-tools/index.mdx | 15 +++++++++++++++ 5 files changed, 30 insertions(+) rename content/200-concepts/100-components/{09-prisma-language-server => 09-prisma-language-tools/01-prisma-language-server}/02-code-actions.mdx (100%) rename content/200-concepts/100-components/{09-prisma-language-server => 09-prisma-language-tools/01-prisma-language-server}/03-auto-complete.mdx (100%) rename content/200-concepts/100-components/{09-prisma-language-server => 09-prisma-language-tools/01-prisma-language-server}/index.mdx (100%) create mode 100644 content/200-concepts/100-components/09-prisma-language-tools/05-vs-code/index.mdx create mode 100644 content/200-concepts/100-components/09-prisma-language-tools/index.mdx diff --git a/content/200-concepts/100-components/09-prisma-language-server/02-code-actions.mdx b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx similarity index 100% rename from content/200-concepts/100-components/09-prisma-language-server/02-code-actions.mdx rename to content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx diff --git a/content/200-concepts/100-components/09-prisma-language-server/03-auto-complete.mdx b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/03-auto-complete.mdx similarity index 100% rename from content/200-concepts/100-components/09-prisma-language-server/03-auto-complete.mdx rename to content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/03-auto-complete.mdx diff --git a/content/200-concepts/100-components/09-prisma-language-server/index.mdx b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/index.mdx similarity index 100% rename from content/200-concepts/100-components/09-prisma-language-server/index.mdx rename to content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/index.mdx diff --git a/content/200-concepts/100-components/09-prisma-language-tools/05-vs-code/index.mdx b/content/200-concepts/100-components/09-prisma-language-tools/05-vs-code/index.mdx new file mode 100644 index 0000000000..793a1f6534 --- /dev/null +++ b/content/200-concepts/100-components/09-prisma-language-tools/05-vs-code/index.mdx @@ -0,0 +1,15 @@ +--- +title: 'Prisma VS Code Extension' +metaTitle: 'Prisma VS Code Extension' +metaDescription: 'Prisma VS Code Extension' +--- + + + +TODO: VS Code + + + +## VS Code... + +TODO diff --git a/content/200-concepts/100-components/09-prisma-language-tools/index.mdx b/content/200-concepts/100-components/09-prisma-language-tools/index.mdx new file mode 100644 index 0000000000..50037e36c2 --- /dev/null +++ b/content/200-concepts/100-components/09-prisma-language-tools/index.mdx @@ -0,0 +1,15 @@ +--- +title: 'Prisma Language Tools' +metaTitle: 'Prisma Language Tools' +metaDescription: 'Prisma Language Tools' +--- + + + +TODO: Prisma Language Tools + + + +## Prisma Language Tools... + +TODO From 2881ca112008c253c7b1818506e963bb081c5aac Mon Sep 17 00:00:00 2001 From: Lucy Keer Date: Tue, 6 Dec 2022 12:27:18 +0000 Subject: [PATCH 05/27] Spellcheck fix --- .../01-prisma-language-server/02-code-actions.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx index b803e5ed19..7bba07402b 100644 --- a/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx +++ b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx @@ -14,7 +14,7 @@ tocDepth: 2 ## Quick Fixes -| Editor | Keybind | +| Editor | Key binding | | ------ | --------------- | | VSCode | `Cmd / Win + .` | @@ -191,9 +191,9 @@ enum Post { ### Rename -| Editor | Keybind | -| ------ | ------- | -| VSCode | `F2` | +| Editor | Key binding | +| ------ | ----------- | +| VSCode | `F2` | Renames the word currently below the cursor and any references within the same file. This currently only handles surface-level renames with a `@map()` to the original name. Therefore the client will use the new name but the underlying db will still use the old. From 70dc28e2b56ef2c72995950721d57e26595e6a84 Mon Sep 17 00:00:00 2001 From: Lucy Keer Date: Tue, 6 Dec 2022 15:08:45 +0000 Subject: [PATCH 06/27] Formatting fixes --- .../02-code-actions.mdx | 6 ++--- .../03-auto-complete.mdx | 14 ++++++------ .../01-prisma-language-server/index.mdx | 22 ++++++++----------- 3 files changed, 19 insertions(+), 23 deletions(-) diff --git a/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx index 7bba07402b..aeb92db179 100644 --- a/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx +++ b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx @@ -1,14 +1,14 @@ --- title: 'Code Actions' -metaTitle: 'Code Actions (Reference)' +metaTitle: 'Code Actions' metaDescription: 'Code Actions ...' tocDepth: 2 --- -- [**Quick Fixes**](#quick-fixes): ... -- [**Refactorings**](#refactorings): ... +- [Quick Fixes](#quick-fixes): ... +- [Refactorings](#refactorings): ... diff --git a/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/03-auto-complete.mdx b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/03-auto-complete.mdx index 84012cb349..3fd42b6942 100644 --- a/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/03-auto-complete.mdx +++ b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/03-auto-complete.mdx @@ -1,31 +1,31 @@ --- title: 'Completions' -metaTitle: 'Completions (Reference)' +metaTitle: 'Completions' metaDescription: 'Completions ...' tocDepth: 2 --- -- [**Field Attributes**](#field-attributes): ... -- [**Native Types**](#native-types): ... -- [**Supported Fields**](#supported-fields): ... +- [Field attributes](#field-attributes): ... +- [Native types](#native-types): ... +- [Supported fields](#supported-fields): ... -## Field Attributes +## Field attributes ### Example ![completions-field-attributes](completion-field-attributes.png) -## Native Types +## Native types ### Example ![completions-native-db-types](completion-native-db-types.png) -## Supported Fields +## Supported fields | block | field | | ---------- | --------------- | diff --git a/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/index.mdx b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/index.mdx index f210ca749d..bb9c312dc2 100644 --- a/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/index.mdx +++ b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/index.mdx @@ -1,6 +1,6 @@ --- title: 'Prisma Language Server' -metaTitle: 'Prisma Language Server (Reference)' +metaTitle: 'Prisma Language Server' metaDescription: 'The Prisma Language Server ...' --- @@ -10,13 +10,13 @@ The Prisma Language Server ... and offers functionality in the following areas: -- [**Formatting**](#formatting): ... -- [**Linting / Validation**](#linting): -- [**Auto-Completion**](#auto-complete): ... -- [**Code Actions**](#code-actions): ... -- [**Tooltips**](#tooltips): ... -- [**Go to Definition**](#go-to-definition): ... -- [**Document Symbols**](#document-symbols): ... +- [Formatting](#formatting): ... +- [Linting and validation](#linting): +- [Auto-completion](/concepts/components/prisma-language-tools/prisma-language-server/auto-complete): ... +- [Code Actions](/concepts/components/prisma-language-tools/prisma-language-server/code-actions): ... +- [Tooltips](#tooltips): ... +- [Go to Definition](#go-to-definition): ... +- [Document symbols](#document-symbols): ... @@ -26,12 +26,8 @@ The Prisma Language Server ... and offers functionality in the following areas: ## Linting -## Auto-complete - -## Code Actions - ## Tooltips -## Go to definition +## Go to Definition ## Document symbols From 82127e9a265fbc967ba703fa1e2e53d731846c17 Mon Sep 17 00:00:00 2001 From: Lucy Keer Date: Tue, 6 Dec 2022 15:19:07 +0000 Subject: [PATCH 07/27] Terminology fix --- .../01-prisma-language-server/02-code-actions.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx index aeb92db179..de9d8b8833 100644 --- a/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx +++ b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx @@ -14,9 +14,9 @@ tocDepth: 2 ## Quick Fixes -| Editor | Key binding | -| ------ | --------------- | -| VSCode | `Cmd / Win + .` | +| Editor | Key binding | +| ------- | --------------- | +| VS Code | `Cmd / Win + .` | ### Add Index for Relation Fields @@ -191,10 +191,10 @@ enum Post { ### Rename -| Editor | Key binding | -| ------ | ----------- | -| VSCode | `F2` | +| Editor | Key binding | +| ------- | ----------- | +| VS Code | `F2` | Renames the word currently below the cursor and any references within the same file. This currently only handles surface-level renames with a `@map()` to the original name. Therefore the client will use the new name but the underlying db will still use the old. -![Gif of renaming a model in VSCode](prisma-ls-rename.gif) +![Gif of renaming a model in VS Code](prisma-ls-rename.gif) From 19e9ae8cd7efce9670b788db3c78c2f73c42ae69 Mon Sep 17 00:00:00 2001 From: Sophie Atkins Date: Wed, 7 Dec 2022 09:44:50 +0100 Subject: [PATCH 08/27] fixed: inline schema formatting && representation. Squigglies are now accurately represented. Missing ; After (enum) ; tab has been moved, and ; After (model) ; has been added --- .../02-code-actions.mdx | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx index de9d8b8833..b4046eeb0c 100644 --- a/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx +++ b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx @@ -20,7 +20,7 @@ tocDepth: 2 ### Add Index for Relation Fields -![applying a quick-fix for relationMode to add index](prisma-ls-relation_mode-index.gif) +![applying a quick-fix for relationMode to add index](code_action-relation_mode-index.gif) ### Add Unique @@ -39,7 +39,8 @@ model B { id Int @id bId Int A A @relation(fields: [bId], references: [field]) - // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Quick Fix: Make referencing field(s) unique + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + // Quick Fix: Make referencing field(s) unique } model A { @@ -84,7 +85,8 @@ model B { id Int @id aField Int @unique A A @relation(fields: [aField], references: [field]) - // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Quick Fix: Make referenced field(s) unique + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + // Quick Fix: Make referenced field(s) unique } model A { @@ -107,7 +109,8 @@ model A { model SomeUser { id Int @id posts Poste|[] - // ^^^^^^ Quick Fix: Change spelling to 'Post' + ^^^^^^ + // Quick Fix: Change spelling to 'Post' } model Post { @@ -151,14 +154,18 @@ When adding an unknown type to a field ... model SomeUser { id Int @id posts Post|[] - // ^^^^ Quick Fix: Create new model/enum 'Post' + ^^^^ + // Quick Fix: Create new model/enum 'Post' } ``` + + + ```prisma model SomeUser { - id Int @id - posts Post[] + id Int @id + posts Post|[] } model Post { @@ -171,8 +178,8 @@ model Post { ```prisma model SomeUser { - id Int @id - posts Post[] + id Int @id + posts Post|[] } enum Post { @@ -197,4 +204,4 @@ enum Post { Renames the word currently below the cursor and any references within the same file. This currently only handles surface-level renames with a `@map()` to the original name. Therefore the client will use the new name but the underlying db will still use the old. -![Gif of renaming a model in VS Code](prisma-ls-rename.gif) +![Gif of renaming a model in VS Code](code_action-rename.gif) From 57ec5b44613b451f5d86d8b7143abdeac08eba81 Mon Sep 17 00:00:00 2001 From: Sophie Atkins Date: Wed, 7 Dec 2022 12:07:20 +0100 Subject: [PATCH 09/27] code actions toc wording; squiggly alignment --- .../01-prisma-language-server/02-code-actions.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx index b4046eeb0c..4e30dd2329 100644 --- a/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx +++ b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx @@ -7,8 +7,8 @@ tocDepth: 2 -- [Quick Fixes](#quick-fixes): ... -- [Refactorings](#refactorings): ... +- [Quick Fixes](#quick-fixes): Represent code changes that would change functionality so as to fix an issue indicated by the Prisma Language Server. +- [Refactorings](#refactorings): Represent changes in code @@ -109,7 +109,7 @@ model A { model SomeUser { id Int @id posts Poste|[] - ^^^^^^ + ^^^^^ // Quick Fix: Change spelling to 'Post' } From f76da904c93bda856bc5f7c9e0059a13b12cc865 Mon Sep 17 00:00:00 2001 From: Sophie Atkins Date: Wed, 7 Dec 2022 12:07:44 +0100 Subject: [PATCH 10/27] vscode wip index --- .../05-vs-code/index.mdx | 29 +++++++++++++++++-- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/content/200-concepts/100-components/09-prisma-language-tools/05-vs-code/index.mdx b/content/200-concepts/100-components/09-prisma-language-tools/05-vs-code/index.mdx index 793a1f6534..a8d34e1dc1 100644 --- a/content/200-concepts/100-components/09-prisma-language-tools/05-vs-code/index.mdx +++ b/content/200-concepts/100-components/09-prisma-language-tools/05-vs-code/index.mdx @@ -6,10 +6,33 @@ metaDescription: 'Prisma VS Code Extension' -TODO: VS Code +- [Syntax Highlighting](#syntax-highlighting) +- [Colour Theme Validation](#colour-theme-validation) +- [Client File Watcher](#client-file-watcher) +- [Insider](#insider) -## VS Code... +## Syntax Highlighting -TODO +TODO ... + +## Colour Theme Validation + +To ensure effective syntax highlighting, ... emit the following warning: + +TODO: Picture? + +> The VS Code Color Theme {currentTheme} you are using unfortunately does not fully support syntax highlighting. We suggest you switch to 'suggestedTheme' which does fully support it and will give you a better experience. + +## Client File Watcher + +Monitors for changes in the client types and will refresh the TypeScript language server on detected change. + +## Insider + +It is not reccomended to have both the Stable and Insider release of the Prisma VS Code extension enabled in a given workspace. On detection, we emit the following warning: + +TODO: Picture? + +> You have both the Insider and stable Prisma VS Code extension installed. Please uninstall or disable one of them for a better experience. From 41e950426d05f23ebbac27aea171cd2999b06acf Mon Sep 17 00:00:00 2001 From: Lucy Keer Date: Thu, 8 Dec 2022 10:21:27 +0000 Subject: [PATCH 11/27] Update example models --- .../02-code-actions.mdx | 110 ++++++++++-------- 1 file changed, 64 insertions(+), 46 deletions(-) diff --git a/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx index 4e30dd2329..be84bd3875 100644 --- a/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx +++ b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx @@ -35,18 +35,18 @@ datasource db { url = env("DATABASE_URL") } -model B { - id Int @id - bId Int - A A @relation(fields: [bId], references: [field]) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +model Profile { + id Int @id + userId String + user User @relation(fields: [userId], references: [email]) + // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // Quick Fix: Make referencing field(s) unique } -model A { - id Int @id - field Int @unique - B B? +model User { + id Int @id + email String @unique + profile Profile? } ``` @@ -59,16 +59,16 @@ datasource db { url = env("DATABASE_URL") } -model B { - id Int @id - aField Int @unique - A A @relation(fields: [aField], references: [field]) +model Profile { + id Int @id + userId String @unique // @unique attribute added + user User @relation(fields: [userId], references: [email]) } -model A { - id Int @id - field Int @unique - B B? +model User { + id Int @id + email String @unique + profile Profile? } ``` @@ -81,23 +81,39 @@ model A { ```prisma -model B { - id Int @id - aField Int @unique - A A @relation(fields: [aField], references: [field]) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +model Profile { + id Int @id + userId String @unique + user User @relation(fields: [userId], references: [email]) + // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // Quick Fix: Make referenced field(s) unique } -model A { - id Int @id - field Int - B B? +model User { + id Int @id + email String + profile Profile? +} +``` + + + + +```prisma +model Profile { + id Int @id + userId String @unique + user User @relation(fields: [userId], references: [email]) +} + +model User { + id Int @id + email String @unique // @unique attribute added + profile Profile? } ``` - ### Fix Spelling @@ -106,17 +122,17 @@ model A { ```prisma -model SomeUser { - id Int @id - posts Poste|[] - ^^^^^ +model User { + id Int @id + posts Poste[] + // ^^^^^ // Quick Fix: Change spelling to 'Post' } model Post { - id Int @id - SomeUser SomeUser? @relation(fields: [someUserId], references: [id]) - someUserId Int? + id Int @id + User User? @relation(fields: [userId], references: [id]) + userId Int? } ``` @@ -124,15 +140,15 @@ model Post { ```prisma -model SomeUser { +model User { id Int @id - posts Post[] + posts Post[] // Spelling corrected } model Post { - id Int @id - SomeUser SomeUser? @relation(fields: [someUserId], references: [id]) - someUserId Int? + id Int @id + User User? @relation(fields: [userId], references: [id]) + userId Int? } ``` @@ -152,9 +168,9 @@ When adding an unknown type to a field ... ```prisma model SomeUser { - id Int @id - posts Post|[] - ^^^^ + id Int @id + posts Post[] + // ^^^^ // Quick Fix: Create new model/enum 'Post' } ``` @@ -163,11 +179,12 @@ model SomeUser { ```prisma -model SomeUser { - id Int @id - posts Post|[] +model User { + id Int @id + posts Post[] } +// New model added model Post { } @@ -177,11 +194,12 @@ model Post { ```prisma -model SomeUser { +model User { id Int @id posts Post|[] } +// New enum added enum Post { } From 50ea41e73024492eb1a063460d3ac88b09203d4b Mon Sep 17 00:00:00 2001 From: Lucy Keer Date: Thu, 8 Dec 2022 10:50:39 +0000 Subject: [PATCH 12/27] Update intro text --- .../01-prisma-language-server/02-code-actions.mdx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx index be84bd3875..7c2a389b72 100644 --- a/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx +++ b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx @@ -7,13 +7,19 @@ tocDepth: 2 -- [Quick Fixes](#quick-fixes): Represent code changes that would change functionality so as to fix an issue indicated by the Prisma Language Server. -- [Refactorings](#refactorings): Represent changes in code +The Prisma Language Server provides the following options to restructure code and fix issues: + +- [Quick Fixes](#quick-fixes) represent code changes that fix issues that the Prisma Language Server identifies in your code. +- [Refactorings](#refactorings) represent ways to restructure your code. ## Quick Fixes +This section lists the Quick Fixes provided by the Prisma Language Server. + +Quick fixes have the following key bindings in different code editors: + | Editor | Key binding | | ------- | --------------- | | VS Code | `Cmd / Win + .` | @@ -116,7 +122,7 @@ model User { -### Fix Spelling +### Fix the spelling of a field , ]}> From 8cdeb6b95b2a89dda6fd7e99550e072ff8295561 Mon Sep 17 00:00:00 2001 From: Lucy Keer Date: Thu, 8 Dec 2022 10:51:04 +0000 Subject: [PATCH 13/27] Update add unique quick fixes --- .../01-prisma-language-server/02-code-actions.mdx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx index 7c2a389b72..63c837d433 100644 --- a/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx +++ b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx @@ -28,9 +28,13 @@ Quick fixes have the following key bindings in different code editors: ![applying a quick-fix for relationMode to add index](code_action-relation_mode-index.gif) -### Add Unique +### Add a missing @unique attribute to a relation -- Referencing +These Quick Fixes add missing `@unique` attributes to either the referencing or the referenced side of a relation. The following examples add missing `@unique` attributes to a `Profile` model that references a `Post` model. + +#### Add a missing @unique attribute to a referencing field + +This example adds a missing `@unique` attribute to the `userId` relation scalar field in the referencing `Profile` model: , ]}> @@ -81,7 +85,9 @@ model User { -- Referenced +#### Add a missing @unique attribute to a referenced field + +This example adds a `@unique` attribute to the `email` field in the referenced `Post` model: , ]}> From 2161d0bd2c6961607fdb25bd8b708a1ef08942fd Mon Sep 17 00:00:00 2001 From: Lucy Keer Date: Thu, 8 Dec 2022 13:29:39 +0000 Subject: [PATCH 14/27] Update example descriptions --- .../01-prisma-language-server/02-code-actions.mdx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx index 63c837d433..923571e271 100644 --- a/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx +++ b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx @@ -130,6 +130,8 @@ model User { ### Fix the spelling of a field +This Quick Fix updates incorrectly spelled relation types. In the following example, the `User` model has a `posts` field with an incorrectly named `Poste[]` relation type. The Quick Fix corrects the name to `Post[]`: + , ]}> @@ -167,9 +169,9 @@ model Post { -### Create New Model / Enum +### Create a new model or enum -When adding an unknown type to a field ... +This Quick Fix suggests that you add a new model or enum if you add a relation field to your model with a relation type that you have not yet defined. In the following example, the `User` model has a `posts` relation field, but no `Post` model or enum currently exists: , @@ -179,7 +181,7 @@ When adding an unknown type to a field ... ```prisma -model SomeUser { +model User { id Int @id posts Post[] // ^^^^ From 088a600d3d150dc868e83eb037ba221d45856cf4 Mon Sep 17 00:00:00 2001 From: Lucy Keer Date: Thu, 8 Dec 2022 13:39:18 +0000 Subject: [PATCH 15/27] Add experimental features example --- .../02-code-actions.mdx | 31 +++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx index 923571e271..feeaf5ea65 100644 --- a/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx +++ b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx @@ -222,12 +222,39 @@ enum Post { -### Rename Property `experimentalFeatures` -> `previewFeatures` +### Rename the experimentalFeatures field -![rename legacy datasource property experimentalFeatures]() +This Quick Fix renames the legacy `experimentalFeatures` field in the `generator` block to `previewFeatures`: + +, ]}> + + +```prisma +generator client { + provider = "prisma-client-js" + experimentalFeatures = ["fullTextSearch"] + // ^^^^^^^^^^^^^^^^^ + // Quick Fix: Rename property to 'previewFeatures' +} +``` + + + + +```prisma +generator client { + provider = "prisma-client-js" + previewFeatures = ["fullTextSearch"] // Correct name +} +``` + + + ## Refactorings +This section lists the refactorings provided by the Prisma Language Server. + ### Rename | Editor | Key binding | From 66802c45ce3eb13145edb2e5862ff34bbd34278f Mon Sep 17 00:00:00 2001 From: Sophie Atkins Date: Wed, 14 Dec 2022 12:56:10 +0100 Subject: [PATCH 16/27] Added link to Language Tools on front-page for docs Added link to LSP in language-server --- config.ts | 5 +++++ .../01-prisma-language-server/index.mdx | 10 +++++++--- .../09-prisma-language-tools/05-vs-code/index.mdx | 6 +++--- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/config.ts b/config.ts index 275bd90fed..2901bd75bf 100644 --- a/config.ts +++ b/config.ts @@ -146,6 +146,11 @@ const siteConfig = { url: 'concepts/components/preview-features', codeBlock: false, }, + { + text: 'Prisma Language Tools', + url: 'concepts/components/prisma-language-tools', + codeBlock: false, + }, ], }, { diff --git a/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/index.mdx b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/index.mdx index bb9c312dc2..c3ed981c67 100644 --- a/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/index.mdx +++ b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/index.mdx @@ -6,9 +6,9 @@ metaDescription: 'The Prisma Language Server ...' -The Prisma Language Server ... and offers functionality in the following areas: +The Prisma Language Server implements the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) and offers functionality in the following areas: - + - [Formatting](#formatting): ... - [Linting and validation](#linting): @@ -18,7 +18,11 @@ The Prisma Language Server ... and offers functionality in the following areas: - [Go to Definition](#go-to-definition): ... - [Document symbols](#document-symbols): ... - + + + + + diff --git a/content/200-concepts/100-components/09-prisma-language-tools/05-vs-code/index.mdx b/content/200-concepts/100-components/09-prisma-language-tools/05-vs-code/index.mdx index a8d34e1dc1..93b4655904 100644 --- a/content/200-concepts/100-components/09-prisma-language-tools/05-vs-code/index.mdx +++ b/content/200-concepts/100-components/09-prisma-language-tools/05-vs-code/index.mdx @@ -15,13 +15,13 @@ metaDescription: 'Prisma VS Code Extension' ## Syntax Highlighting -TODO ... + ## Colour Theme Validation To ensure effective syntax highlighting, ... emit the following warning: -TODO: Picture? + > The VS Code Color Theme {currentTheme} you are using unfortunately does not fully support syntax highlighting. We suggest you switch to 'suggestedTheme' which does fully support it and will give you a better experience. @@ -33,6 +33,6 @@ Monitors for changes in the client types and will refresh the TypeScript languag It is not reccomended to have both the Stable and Insider release of the Prisma VS Code extension enabled in a given workspace. On detection, we emit the following warning: -TODO: Picture? + > You have both the Insider and stable Prisma VS Code extension installed. Please uninstall or disable one of them for a better experience. From f393a55b50fba31d35a239f68001d08252eb3022 Mon Sep 17 00:00:00 2001 From: Sophie Atkins Date: Wed, 14 Dec 2022 12:59:51 +0100 Subject: [PATCH 17/27] links to vs code and ls in language-tools --- .../100-components/09-prisma-language-tools/index.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/200-concepts/100-components/09-prisma-language-tools/index.mdx b/content/200-concepts/100-components/09-prisma-language-tools/index.mdx index 50037e36c2..ed73d0034a 100644 --- a/content/200-concepts/100-components/09-prisma-language-tools/index.mdx +++ b/content/200-concepts/100-components/09-prisma-language-tools/index.mdx @@ -5,8 +5,10 @@ metaDescription: 'Prisma Language Tools' --- +Prisma's Language Tools comprises two components: -TODO: Prisma Language Tools +- [Language Server](/concepts/components/prisma-language-tools/prisma-language-server) +- [VS Code](/concepts/components/prisma-language-tools/vs-code) From d1599964d9bc81d33db8436b430716f55be17780 Mon Sep 17 00:00:00 2001 From: Lucy Keer Date: Mon, 19 Dec 2022 09:23:56 +0000 Subject: [PATCH 18/27] Missing index quick fix --- .../02-code-actions.mdx | 64 +++++++++++++++++-- 1 file changed, 60 insertions(+), 4 deletions(-) diff --git a/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx index feeaf5ea65..dcaf5c3af1 100644 --- a/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx +++ b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/02-code-actions.mdx @@ -7,7 +7,7 @@ tocDepth: 2 -The Prisma Language Server provides the following options to restructure code and fix issues: +The Prisma Language Server provides the following Code Actions to restructure code and fix issues: - [Quick Fixes](#quick-fixes) represent code changes that fix issues that the Prisma Language Server identifies in your code. - [Refactorings](#refactorings) represent ways to restructure your code. @@ -24,9 +24,65 @@ Quick fixes have the following key bindings in different code editors: | ------- | --------------- | | VS Code | `Cmd / Win + .` | -### Add Index for Relation Fields +### Add a missing index in prisma relation mode -![applying a quick-fix for relationMode to add index](code_action-relation_mode-index.gif) +If you [emulate relations in Prisma Client](/concepts/components/prisma-schema/relations/relation-mode#emulate-relations-in-prisma-with-the-prisma-relation-mode) with the `prisma` relation mode, this Quick Fix allows you to add an index on any fields that are used in a relation and that do not yet have an index defined. + +In the following example, the Quick Fix adds an index on the `userId` scalar field in the `Post` model: + +, ]}> + + +```prisma +datasource db { + provider = "mysql" + url = env("DATABASE_URL") + relationMode = "prisma" +} + +model User { + id Int @id + posts Post[] +} + +model Post { + id Int @id + userId Int + user User @relation(fields: [userId], references: [id]) + // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + // Quick Fix: Add an index for the relation's field(s) +} +``` + + + + +```prisma +datasource db { + provider = "mysql" + url = env("DATABASE_URL") + relationMode = "prisma" +} + +model User { + id Int @id + posts Post[] +} + +model Post { + id Int @id + userId Int + user User @relation(fields: [userId], references: [id]) + + // index added + @@index([userId]) +} +``` + + + + +For more information, see [Index validation](/concepts/components/prisma-schema/relations/relation-mode#index-validation). ### Add a missing @unique attribute to a relation @@ -255,7 +311,7 @@ generator client { This section lists the refactorings provided by the Prisma Language Server. -### Rename +### Rename a word | Editor | Key binding | | ------- | ----------- | From 5fba8c40b6146099a7f3c21afb29ee32a4c63a7b Mon Sep 17 00:00:00 2001 From: Sophie Atkins Date: Mon, 19 Dec 2022 12:22:30 +0100 Subject: [PATCH 19/27] completions images --- .../completion-datasource-provider-fields.png | Bin 0 -> 200663 bytes .../completion-field-attributes.png | Bin 0 -> 267210 bytes .../completion-native-db-types.png | Bin 0 -> 223475 bytes 3 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/completion-datasource-provider-fields.png create mode 100644 content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/completion-field-attributes.png create mode 100644 content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/completion-native-db-types.png diff --git a/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/completion-datasource-provider-fields.png b/content/200-concepts/100-components/09-prisma-language-tools/01-prisma-language-server/completion-datasource-provider-fields.png new file mode 100644 index 0000000000000000000000000000000000000000..9cc55e9eb9b497a23639541597140b9e35e0afb0 GIT binary patch literal 200663 zcmc%xby!@>vIh(U2_8a10t6>WAZYL~Xo3X>3+@DWcTaF9!3KBN;0_@qxZ4CB5@gW9 z-QLAHJNuk_zi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