Git Product home page Git Product logo

Comments (4)

akosyakov avatar akosyakov commented on August 23, 2024

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.

keyboardDrummer avatar keyboardDrummer commented on August 23, 2024

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.

akosyakov avatar akosyakov commented on August 23, 2024

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.

akosyakov avatar akosyakov commented on August 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.