Skip to content

Add Shopify Magic support to the VS Code extension #738

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

Merged
merged 15 commits into from
Jan 28, 2025
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
5 changes: 5 additions & 0 deletions .changeset/mean-rocks-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'theme-check-vscode': minor
---

Introduce support to Shopify Magic in the VS Code extension
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
} from '@shopify/theme-check-common';
import {
Connection,
DocumentSelector,
FileOperationRegistrationOptions,
InitializeResult,
ShowDocumentRequest,
Expand Down Expand Up @@ -302,7 +301,6 @@ export function startServer(
save: true,
openClose: true,
},
inlineCompletionProvider: true, // only available in 3.18 (not released yet)
codeActionProvider: {
codeActionKinds: [...CodeActionKinds],
},
Expand Down Expand Up @@ -344,7 +342,7 @@ export function startServer(
name: 'theme-language-server',
version: VERSION,
},
} as InitializeResult;
};

return result;
});
Expand Down
24 changes: 12 additions & 12 deletions packages/vscode-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
"postinstall": "yarn --cwd ./syntaxes install",
"prebuild": "rimraf dist language-configuration.json",
"preinstall": "sh scripts/fetch-syntaxes.sh",
"pretest": "yarn run test:build && yarn run dev:build && yarn run lint",
"pretest": "yarn run test:build && yarn run dev:build",
"publish:vsce": "vsce publish --no-dependencies $npm_package_version",
"test": "vitest",
"test": "vitest -c \"./vitest.config.mjs\"",
"test:build": "tsc -p . --outDir out",
"test:watch": "tsc -p . -w --outDir out",
"type-check": "tsc --noEmit"
Expand All @@ -64,12 +64,12 @@
"@shopify/theme-language-server-browser": "^2.5.0",
"@shopify/theme-language-server-node": "^2.5.0",
"@shopify/theme-check-common": "^3.6.1",
"@shopify/theme-check-docs-updater": "^3.6.1",
"prettier": "^2.6.2",
"vscode-languageclient": "^8.1.0",
"vscode-uri": "^3.0.8"
},
"devDependencies": {
"@shopify/theme-check-docs-updater": "^3.6.1",
"@types/glob": "^8.0.0",
"@types/node": "16.x",
"@types/prettier": "^2.4.2",
Expand Down Expand Up @@ -102,30 +102,30 @@
},
{
"command": "shopifyLiquid.sidefix",
"title": "Apply Sidekick suggestion"
"title": "Apply Shopify Magic suggestion"
},
{
"command": "shopifyLiquid.sidekick",
"title": "✨ Sidekick",
"enablement": "!shopifyLiquid.sidekick.isLoading"
"command": "shopifyLiquid.shopifyMagic",
"title": "✨ Shopify Magic",
"enablement": "!shopifyLiquid.shopifyMagic.isLoading"
},
{
"command": "shopifyLiquid.sidekickLoading",
"command": "shopifyLiquid.shopifyMagicLoading",
"title": "✨ Analyzing",
"enablement": "false"
}
],
"menus": {
"editor/title": [
{
"command": "shopifyLiquid.sidekick",
"command": "shopifyLiquid.shopifyMagic",
"group": "navigation",
"when": "!shopifyLiquid.sidekick.isLoading"
"when": "shopifyLiquid.shopifyMagic.visible"
},
{
"command": "shopifyLiquid.sidekickLoading",
"command": "shopifyLiquid.shopifyMagicLoading",
"group": "navigation",
"when": "shopifyLiquid.sidekick.isLoading"
"when": "shopifyLiquid.shopifyMagicLoading.visible"
}
]
},
Expand Down
Loading