Typescript plugins configuration on NixOS #11489
Unanswered
bymoses
asked this question in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've struggled for a half of a day to figure things out about Vue's new LSP implementation that uses Volar (kind of sdk for typescript plugins). So I need a place to share this.
Typescript has plugin system that you can use in two different ways:
tsconfig.json
file:This plugis are resolved using project's
node_modules
or local files (if you're using file paths)tsconfig.json
. This configuration is done by your IDE/text editor config file. In our case - Helix.So which one should I use?
Actually when it comes to LS, it seems like TS is not allowing us to use local plugins for custom filetypes like
vue
. So our single option here is to use global configuration.Which tsserver should I use?
You could use two types of tsserver environments: local and global. IMHO the right way is to always use local tsserver, that already included in
typescript
npm package. This makes your project dev environment more reproducible for your teammates.Also when you choose to use tsserver this way, it becomes possible to use local typescript plugins because plugin resolution mechanism of tsserver will also test path
<project_path>/node_modules/typescript/bin/tsserver.js/../../..
.NixOS config (home manager)
Beta Was this translation helpful? Give feedback.
All reactions