Skip to content

Commit d3feab6

Browse files
dirty
1 parent bca07ee commit d3feab6

2 files changed

Lines changed: 66 additions & 26 deletions

File tree

packages/@postgres-language-server/backend-jsonrpc/src/workspace.ts

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ export type FileKind = FileKind2[];
1818
/**
1919
* The priority of the file
2020
*/
21-
export type FileKind2 = "Config" | "Ignore" | "Inspectable" | "Handleable";
21+
export type FileKind2 =
22+
| "Config"
23+
| "Ignore"
24+
| "Inspectable"
25+
| "Handleable";
2226
export interface RegisterProjectFolderParams {
2327
path?: string;
2428
setAsCurrentWorkspace: boolean;
@@ -36,7 +40,10 @@ export interface PullFileDiagnosticsParams {
3640
}
3741
export type RuleCategories = RuleCategory[];
3842
export type RuleCode = string;
39-
export type RuleCategory = "Lint" | "Action" | "Transformation";
43+
export type RuleCategory =
44+
| "Lint"
45+
| "Action"
46+
| "Transformation";
4047
export interface PullDiagnosticsResult {
4148
diagnostics: Diagnostic[];
4249
skipped_diagnostics: number;
@@ -172,7 +179,12 @@ export type MarkupBuf = MarkupNodeBuf[];
172179
/**
173180
* The severity to associate to a diagnostic.
174181
*/
175-
export type Severity = "hint" | "information" | "warning" | "error" | "fatal";
182+
export type Severity =
183+
| "hint"
184+
| "information"
185+
| "warning"
186+
| "error"
187+
| "fatal";
176188
export type DiagnosticTags = DiagnosticTag[];
177189
/**
178190
* Serializable representation of a [Diagnostic](super::Diagnostic) advice
@@ -213,7 +225,11 @@ export type DiagnosticTag =
213225
/**
214226
* The category for a log advice, defines how the message should be presented to the user.
215227
*/
216-
export type LogCategory = "none" | "info" | "warn" | "error";
228+
export type LogCategory =
229+
| "none"
230+
| "info"
231+
| "warn"
232+
| "error";
217233
export interface TextEdit {
218234
dictionary: string;
219235
ops: CompressedOp[];
@@ -568,11 +584,15 @@ If we can't find the configuration, it will attempt to use the current working d
568584
/**
569585
* Keyword casing style for the formatter.
570586
*/
571-
export type KeywordCase = "upper" | "lower";
587+
export type KeywordCase =
588+
| "upper"
589+
| "lower";
572590
/**
573591
* Indentation style for the formatter.
574592
*/
575-
export type IndentStyle = "spaces" | "tabs";
593+
export type IndentStyle =
594+
| "spaces"
595+
| "tabs";
576596
export interface LinterRules {
577597
/**
578598
* It enables ALL rules. The rules that belong to `nursery` won't be enabled.
@@ -990,7 +1010,11 @@ export type RuleConfiguration_for_Null =
9901010
export type RuleConfiguration_for_SplinterRuleOptions =
9911011
| RulePlainConfiguration
9921012
| RuleWithOptions_for_SplinterRuleOptions;
993-
export type RulePlainConfiguration = "warn" | "error" | "info" | "off";
1013+
export type RulePlainConfiguration =
1014+
| "warn"
1015+
| "error"
1016+
| "info"
1017+
| "off";
9941018
export interface RuleWithOptions_for_Null {
9951019
/**
9961020
* The severity of the emitted diagnostics by the rule
@@ -1042,13 +1066,9 @@ export interface CloseFileParams {
10421066
export type Configuration = PartialConfiguration;
10431067
export interface Workspace {
10441068
isPathIgnored(params: IsPathIgnoredParams): Promise<boolean>;
1045-
registerProjectFolder(
1046-
params: RegisterProjectFolderParams,
1047-
): Promise<ProjectKey>;
1069+
registerProjectFolder(params: RegisterProjectFolderParams): Promise<ProjectKey>;
10481070
getFileContent(params: GetFileContentParams): Promise<string>;
1049-
pullFileDiagnostics(
1050-
params: PullFileDiagnosticsParams,
1051-
): Promise<PullDiagnosticsResult>;
1071+
pullFileDiagnostics(params: PullFileDiagnosticsParams): Promise<PullDiagnosticsResult>;
10521072
getCompletions(params: GetCompletionsParams): Promise<CompletionsResult>;
10531073
updateSettings(params: UpdateSettingsParams): Promise<void>;
10541074
openFile(params: OpenFileParams): Promise<void>;

packages/@postgrestools/backend-jsonrpc/src/workspace.ts

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ export type FileKind = FileKind2[];
1818
/**
1919
* The priority of the file
2020
*/
21-
export type FileKind2 = "Config" | "Ignore" | "Inspectable" | "Handleable";
21+
export type FileKind2 =
22+
| "Config"
23+
| "Ignore"
24+
| "Inspectable"
25+
| "Handleable";
2226
export interface RegisterProjectFolderParams {
2327
path?: string;
2428
setAsCurrentWorkspace: boolean;
@@ -36,7 +40,10 @@ export interface PullFileDiagnosticsParams {
3640
}
3741
export type RuleCategories = RuleCategory[];
3842
export type RuleCode = string;
39-
export type RuleCategory = "Lint" | "Action" | "Transformation";
43+
export type RuleCategory =
44+
| "Lint"
45+
| "Action"
46+
| "Transformation";
4047
export interface PullDiagnosticsResult {
4148
diagnostics: Diagnostic[];
4249
skipped_diagnostics: number;
@@ -172,7 +179,12 @@ export type MarkupBuf = MarkupNodeBuf[];
172179
/**
173180
* The severity to associate to a diagnostic.
174181
*/
175-
export type Severity = "hint" | "information" | "warning" | "error" | "fatal";
182+
export type Severity =
183+
| "hint"
184+
| "information"
185+
| "warning"
186+
| "error"
187+
| "fatal";
176188
export type DiagnosticTags = DiagnosticTag[];
177189
/**
178190
* Serializable representation of a [Diagnostic](super::Diagnostic) advice
@@ -213,7 +225,11 @@ export type DiagnosticTag =
213225
/**
214226
* The category for a log advice, defines how the message should be presented to the user.
215227
*/
216-
export type LogCategory = "none" | "info" | "warn" | "error";
228+
export type LogCategory =
229+
| "none"
230+
| "info"
231+
| "warn"
232+
| "error";
217233
export interface TextEdit {
218234
dictionary: string;
219235
ops: CompressedOp[];
@@ -568,11 +584,15 @@ If we can't find the configuration, it will attempt to use the current working d
568584
/**
569585
* Keyword casing style for the formatter.
570586
*/
571-
export type KeywordCase = "upper" | "lower";
587+
export type KeywordCase =
588+
| "upper"
589+
| "lower";
572590
/**
573591
* Indentation style for the formatter.
574592
*/
575-
export type IndentStyle = "spaces" | "tabs";
593+
export type IndentStyle =
594+
| "spaces"
595+
| "tabs";
576596
export interface LinterRules {
577597
/**
578598
* It enables ALL rules. The rules that belong to `nursery` won't be enabled.
@@ -990,7 +1010,11 @@ export type RuleConfiguration_for_Null =
9901010
export type RuleConfiguration_for_SplinterRuleOptions =
9911011
| RulePlainConfiguration
9921012
| RuleWithOptions_for_SplinterRuleOptions;
993-
export type RulePlainConfiguration = "warn" | "error" | "info" | "off";
1013+
export type RulePlainConfiguration =
1014+
| "warn"
1015+
| "error"
1016+
| "info"
1017+
| "off";
9941018
export interface RuleWithOptions_for_Null {
9951019
/**
9961020
* The severity of the emitted diagnostics by the rule
@@ -1042,13 +1066,9 @@ export interface CloseFileParams {
10421066
export type Configuration = PartialConfiguration;
10431067
export interface Workspace {
10441068
isPathIgnored(params: IsPathIgnoredParams): Promise<boolean>;
1045-
registerProjectFolder(
1046-
params: RegisterProjectFolderParams,
1047-
): Promise<ProjectKey>;
1069+
registerProjectFolder(params: RegisterProjectFolderParams): Promise<ProjectKey>;
10481070
getFileContent(params: GetFileContentParams): Promise<string>;
1049-
pullFileDiagnostics(
1050-
params: PullFileDiagnosticsParams,
1051-
): Promise<PullDiagnosticsResult>;
1071+
pullFileDiagnostics(params: PullFileDiagnosticsParams): Promise<PullDiagnosticsResult>;
10521072
getCompletions(params: GetCompletionsParams): Promise<CompletionsResult>;
10531073
updateSettings(params: UpdateSettingsParams): Promise<void>;
10541074
openFile(params: OpenFileParams): Promise<void>;

0 commit comments

Comments
 (0)