@duckcodeailabs/dql-lsp 0.1.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,123 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction, and
10
+ distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright
13
+ owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other entities
16
+ that control, are controlled by, or are under common control with that entity.
17
+ For the purposes of this definition, "control" means (i) the power, direct or
18
+ indirect, to cause the direction or management of such entity, whether by
19
+ contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
20
+ outstanding shares, or (iii) beneficial ownership of such entity.
21
+
22
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
23
+ permissions granted by this License.
24
+
25
+ "Source" form shall mean the preferred form for making modifications, including
26
+ but not limited to software source code, documentation source, and configuration
27
+ files.
28
+
29
+ "Object" form shall mean any form resulting from mechanical transformation or
30
+ translation of a Source form, including but not limited to compiled object code,
31
+ generated documentation, and conversions to other media types.
32
+
33
+ "Work" shall mean the work of authorship, whether in Source or Object form, made
34
+ available under the License, as indicated by a copyright notice that is included
35
+ in or attached to the work.
36
+
37
+ "Derivative Works" shall mean any work, whether in Source or Object form, that
38
+ is based on (or derived from) the Work and for which the editorial revisions,
39
+ annotations, elaborations, or other modifications represent, as a whole, an
40
+ original work of authorship.
41
+
42
+ "Contribution" shall mean any work of authorship, including the original version
43
+ of the Work and any modifications or additions to that Work or Derivative Works
44
+ thereof, that is intentionally submitted to Licensor for inclusion in the Work
45
+ by the copyright owner or by an individual or Legal Entity authorized to submit
46
+ on behalf of the copyright owner.
47
+
48
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf
49
+ of whom a Contribution has been received by Licensor and subsequently
50
+ incorporated within the Work.
51
+
52
+ 2. Grant of Copyright License.
53
+
54
+ Subject to the terms and conditions of this License, each Contributor hereby
55
+ grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
56
+ irrevocable copyright license to reproduce, prepare Derivative Works of,
57
+ publicly display, publicly perform, sublicense, and distribute the Work and such
58
+ Derivative Works in Source or Object form.
59
+
60
+ 3. Grant of Patent License.
61
+
62
+ Subject to the terms and conditions of this License, each Contributor hereby
63
+ grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
64
+ irrevocable patent license to make, have made, use, offer to sell, sell, import,
65
+ and otherwise transfer the Work.
66
+
67
+ 4. Redistribution.
68
+
69
+ You may reproduce and distribute copies of the Work or Derivative Works thereof
70
+ in any medium, with or without modifications, and in Source or Object form,
71
+ provided that You meet the following conditions:
72
+
73
+ (a) You must give any other recipients of the Work or Derivative Works a copy of
74
+ this License; and
75
+
76
+ (b) You must cause any modified files to carry prominent notices stating that
77
+ You changed the files; and
78
+
79
+ (c) You must retain, in the Source form of any Derivative Works that You
80
+ distribute, all copyright, patent, trademark, and attribution notices from the
81
+ Source form of the Work, excluding those notices that do not pertain to any part
82
+ of the Derivative Works; and
83
+
84
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then
85
+ any Derivative Works that You distribute must include a readable copy of the
86
+ attribution notices contained within such NOTICE file, excluding those notices
87
+ that do not pertain to any part of the Derivative Works.
88
+
89
+ 5. Submission of Contributions.
90
+
91
+ Unless You explicitly state otherwise, any Contribution intentionally submitted
92
+ for inclusion in the Work by You to the Licensor shall be under the terms and
93
+ conditions of this License, without any additional terms or conditions.
94
+
95
+ 6. Trademarks.
96
+
97
+ This License does not grant permission to use the trade names, trademarks,
98
+ service marks, or product names of the Licensor, except as required for
99
+ reasonable and customary use in describing the origin of the Work.
100
+
101
+ 7. Disclaimer of Warranty.
102
+
103
+ Unless required by applicable law or agreed to in writing, Licensor provides the
104
+ Work on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
105
+ express or implied, including, without limitation, any warranties or conditions
106
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR
107
+ PURPOSE.
108
+
109
+ 8. Limitation of Liability.
110
+
111
+ In no event and under no legal theory, whether in tort (including negligence),
112
+ contract, or otherwise, unless required by applicable law, shall any Contributor
113
+ be liable to You for damages, including any direct, indirect, special,
114
+ incidental, or consequential damages of any character arising as a result of this
115
+ License or out of the use or inability to use the Work.
116
+
117
+ 9. Accepting Warranty or Additional Liability.
118
+
119
+ While redistributing the Work or Derivative Works thereof, You may choose to
120
+ offer, and charge a fee for, acceptance of support, warranty, indemnity, or
121
+ other liability obligations and/or rights consistent with this License.
122
+
123
+ END OF TERMS AND CONDITIONS
package/dist/cli.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
package/dist/cli.js ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import { startServer } from './server.js';
3
+ startServer();
4
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,WAAW,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { startServer } from './server.js';
2
+ export { DQLLanguageService } from './language-service.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export { startServer } from './server.js';
2
+ export { DQLLanguageService } from './language-service.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,41 @@
1
+ export interface LSDiagnostic {
2
+ range: {
3
+ start: {
4
+ line: number;
5
+ character: number;
6
+ };
7
+ end: {
8
+ line: number;
9
+ character: number;
10
+ };
11
+ };
12
+ severity: 1 | 2 | 3 | 4;
13
+ message: string;
14
+ source: string;
15
+ }
16
+ export interface CompletionItem {
17
+ label: string;
18
+ kind: number;
19
+ detail?: string;
20
+ insertText?: string;
21
+ }
22
+ export interface HoverResult {
23
+ contents: string;
24
+ range?: {
25
+ start: {
26
+ line: number;
27
+ character: number;
28
+ };
29
+ end: {
30
+ line: number;
31
+ character: number;
32
+ };
33
+ };
34
+ }
35
+ export declare class DQLLanguageService {
36
+ format(source: string): string;
37
+ validate(source: string, uri: string): LSDiagnostic[];
38
+ getCompletions(source: string, line: number, character: number): CompletionItem[];
39
+ getHover(source: string, line: number, character: number): HoverResult | null;
40
+ }
41
+ //# sourceMappingURL=language-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"language-service.d.ts","sourceRoot":"","sources":["../src/language-service.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE;QAAE,KAAK,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,MAAM,CAAA;SAAE,CAAC;QAAC,GAAG,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC;IAChG,QAAQ,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE;QAAE,KAAK,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,MAAM,CAAA;SAAE,CAAC;QAAC,GAAG,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC;CAClG;AA+BD,qBAAa,kBAAkB;IAC7B,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAI9B,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,YAAY,EAAE;IAsCrD,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,cAAc,EAAE;IAmDjF,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI;CA0E9E"}
@@ -0,0 +1,176 @@
1
+ import { parse, analyze, formatDQL } from '@duckcodeailabs/dql-core';
2
+ const CHART_TYPES = [
3
+ 'line', 'bar', 'pie', 'scatter', 'area', 'heatmap', 'kpi', 'metric', 'table',
4
+ 'stacked_bar', 'grouped_bar', 'combo', 'histogram', 'funnel',
5
+ 'treemap', 'sankey', 'sparkline', 'small_multiples',
6
+ 'gauge', 'waterfall', 'boxplot', 'geo',
7
+ ];
8
+ const FILTER_TYPES = ['dropdown', 'date_range', 'text', 'multi_select', 'range'];
9
+ const KEYWORDS = [
10
+ 'dashboard', 'workbook', 'page', 'layout', 'row', 'span',
11
+ 'chart', 'filter', 'param', 'import', 'from', 'use', 'let',
12
+ ];
13
+ const DECORATORS = [
14
+ 'schedule', 'email_to', 'slack_channel', 'cache', 'if', 'rls', 'alert', 'materialize', 'refresh',
15
+ ];
16
+ const CHART_ARGS = [
17
+ 'x', 'y', 'title', 'color', 'size', 'width', 'height',
18
+ 'x_axis_label', 'y_axis_label', 'color_field', 'orientation',
19
+ 'show_grid', 'show_legend', 'fill_opacity', 'line_width',
20
+ 'inner_radius', 'theme', 'sortable', 'page_size', 'facet',
21
+ 'y2', 'tooltip', 'format_x', 'format_y', 'color_rule',
22
+ 'connection', 'pin_columns', 'row_color', 'topology_url',
23
+ 'drill_hierarchy', 'drill_path', 'drill_mode',
24
+ 'drill_down', 'link_to', 'on_click', 'filter_by',
25
+ ];
26
+ export class DQLLanguageService {
27
+ format(source) {
28
+ return formatDQL(source);
29
+ }
30
+ validate(source, uri) {
31
+ const diagnostics = [];
32
+ try {
33
+ const ast = parse(source, uri);
34
+ const dqlDiags = analyze(ast);
35
+ for (const d of dqlDiags) {
36
+ diagnostics.push({
37
+ range: {
38
+ start: { line: d.span.start.line - 1, character: d.span.start.column - 1 },
39
+ end: { line: d.span.end.line - 1, character: d.span.end.column - 1 },
40
+ },
41
+ severity: d.severity === 'error' ? 1 : d.severity === 'warning' ? 2 : 3,
42
+ message: d.message,
43
+ source: 'dql',
44
+ });
45
+ }
46
+ }
47
+ catch (parseError) {
48
+ // Parse errors — try to extract line info
49
+ const msg = parseError.message ?? String(parseError);
50
+ const lineMatch = msg.match(/line (\d+)/i);
51
+ const line = lineMatch ? parseInt(lineMatch[1], 10) - 1 : 0;
52
+ diagnostics.push({
53
+ range: {
54
+ start: { line, character: 0 },
55
+ end: { line, character: 100 },
56
+ },
57
+ severity: 1,
58
+ message: msg,
59
+ source: 'dql',
60
+ });
61
+ }
62
+ return diagnostics;
63
+ }
64
+ getCompletions(source, line, character) {
65
+ const lines = source.split('\n');
66
+ const currentLine = lines[line] ?? '';
67
+ const textBefore = currentLine.substring(0, character);
68
+ const items = [];
69
+ // After "chart." — suggest chart types
70
+ if (textBefore.match(/chart\.\s*$/)) {
71
+ for (const ct of CHART_TYPES) {
72
+ items.push({ label: ct, kind: 3, detail: `chart.${ct}(...)`, insertText: `${ct}(` });
73
+ }
74
+ return items;
75
+ }
76
+ // After "filter." — suggest filter types
77
+ if (textBefore.match(/filter\.\s*$/)) {
78
+ for (const ft of FILTER_TYPES) {
79
+ items.push({ label: ft, kind: 3, detail: `filter.${ft}(...)`, insertText: `${ft}(` });
80
+ }
81
+ return items;
82
+ }
83
+ // After "@" — suggest decorators
84
+ if (textBefore.match(/@\s*$/)) {
85
+ for (const dec of DECORATORS) {
86
+ items.push({ label: dec, kind: 3, detail: `@${dec}(...)`, insertText: `${dec}(` });
87
+ }
88
+ return items;
89
+ }
90
+ // Inside chart args (after comma or opening paren) — suggest named args
91
+ if (textBefore.match(/,\s*$/) || textBefore.match(/\(\s*$/)) {
92
+ // Check if we're inside a chart call
93
+ const fullText = lines.slice(0, line + 1).join('\n');
94
+ if (fullText.match(/chart\.\w+\([^)]*$/s)) {
95
+ for (const arg of CHART_ARGS) {
96
+ items.push({ label: arg, kind: 5, detail: `${arg} = ...`, insertText: `${arg} = ` });
97
+ }
98
+ return items;
99
+ }
100
+ }
101
+ // Default: suggest keywords
102
+ for (const kw of KEYWORDS) {
103
+ items.push({ label: kw, kind: 14, detail: `keyword` });
104
+ }
105
+ return items;
106
+ }
107
+ getHover(source, line, character) {
108
+ const lines = source.split('\n');
109
+ const currentLine = lines[line] ?? '';
110
+ // Extract word at position
111
+ const wordMatch = currentLine.substring(0, character + 20).match(/(\w+)$/);
112
+ if (!wordMatch)
113
+ return null;
114
+ const word = wordMatch[1];
115
+ // Chart type hover
116
+ if (CHART_TYPES.includes(word)) {
117
+ const descriptions = {
118
+ line: 'Line chart — time series and trend visualization',
119
+ bar: 'Bar chart — categorical comparisons',
120
+ pie: 'Pie chart — part-of-whole distribution',
121
+ scatter: 'Scatter plot — correlation and distribution',
122
+ area: 'Area chart — cumulative or stacked areas',
123
+ heatmap: 'Heatmap — matrix density visualization',
124
+ kpi: 'KPI card — single metric display',
125
+ metric: 'Metric card — alias for KPI',
126
+ table: 'Data table — tabular display with sorting/pagination',
127
+ stacked_bar: 'Stacked bar — categorical bars with color stacking',
128
+ grouped_bar: 'Grouped bar — side-by-side categorical bars',
129
+ combo: 'Combo chart — dual-axis bar + line overlay',
130
+ histogram: 'Histogram — frequency distribution',
131
+ funnel: 'Funnel chart — conversion funnel visualization',
132
+ treemap: 'Treemap — hierarchical part-to-whole rectangles',
133
+ sankey: 'Sankey chart — weighted source-to-target flows',
134
+ sparkline: 'Sparkline — compact trend line for dense KPI contexts',
135
+ small_multiples: 'Small multiples — faceted mini-charts by category',
136
+ gauge: 'Gauge chart — speedometer-style metric',
137
+ waterfall: 'Waterfall chart — running total with positive/negative',
138
+ boxplot: 'Box plot — statistical distribution (quartiles, outliers)',
139
+ geo: 'Geo chart — map/topology-driven point and region overlays',
140
+ };
141
+ return { contents: `**chart.${word}**\n\n${descriptions[word] ?? ''}` };
142
+ }
143
+ // Keyword hover
144
+ const keywordDocs = {
145
+ dashboard: '`dashboard "Title" { ... }` — Define a single-page dashboard',
146
+ workbook: '`workbook "Title" { page ... }` — Multi-page report container',
147
+ page: '`page "Name" { ... }` — A page within a workbook',
148
+ layout: '`layout(columns = 12) { row { ... } }` — Grid layout control',
149
+ row: '`row { chart... span N }` — Horizontal row of charts',
150
+ span: '`chart.type(...) span N` — Column span in layout grid',
151
+ param: '`param name: type = default` — Dashboard parameter',
152
+ import: '`import { name } from "./file.dql"` — Import components',
153
+ use: '`use imported_name` — Use an imported component',
154
+ };
155
+ if (keywordDocs[word]) {
156
+ return { contents: keywordDocs[word] };
157
+ }
158
+ // Decorator hover
159
+ if (DECORATORS.includes(word)) {
160
+ const decDocs = {
161
+ schedule: '`@schedule("cron_expr")` — Schedule recurring execution',
162
+ email_to: '`@email_to("addr")` — Email report delivery',
163
+ slack_channel: '`@slack_channel("#channel")` — Slack notification',
164
+ cache: '`@cache(ttl = 300)` — Cache query results',
165
+ if: '`@if("param_name")` — Conditionally show chart',
166
+ rls: '`@rls("column", "{user.org}")` — Row-level security',
167
+ alert: '`@alert("SQL", "> 0")` — Conditional alert trigger',
168
+ materialize: '`@materialize(refresh = "hourly")` — Materialized view cache',
169
+ refresh: '`@refresh(interval = 30)` — Auto-refresh interval (seconds)',
170
+ };
171
+ return { contents: decDocs[word] ?? `@${word} decorator` };
172
+ }
173
+ return null;
174
+ }
175
+ }
176
+ //# sourceMappingURL=language-service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"language-service.js","sourceRoot":"","sources":["../src/language-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAsBrE,MAAM,WAAW,GAAG;IAClB,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO;IAC5E,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ;IAC5D,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,iBAAiB;IACnD,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK;CACvC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;AAEjF,MAAM,QAAQ,GAAG;IACf,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM;IACxD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,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EAAE,CAAC;QACzC,CAAC;QAED,kBAAkB;QAClB,IAAI,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YAC9B,MAAM,OAAO,GAA2B;gBACtC,QAAQ,EAAE,yDAAyD;gBACnE,QAAQ,EAAE,6CAA6C;gBACvD,aAAa,EAAE,mDAAmD;gBAClE,KAAK,EAAE,2CAA2C;gBAClD,EAAE,EAAE,gDAAgD;gBACpD,GAAG,EAAE,qDAAqD;gBAC1D,KAAK,EAAE,oDAAoD;gBAC3D,WAAW,EAAE,8DAA8D;gBAC3E,OAAO,EAAE,6DAA6D;aACvE,CAAC;YACF,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,YAAY,EAAE,CAAC;QAC7D,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export declare function startServer(): void;
2
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAiBA,wBAAgB,WAAW,IAAI,IAAI,CAkHlC"}
package/dist/server.js ADDED
@@ -0,0 +1,105 @@
1
+ import { createConnection, TextDocuments, ProposedFeatures, TextDocumentSyncKind, CompletionItemKind, DiagnosticSeverity, } from 'vscode-languageserver/node.js';
2
+ import { TextDocument } from 'vscode-languageserver-textdocument';
3
+ import { DQLLanguageService } from './language-service.js';
4
+ export function startServer() {
5
+ const connection = createConnection(ProposedFeatures.all);
6
+ const documents = new TextDocuments(TextDocument);
7
+ const service = new DQLLanguageService();
8
+ connection.onInitialize((_params) => {
9
+ return {
10
+ capabilities: {
11
+ textDocumentSync: TextDocumentSyncKind.Incremental,
12
+ completionProvider: {
13
+ resolveProvider: false,
14
+ triggerCharacters: ['.', '@', ',', '('],
15
+ },
16
+ hoverProvider: true,
17
+ documentFormattingProvider: true,
18
+ diagnosticProvider: {
19
+ interFileDependencies: false,
20
+ workspaceDiagnostics: false,
21
+ },
22
+ },
23
+ };
24
+ });
25
+ // Validate on open and change
26
+ documents.onDidChangeContent((change) => {
27
+ validateDocument(change.document);
28
+ });
29
+ function validateDocument(doc) {
30
+ const source = doc.getText();
31
+ const lsDiags = service.validate(source, doc.uri);
32
+ const diagnostics = lsDiags.map((d) => ({
33
+ range: d.range,
34
+ severity: mapSeverity(d.severity),
35
+ message: d.message,
36
+ source: d.source,
37
+ }));
38
+ connection.sendDiagnostics({ uri: doc.uri, diagnostics });
39
+ }
40
+ function mapSeverity(s) {
41
+ switch (s) {
42
+ case 1: return DiagnosticSeverity.Error;
43
+ case 2: return DiagnosticSeverity.Warning;
44
+ case 3: return DiagnosticSeverity.Information;
45
+ case 4: return DiagnosticSeverity.Hint;
46
+ }
47
+ }
48
+ // Completions
49
+ connection.onCompletion((params) => {
50
+ const doc = documents.get(params.textDocument.uri);
51
+ if (!doc)
52
+ return [];
53
+ const source = doc.getText();
54
+ const items = service.getCompletions(source, params.position.line, params.position.character);
55
+ return items.map((item) => ({
56
+ label: item.label,
57
+ kind: mapCompletionKind(item.kind),
58
+ detail: item.detail,
59
+ insertText: item.insertText,
60
+ }));
61
+ });
62
+ function mapCompletionKind(kind) {
63
+ switch (kind) {
64
+ case 3: return CompletionItemKind.Function;
65
+ case 5: return CompletionItemKind.Field;
66
+ case 14: return CompletionItemKind.Keyword;
67
+ default: return CompletionItemKind.Text;
68
+ }
69
+ }
70
+ // Hover
71
+ connection.onHover((params) => {
72
+ const doc = documents.get(params.textDocument.uri);
73
+ if (!doc)
74
+ return null;
75
+ const source = doc.getText();
76
+ const result = service.getHover(source, params.position.line, params.position.character);
77
+ if (!result)
78
+ return null;
79
+ return {
80
+ contents: { kind: 'markdown', value: result.contents },
81
+ };
82
+ });
83
+ connection.onDocumentFormatting((params) => {
84
+ const doc = documents.get(params.textDocument.uri);
85
+ if (!doc)
86
+ return [];
87
+ const source = doc.getText();
88
+ const formatted = service.format(source);
89
+ if (formatted === source)
90
+ return [];
91
+ const lastLine = doc.lineCount > 0 ? doc.lineCount - 1 : 0;
92
+ const rawLines = doc.getText().split(/\r?\n/);
93
+ const lastText = rawLines[rawLines.length - 1] ?? '';
94
+ return [{
95
+ range: {
96
+ start: { line: 0, character: 0 },
97
+ end: { line: lastLine, character: lastText.length },
98
+ },
99
+ newText: formatted,
100
+ }];
101
+ });
102
+ documents.listen(connection);
103
+ connection.listen();
104
+ }
105
+ //# sourceMappingURL=server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAGhB,oBAAoB,EAEpB,kBAAkB,EAGlB,kBAAkB,GAEnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,UAAU,WAAW;IACzB,MAAM,UAAU,GAAG,gBAAgB,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC1D,MAAM,SAAS,GAAG,IAAI,aAAa,CAAC,YAAY,CAAC,CAAC;IAClD,MAAM,OAAO,GAAG,IAAI,kBAAkB,EAAE,CAAC;IAEzC,UAAU,CAAC,YAAY,CAAC,CAAC,OAAyB,EAAoB,EAAE;QACtE,OAAO;YACL,YAAY,EAAE;gBACZ,gBAAgB,EAAE,oBAAoB,CAAC,WAAW;gBAClD,kBAAkB,EAAE;oBAClB,eAAe,EAAE,KAAK;oBACtB,iBAAiB,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;iBACxC;gBACD,aAAa,EAAE,IAAI;gBACnB,0BAA0B,EAAE,IAAI;gBAChC,kBAAkB,EAAE;oBAClB,qBAAqB,EAAE,KAAK;oBAC5B,oBAAoB,EAAE,KAAK;iBAC5B;aACF;SACF,CAA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,UAAU,CAAC,MAAM,EAAE,CAAC;AACtB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@duckcodeailabs/dql-lsp",
3
+ "version": "0.1.0",
4
+ "description": "DQL Language Server Protocol implementation",
5
+ "license": "Apache-2.0",
6
+ "type": "module",
7
+ "main": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "bin": {
10
+ "dql-lsp": "./dist/cli.js"
11
+ },
12
+ "files": [
13
+ "dist"
14
+ ],
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/duckcode-ai/dql.git",
18
+ "directory": "packages/dql-lsp"
19
+ },
20
+ "publishConfig": {
21
+ "access": "public"
22
+ },
23
+ "dependencies": {
24
+ "vscode-languageserver": "^9.0.1",
25
+ "vscode-languageserver-textdocument": "^1.0.11",
26
+ "@duckcodeailabs/dql-core": "0.1.0"
27
+ },
28
+ "devDependencies": {
29
+ "typescript": "^5.3.0"
30
+ },
31
+ "engines": {
32
+ "node": ">=18.0.0"
33
+ },
34
+ "scripts": {
35
+ "build": "rm -rf dist tsconfig.tsbuildinfo && tsc -b",
36
+ "dev": "tsc --watch"
37
+ }
38
+ }