Language Service ✨
The Clawject Language Service provides code editors (VSCode, WebStorm, etc.) with a way to get compile-time errors, suggestions about Beans, Configurations, Imports, etc.
Clawject package provides language service plugin itself,
but it can't be used directly because TypeScript not allows using language services that are not package itself,
so @clawject/language-service
package have @clawject/di
as a peer-dependency and re-exporting its language service,
so you shouldn't worry about versions compatibility, @clawject/language-service
will always have single version
and just re-use @clawject/di
language service.
Installation
- yarn
- npm
yarn add @clawject/language-service -D
npm install @clawject/language-service --save-dev
After adding @clawject/language-service
to your project, you need to configure your editor to use it.
Let's start with adding plugin entry to your tsconfig.json:
{
"compilerOptions": {
"plugins": [
{ "name": "@clawject/language-service" }
]
}
}
Then you need to restart your code-editor or typescript language service,
and it should start using @clawject/language-service
.
If it's not worked for you - you can try to configure your editor manually to use typescript language service: