Nova

Extensions


Readme

TypeScript LSP

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

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. By default (see "Configuration"), it uses the installation of TypeScript in the node_modules folder of your workspace, falling back to an internally bundled installation if it can't find one.

TypeScript LSP 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 language server and TypeScript altogether by setting a path to a custom installation of each.

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:

  • Auto-Download fallback TypeScript/Language Server 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 Path - A custom path to the language server executable. Setting this value removes the language server that is bundled with the extension, and disables update checking for the language server.
  • Custom Fallback TypeScript Path - Custom path to the instance of TypeScript that is used as a fallback if TypeScript can't be found in the workspace. Setting this value removes the version bundled with the extension, and disables update checking for TypeScript.
  • Always Use Fallback TypeScript - By default, TypeScript LSP only uses its bundled installation of TypeScript (or the one set in "Custom Fallback TypeScript Path") if it can't find one in the current workspace. Enabling this option always uses the bundled or configured TypeScript installation instead of the one in the current workspace.

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


Changelog

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.