This is the Node.js wrapper of the runtime-agnostic @shopify/theme-language-server-node package. It comes with batteries included.
See the @shopify/theme-language-server-common README for more details.
The server runs built-in checks by default. To enable trusted custom checks, pass the Node authorization options as the third argument of startServer:
import { startServer } from '@shopify/theme-language-server-node';
startServer(undefined, undefined, {
authorizeCustomChecks: async ({ root, candidates }) => {
return requestPermissionFromUser(root, candidates);
},
});The embedding application owns the permission decision. An LSP client request by itself does not enable custom code; the application must supply the authorization callback.
MIT.