Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename materialize-sql to mzsql #166

Merged
merged 1 commit into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@
},
"languages": [
{
"id": "materialize-sql",
"id": "mzsql",
"extensions": [
".sql"
".sql",
".mzsql"
],
"aliases": [
"Materialize SQL"
Expand All @@ -56,9 +57,9 @@
],
"grammars": [
{
"language": "materialize-sql",
"scopeName": "source.materialize-sql",
"path": "./syntaxes/materialize-sql.tmLanguage"
"language": "mzsql",
"scopeName": "source.mzsql",
"path": "./syntaxes/mzsql.tmLanguage"
}
],
"menus": {
Expand Down Expand Up @@ -186,7 +187,7 @@
"command": "materialize.run",
"key": "ctrl+enter",
"mac": "cmd+enter",
"when": "resourceLangId == 'sql' || resourceLangId == 'materialize-sql'"
"when": "resourceLangId == 'sql' || resourceLangId == 'mzsql'"
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion src/clients/lsp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,11 @@
bufferStream
.pipe(gunzip)
.pipe(extract)
.on('finish', (d: any) => {

Check warning on line 147 in src/clients/lsp.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

'd' is defined but never used

Check warning on line 147 in src/clients/lsp.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Unexpected any. Specify a different type
console.log("[LSP]", "Server installed.");
res("");
})
.on('error', (error: any) => {

Check warning on line 151 in src/clients/lsp.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Unexpected any. Specify a different type
console.error("[LSP]", "Error during decompression:", error);
rej("Error during compression");
});
Expand Down Expand Up @@ -261,7 +261,7 @@
const formattingWidth = configuration.get('formattingWidth');
console.log("[LSP]", "Formatting width: ", formattingWidth);
const clientOptions: LanguageClientOptions = {
documentSelector: [{ scheme: "file", language: "materialize-sql"}],
documentSelector: [{ scheme: "file", language: "mzsql"}],
initializationOptions: {
formattingWidth,
}
Expand Down Expand Up @@ -373,7 +373,7 @@
}
} catch (err) {
const parsingError = "Error parsing the statements.";
console.error("[LSP]", (err && (err as any).message));

Check warning on line 376 in src/clients/lsp.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Unexpected any. Specify a different type
if (parsingError === (err instanceof Error && err.message)) {
throw new ExtensionError(Errors.parsingFailure, "Syntax errors present in your query.");
} else {
Expand Down
68 changes: 34 additions & 34 deletions syntaxes/materialize-sql.tmLanguage → syntaxes/mzsql.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,28 @@
<key>1</key>
<dict>
<key>name</key>
<string>keyword.other.create.materialize-sql</string>
<string>keyword.other.create.mzsql</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.other.materialize-sql</string>
<string>keyword.other.mzsql</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>keyword.other.materialize-sql</string>
<string>keyword.other.mzsql</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>entity.name.function.materialize-sql</string>
<string>entity.name.function.mzsql</string>
</dict>
</dict>
<key>end</key>
<string>;\s*</string>
<key>name</key>
<string>meta.statement.materialize-sql.create</string>
<string>meta.statement.mzsql.create</string>
<key>patterns</key>
<array>
<dict>
Expand Down Expand Up @@ -80,28 +80,28 @@
<key>1</key>
<dict>
<key>name</key>
<string>keyword.other.create.materialize-sql</string>
<string>keyword.other.create.mzsql</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.other.materialize-sql</string>
<string>keyword.other.mzsql</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>keyword.other.materialize-sql</string>
<string>keyword.other.mzsql</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>entity.name.function.materialize-sql</string>
<string>entity.name.function.mzsql</string>
</dict>
</dict>
<key>end</key>
<string>;\s*</string>
<key>name</key>
<string>meta.statement.materialize-sql.create</string>
<string>meta.statement.mzsql.create</string>
<key>patterns</key>
<array>
<dict>
Expand Down Expand Up @@ -134,15 +134,15 @@
<key>0</key>
<dict>
<key>name</key>
<string>keyword.other.materialize-sql</string>
<string>keyword.other.mzsql</string>
</dict>
</dict>
<key>comment</key>
<string>Last update (including keywords below) using postgres 9.3. See classes/Help.php for update method. Testing change below to just assume starting word is a SQL keyword.</string>
<key>end</key>
<string>;\s*</string>
<key>name</key>
<string>meta.statement.materialize-sql</string>
<string>meta.statement.mzsql</string>
<key>patterns</key>
<array>
<dict>
Expand Down Expand Up @@ -175,15 +175,15 @@
<key>0</key>
<dict>
<key>name</key>
<string>meta.preprocessor.materialize-sql</string>
<string>meta.preprocessor.mzsql</string>
</dict>
</dict>
<key>comment</key>
<string>psql directives</string>
<key>end</key>
<string>\n</string>
<key>name</key>
<string>meta.statement.materialize-sql.psql</string>
<string>meta.statement.mzsql.psql</string>
</dict>
</array>
<key>repository</key>
Expand All @@ -198,13 +198,13 @@
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.comment.materialize-sql</string>
<string>punctuation.definition.comment.mzsql</string>
</dict>
</dict>
<key>match</key>
<string>(--).*$\n?</string>
<key>name</key>
<string>comment.line.double-dash.materialize-sql</string>
<string>comment.line.double-dash.mzsql</string>
</dict>
<dict>
<key>begin</key>
Expand All @@ -214,7 +214,7 @@
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.comment.materialize-sql</string>
<string>punctuation.definition.comment.mzsql</string>
</dict>
</dict>
<key>end</key>
Expand All @@ -237,7 +237,7 @@
<key>end</key>
<string>\1</string>
<key>name</key>
<string>meta.dollar-quote.materialize-sql</string>
<string>meta.dollar-quote.mzsql</string>
<key>patterns</key>
<array>
<dict>
Expand Down Expand Up @@ -274,7 +274,7 @@
<key>1</key>
<dict>
<key>name</key>
<string>keyword.other.materialize-sql</string>
<string>keyword.other.mzsql</string>
</dict>
</dict>
<key>match</key>
Expand All @@ -290,31 +290,31 @@
<key>match</key>
<string>\b\d+\b</string>
<key>name</key>
<string>constant.numeric.materialize-sql</string>
<string>constant.numeric.mzsql</string>
</dict>
<dict>
<key>match</key>
<string>\*</string>
<key>name</key>
<string>keyword.operator.star.materialize-sql</string>
<string>keyword.operator.star.mzsql</string>
</dict>
<dict>
<key>match</key>
<string>[!&lt;&gt;]?=|&lt;&gt;|&lt;|&gt;</string>
<key>name</key>
<string>keyword.operator.comparison.materialize-sql</string>
<string>keyword.operator.comparison.mzsql</string>
</dict>
<dict>
<key>match</key>
<string>-|\+|/</string>
<key>name</key>
<string>keyword.operator.math.materialize-sql</string>
<string>keyword.operator.math.mzsql</string>
</dict>
<dict>
<key>match</key>
<string>\|\|</string>
<key>name</key>
<string>keyword.operator.concatenator.materialize-sql</string>
<string>keyword.operator.concatenator.mzsql</string>
</dict>
</array>
</dict>
Expand All @@ -323,7 +323,7 @@
<key>match</key>
<string>\\.</string>
<key>name</key>
<string>constant.character.escape.materialize-sql</string>
<string>constant.character.escape.mzsql</string>
</dict>
<key>strings</key>
<dict>
Expand All @@ -335,20 +335,20 @@
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.materialize-sql</string>
<string>punctuation.definition.string.begin.mzsql</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.materialize-sql</string>
<string>punctuation.definition.string.end.mzsql</string>
</dict>
</dict>
<key>comment</key>
<string>This is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.</string>
<key>match</key>
<string>(')[^'\\]*(')</string>
<key>name</key>
<string>string.quoted.single.materialize-sql</string>
<string>string.quoted.single.mzsql</string>
</dict>
<dict>
<key>begin</key>
Expand All @@ -358,7 +358,7 @@
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.materialize-sql</string>
<string>punctuation.definition.string.begin.mzsql</string>
</dict>
</dict>
<key>comment</key>
Expand All @@ -370,11 +370,11 @@
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.materialize-sql</string>
<string>punctuation.definition.string.end.mzsql</string>
</dict>
</dict>
<key>name</key>
<string>string.quoted.single.materialize-sql</string>
<string>string.quoted.single.mzsql</string>
<key>patterns</key>
<array>
<dict>
Expand All @@ -389,7 +389,7 @@
<key>match</key>
<string>(")[^"#]*(")</string>
<key>name</key>
<string>variable.other.materialize-sql</string>
<string>variable.other.mzsql</string>
</dict>
<dict>
<key>begin</key>
Expand All @@ -399,13 +399,13 @@
<key>end</key>
<string>\1</string>
<key>name</key>
<string>string.unquoted.dollar.materialize-sql</string>
<string>string.unquoted.dollar.mzsql</string>
</dict>
</array>
</dict>
</dict>
<key>scopeName</key>
<string>source.materialize-sql</string>
<string>source.mzsql</string>
<key>uuid</key>
<string>4D6B679D-111C-4529-B558-3F25487D9E27</string>
</dict>
Expand Down
Loading