• Sign In



  • Categories

    Extension Details



    Readme

    TypeScript LSP

    TypeScript LSP provides error checking, advanced autocomplete, type information and JSDoc integration for TypeScript using TypeScript Language Server. It keeps its components up-to-date automatically, ensuring you always have the latest features.

    Screenshot of the TypeScript repository inside Nova, showing TypeScript LSP providing information and JavaDoc documentation for a type.

    Requirements

    TypeScript LSP is designed to run out of the box, but it does require an installation of node.js, which you probably already have if you're using TypeScript. If you don't, you can install it directly, with MacPorts, or with Homebrew.

    Usage

    TypeScript LSP automatically runs whenever you open a JavaScript, TypeScript, JSX or TSX file, or when your workspace has a tsconfig.json file in it. It keeps both its Language Server and its bundled TypeScript installation up-to-date, checking for updates once per day by default. You can disable automatic update checking, or you can remove the bundled components altogether by setting a path to a custom installation of each one.

    To manually restart or update the language server, go to Extensions -> TypeScript LSP in the menu bar.

    Configuration

    TypeScript LSP's preferences can be found in Extensions -> Extension Library -> TypeScript LSP -> Settings:

    • Automatically Check for Updates - Whether the extension should check for and download updates for the Language Server and the fallback installation of TypeScript automatically. Updates won't be fetched if you set a custom path (see below).
    • Custom Language Server Path - A custom path to the language server executable. Setting this value removes the language server that is bundled with the extension.
    • Custom TypeScript Path - Custom path to the instance of TypeScript used by the language server.

    Acknowledgements

    Parts of TypeScript LSP are inspired by various existing extensions:
    - Icaras, by Panic
    - TypeScript, by Cameron Little
    - Rust, by Drew Kilb
    - Astro, by Matt Cook

    Release Notes

    Version 2.5

    • Fix crash caused by my utilities package. If the extension is still not working, use the "Check for Updates" command in the Extensions -> TypeScript LSP menu in the menu bar.

    Version 2.4

    • Removal of TypeScript 7: It has several issues providing code diagnostics and autocomplete which made it seem like the extension wasn't working. Users using TypeScript 7 will be automatically migrated back to using TypeScript Language Server. TypeScript 7 support will return in the future: follow issue #1 for updates. If you need TypeScript 7 support in a meantime, you can download version 2.3 from Codeberg.
    • Improved Nova 14 compatibility: Starting and stopping the language server is now handled asynchronously, fixing a bug that often prevented the language server from restarting correctly in Nova 14.

    Version 2.3

    Added a warning about Nova 14 to the README. Hopefully I can remove it soon.

    Version 2.2

    Fixed an issue that prevented TypeScript 6 from installing in some cases.

    Version 2.1

    The extension is now functional again.

    Version 2.0

    TypeScript 7 Support

    The extension now uses TypeScript 7's internal language server instead of typescript-language-server. It should still be able to check TypeScript 6 and earlier projects, but you can go back to typescript-language-server by enabling the "Use TypeScript 6 Language Server" setting.

    The bundled TypeScript installation is now always used, because TypeScript 7's language server can't run through TypeScript 6 (but can still check TypeScript 6 projects) and typescript-language-server can't run through TypeScript 7, so using the workspace's TypeScript breaks the extension if it's the wrong version.

    License Change

    Versions 2.0 and later are licensed under LGPL 3.0. Version 1.3 and earlier are licensed under MIT.

    Version 1.3

    The internal TypeScript is now pinned to version 6 in preparation for the upcoming release of TypeScript 7, which ships with a built-in language server. Support for TypeScript 7 in the extension will be coming soon.

    Version 1.2

    The extension's source code is now available on Codeberg.

    Version 1.1

    The auto-update system has been rewritten and is hopefully more stable, especially in newer versions of Nova.

    Version 1.0

    Initial release.

    License

    MIT License

    Copyright (c) 2024 John Lindop

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.