Comments (4)
I don't think it is a good idea to rely on own tsserver, as you mentioned it won't be forward-compatible.
from typescript-language-server.
Well, do you think tsserver tries to be backwards compatible? I don't see what guarantee you have that it will be. It seems dangerous to me to just pick a tsserver from the environment as you do here, since it might be a newer version than what you have tested against. It seems safer to me to bundle a tsserver installation, and if you're doing that, then you might as well use the code in-process, instead of starting up a separate tsserver.
A related issue is that if you support LSP's workspaceFolders feature, then you won't be able to use the tsserver from the project's node_modules, as you do here, since there will be multiple projects. See this issue.
Anyways if you strongly oppose this suggestion, then feel free to close this issue.
from typescript-language-server.
Well, do you think tsserver tries to be backwards compatible?
We are trying to align behavior with the VS Code extension. If they can assume that tsserver is backward compatible, I think we can too.
A related issue is that if you support LSP's workspaceFolders feature, then you won't be able to use the tsserver from the project's node_modules, as you do here, since there will be multiple projects. See this issue.
In VS Code a user is responsible to decide which tsserver should be used via workspace configurations. We can rely on LSP configurations capabilities as well. In the case, if a configuration is not provided we can either prompt a user via the custom request or a fall-back to the first tsserver.
from typescript-language-server.
It's already possible with --tsserver-path
option. The tool can decide which tsserver to use and whether to let a user switch between them.
from typescript-language-server.
Related Issues (20)
- `neovim zipfile scheme handling with yarn pnp > returns zipfile: uri for definition inside node_modules` test failure on `4.3.2` HOT 2
- Language server giving out large array of items when requesting completion HOT 2
- Call LSP refreshCodeLens/refreshInlayHint when codeLens/inlayHint settings changed
- How do I annotate a generic function inside an object? HOT 1
- Support renaming files when renaming default exports
- (bug) Closed document ownership not transferred back to the filesystem HOT 5
- Use diagnostic range when requesting `getCodeFixes` HOT 4
- checkJs on not respected with declaration files HOT 2
- Completion items have incorrect "kind" HOT 6
- Typescript Server Error when `includeInlayVariableTypeHints = true` and an arrow function is made. HOT 1
- Deprecated property not marked as such HOT 3
- problems with `interface` structure HOT 3
- How to Disable "Move to a new file" action? HOT 2
- typescript server error when using 'inlay hints' (Unexpected node.^M) HOT 1
- Debug Failure. Unexpected node. HOT 5
- env: node: No such file or directory on MacOS HOT 3
- SyntaxError: Unexpected token import HOT 1
- importModuleSpecifierEnding is not respected HOT 1
- Unable to initialize, language server cannot read properties of undefined (reading 'workspace') HOT 1
- Add Semantic Tokens for Template Literal Strings HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typescript-language-server.