Skip to content

Add command to restart ts server #584

Open

Description

@gilbert

This plugin has been working great for the most part, but sometimes it does strange things, such as not finding a file within typings/ that is clearly there.

Could you add a command (accessible via cmd + shift + p) that restarts the ts server? I think this would help mitigate this and many other issues that other devs experience.

Activity

  1. speedy250 commented on Apr 5, 2017

    @speedy250

    The tsserver simply needs to be fixed. See #585

  2. zhengbli commented on Apr 11, 2017

    @zhengbli
    Contributor

    Can you try the local fix I created at the comment, which fixes a bug in the project system. Let me know if that fixes your issue

  3. jmolero commented on Jun 19, 2017

    @jmolero

    How about running tsserver with something like nodemon?

  4. aMoniker commented on Oct 23, 2018

    @aMoniker

    Any developments on this issue, or the potential fixes to the tsserver? This seems to happen to me sometimes when I leave TS files open and switch between git branches.

  5. kylebebak commented on Apr 26, 2019

    @kylebebak
    Contributor

    There are many things that cause tsserver to fail (adding a module, changing the component in a module from a class component to a function component, etc).

    Just have a look at the following:

    Fortunately, this cool plugin, https://github.com/randy3k/AutomaticPackageReloader, has a command for reloading any Sublime Text plugin.

    Install AutomaticPackageReloader and add something like the following to User/Default.sublime-commands:

    { "caption": "Reload TypeScript Package", "command": "package_reloader_reload", "args": {"pkg_name": "TypeScript"} },

    Or, to your sublime-keymap file:

    { "keys": ["super+ctrl+alt+t"], "command": "package_reloader_reload", "args": {"pkg_name": "TypeScript"} },

    This reloads the TypeScript package, and in most every case I've seen makes it actually start working again. This is a lot easier and faster than restarting Sublime Text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions