Errors in VSCode with Shopify Liquid Extension: Hover and Completion Issues

I’m encountering problems with the official Shopify liquid extension in VSCode. Specifically, the textDocument/hover, documentLink, and completion features are failing. Despite restarting VSCode multiple times and deactivating other extensions, the issues persist. I also attempted to remove and reinstall the extension but continue to face the same errors. Has anyone else experienced this? I’m keen on using this extension due to its superior autocomplete features compared to others I’ve tried. I would appreciate any advice on resolving this.

The Shopify Liquid extension can be pretty finicky with file associations and project setups. I’ve seen it fail to load properly when you’re not using a standard Shopify structure or have conflicting language settings. Try making a fresh workspace just for your Shopify theme - make sure you’ve got the usual folders (templates, sections, snippets) in your root directory. What helped me was manually adding file associations in user settings. Just add “*.liquid”: “liquid” if it’s missing. The extension also breaks when there’s bad syntax in your liquid files. Comment out any sketchy code temporarily and see if everything starts working again. The language server gets hung up trying to parse broken liquid syntax.

update vs code to the latest version - the shopify extension gets buggy with older builds. also check that you’ve got liquid language mode selected in the bottom right corner. mine kept defaulting to html and breaking everything. if you can find it, try opening the command palette and running “liquid: restart language server” - that fixed it for me.

run vscode as admin - i know it sounds weird, but the shopify extension gets permission issues sometimes. also check you don’t have other liquid extensions running at the same time, they conflict like crazy. i had to completely uninstall all the liquid stuff and just keep the official shopify one.

Had the same problem with Shopify Liquid extension about six months back. It’s usually workspace settings clashing with the extension. Check your workspace settings.json file for any liquid configs that might be causing trouble. I had an old language server setting that was messing everything up. Also double-check that your theme files have the right .liquid extensions - this extension’s picky about project structure. What fixed it for me was clearing VSCode’s workspace storage. Close all your liquid files, hit Ctrl+Shift+P, then run “Developer: Reload Window.” Forces the extension to restart fresh and should bring back your hover and completion features.

This extension has a Node.js compatibility issue that causes exactly what you’re seeing. The Shopify Liquid extension needs specific Node versions to work - if yours is incompatible, hover and completion just break silently. Run node --version and make sure you’re on 16.x or higher. I hit this same problem last month and switching from Node 19 to 18 LTS fixed it completely. Also check the Output panel under Shopify Liquid channel for any error messages - that’s where it logs startup problems. Try clearing the extension host cache too: run “Developer: Reload Window With Extensions Disabled” then re-enable just the Shopify extension.