Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.

Windows support #5

Closed
charlespwd opened this issue Jan 20, 2021 · 21 comments · Fixed by #35
Closed

Windows support #5

charlespwd opened this issue Jan 20, 2021 · 21 comments · Fixed by #35
Assignees

Comments

@charlespwd
Copy link
Contributor

Would need upstream support from Shopify/theme-check first. Not too sure what the implications are. Bat file? No idea.

@YourWishes
Copy link

When the gem file is installed for theme you can locate it using the windows command which.exe which is a rough approximation for which on UNIX based systems, I'll do a fork to get this implemented.

Example;
image

Important is how the response returns all known paths, even if multiple exist. Ideally I believe the .bat is preferred where possible.

@superfein
Copy link

Hi @YourWishes, I'm a Windows user and was wondering what the status is of the PR? When I install Theme Check in VSC I get this notification: "The 'shopify' executable was not found on your $PATH. Was it installed? The path can also be changed via the "shopifyLiquid.shopifyCLIPath" setting."

Until Theme Check supports Windows, is there any way for me to manually add the $PATH in the extension settings, and do you know what the paths are for Shopify CLI and the Language Server?

Thanks!

@charlespwd charlespwd self-assigned this Jul 12, 2021
@charlespwd
Copy link
Contributor Author

I'm picking this up this week. Coming soon :)

@charlespwd
Copy link
Contributor Author

charlespwd commented Jul 15, 2021

Some notes:

I've found that ruby on Windows is 3x slower than on Linux 😢. The two above PRs assumes that you installed theme-check on Windows (cmd or powershell). This means that, as a Windows user, because ruby is slower on Windows, checks will come in 3x as much time.

I've experienced 5s on Windows Subsystem for Linux (Ubuntu) and 15s on cmd.exe on a 2019 macbook pro running Windows via bootcamp.

There might be a way to go around this by using Windows Subsystem For Linux, but I'm no Windows wiz so I'm not too sure how we'd set that up in the VS Code extension. Plus, I fear that would make the installation steps a tad complicated.

Might be OK if we dump that info in a TROUBLESHOOTING file or something.

Would gladly accept help on this, in the meantime it will work. If that's fast enough for you, good :) The Language Server (completions and stuff) shouldn't feel too slow, but it's the checking that I'm slightly worried about.

@charlespwd
Copy link
Contributor Author

https://code.visualstudio.com/docs/remote/wsl#_managing-extensions looks like a good read.

@charlespwd

This comment has been minimized.

@charlespwd

This comment has been minimized.

@charlespwd
Copy link
Contributor Author

The latest version of theme-check (v1.5.0) should get a Windows user up and running.

gem install theme-check

Please report any issues!

Outstanding issues:

There's a bug in shopify theme language-server that makes it behave differently than theme-check-language-server. Until this is fixed, I have temporarily removed support for the Shopify CLI installation.

@cnscorpions
Copy link

1. gem install theme-check
2. gem install theme-check

It works very well now. @charlespwd thank you 😄

@JoeyPriceless
Copy link

The latest version of theme-check (v1.5.0) should get a Windows user up and running.

gem install theme-check

Please report any issues!

Outstanding issues:

There's a bug in shopify theme language-server that makes it behave differently than theme-check-language-server. Until this is fixed, I have temporarily removed support for the Shopify CLI installation.

For anyone coming here because of the visual studio error The Theme Check Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted.

I got the above issue because I was using theme-check v1.2.0. Upgrading to v1.5.0 removed the issue.

@ADTC
Copy link

ADTC commented Oct 18, 2021

Could I have a settings option to suppress the warning? 😆

image

@lorand-horvath
Copy link
Contributor

There's a bug in shopify theme language-server that makes it behave differently than theme-check-language-server. Until this is fixed, I have temporarily removed support for the Shopify CLI installation.

Has this issue been fixed?

@lorand-horvath
Copy link
Contributor

lorand-horvath commented Feb 2, 2022

There's a bug in shopify theme language-server that makes it behave differently than theme-check-language-server. Until this is fixed, I have temporarily removed support for the Shopify CLI installation.

@charlespwd Any news about this issue? Has it been fixed? It's been holding me back from switching over to using shopify-cli instead of themekit on Windows, for quite some time now.
I took notice of your work regarding syntax highlighting in #61 which looks really good. So I'd very much like to try these improvements in version 1.3.0 under Windows.
Many thanks!

@willbroderick
Copy link

willbroderick commented Mar 8, 2022

I just want to mention the plugin works perfectly for me using WSL2/Ubuntu on Windows 11.

My theme files/workspace/theme-check/stylelint/etc are all on WSL, I'm just more comfortable in a Linux shell (and Windows Terminal is quite nice to use).

The info on this page helped me understand switching VS Code to run on WSL - https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl
The link from higher up this thread explains reinstalling the extensions when VS Code is on WSL - https://code.visualstudio.com/docs/remote/wsl#_managing-extensions
That's all the setup it needed.

@ADTC
Copy link

ADTC commented Mar 8, 2022

I just want to mention the plugin works perfectly for me using WSL2/Ubuntu on Windows 11.

My theme files/workspace/theme-check/stylelint/etc are all on WSL

Technically you're on Linux (not Windows) when you use WSL (WSL2 to be specific). So I don't think it would qualify as "it works on Windows". More of: "It works on virtualized Linux running on a Windows host."

@divixdev
Copy link

I just would like add my situation here :
I've switched to windows 8.1 and I've installed the default Shopify extension for vscode the one that says it needs theme-check.. it did not work for me .. so I disabled it and installed this
https://marketplace.visualstudio.com/items?itemName=killalau.vscode-liquid-snippets
it works just fine for auto completion ,you will also need to install Liquid Languages Support extension

@Carson-JG
Copy link

On Windows 10:

  1. Installed Plugin on VS Code
  2. Installed Ruby+Devkit (MSYS2 base install)
  3. Ran gem install theme-check
  4. Used where.exe theme-check-language-server to get path to .bat
  5. In VS Code settings.json, set "shopifyLiquid.languageServerPath" to path from step 4
  6. Restart VS Code
  7. Profit

@gyotov
Copy link

gyotov commented Aug 31, 2023

On Windows 10:

  1. Installed Plugin on VS Code
  2. Installed Ruby+Devkit (MSYS2 base install)
  3. Ran gem install theme-check
  4. Used where.exe theme-check-language-server to get path to .bat
  5. In VS Code settings.json, set "shopifyLiquid.languageServerPath" to path from step 4
  6. Restart VS Code
  7. Profit

Works like a charm! Thanks @Carson-JG

@mhraihan
Copy link

5. "shopifyLiquid.languageServerPath"

"shopifyLiquid.languageServerPath": "C:\Users\raihan\AppData\Local\Microsoft\WindowsApps\theme-check-language-server.bat",
do I need to apply like this?

@charlespwd
Copy link
Contributor Author

Just wait a week, it'll be baked in the VS Code extension without an out-of-band installation step. It will also get automatically updated from then on.

@mzachdev
Copy link

mzachdev commented Feb 3, 2024

@charlespwd please see my latest issue, I believe it's connected with this thread:
Shopify/theme-tools#276

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.