This package used to use Pulsarās built-in version of Node to run typescript-language-server, but recent versions of the language server require Node 18 or above, and Pulsar is stuck on version 14 until it can upgrade its underlying Electron version.
The solution is to supply your own version of Node so that typescript-language-server can run using the more modern version your project is probably already using. This is more hygienic anyway, and itās only slightly more of a hassle.
The āPath to Nodeā setting (or pulsar-ide-typescript.nodeBin) is what will run the built-in typescript-language-server. If you typically launch Pulsar from the command line, the default value of node will almost surely work. Since Pulsar inherits your shell environment, this will usually resolve to the version of Node that would run if you typed node from whatever directory you used to launch Pulsar from the command line.
This is likely to work even with tools like asdf and volta that use āshimsā to manage multiple versions of Node.
Even if you launch Pulsar another way, itās pretty good at recreating your default shell environment, including your PATH. So itās still worth trying the default value just to see if it works.
If it doesnāt work, youāll see an error notification explaining that the language server failed to launch. You can open the package settings and supply a full, absolute path to a Node binary of version 18 or greater; youāll know youāve entered it properly when the error notification is replaced with a success notification.
If you want to specify different Node paths for different projects, consider project-config or atomic-management; either will allow you to set config values of pulsar-ide-typescript.nodeBin on a per-project basis. (Even this might be overkill, though. As long as you point it to a compatible version of Node, you should easily be able to use that version everywhere, even if it doesnāt always match your projectās version.)
What if I use an older version of Node or TypeScript in my project?
You donāt need to upgrade the version of Node you use in your project; you just need one version of Node that can run the latest typescript-language-server. So in the short term, the solution might be to install a newer version of Node using a tool like nvm or asdf. You can then configure this package to use this newer version of Node instead of inheriting the version of Node used in your shell environment.
typescript-language-server is theoretically backwards-compatible, as I understand it, so this should work fine. If it doesnāt, then please file an issue against the package and let me know. It might be worth it in the future to let the user opt into bringing their own version of typescript-language-server so that such projects can keep using a known older version of the language server instead of needing to stay on an older version of this package.
What does this package do?
The interaction between Pulsar, IDE provider packages, and IDE consumer packages is hard to explain succinctly, but Iāll give it a try:
IDE features are things that typically donāt work without something that can analyze the language youāre working in: autocompletion, refactoring, identifying important symbols, et cetera.
IDE āproviderā packages (like this one) can perform that analysis; they act as the ābrainā behind a bunch of UI features.
A couple of these features can be supplied by Pulsar itself. The rest are implemented in popular community packages like the ones listed below.
The user can pick and choose among those packages. If you want a maximal experience, you can install a whole slate of packages. If you want only a few features, you can pick only the packages you want, and uninstall or disable the ones you donāt.
Provider packages should not care whether a consumer package is installed for a given service, nor should it mandate that any package be installed at all.
IDE features are great when they make you feel productive, but bad when they get in your way. Because the line between āusefulā and āinvasiveā will vary per person, we want to provide an IDE experience that is, above all, customizable.
What can it do that similar packages canāt?
The formerly first-party ide-typescript package is great, but canāt do quite as much as this package can.
Symbol navigation
This package integrates with recent versions of Pulsarās built-in symbols-view package.
You can view a comprehensive list of file symbols with Ctrl-R/Cmd-R:
Or search the entire project for symbols via Ctrl-Shift-R/Cmd-Shift-R:
Or use Ctrl-Alt-Shift-Down/Cmd-Opt-Down to jump to the definition of the symbol under the cursor āĀ even if itās in another file āĀ then use Ctrl-Alt-Shift-Up/Cmd-Opt-Up to return to your original cursor position:
Code actions
This package integrates with the popular intentions package to give you a simple menu you can invoke to run code actions or suggested diagnostic fixes.
Ability to ignore certain diagnostic messages
This package allows you to ignore certain kinds of diagnostic messages. You can choose whether to ignore them altogether or just until the file is saved:
The latter is useful for annoying messages that point out āproblemsā in your code that you simply havenāt had a chance to fix yet because youāre literally still typing.
Diagnostic messages require the community linter package. The menu shown in the screenshot above is implemented by the community intentions package.
Support for refactoring
You can place the cursor inside of any token and invoke a command to rename it. This package will be able to tell Pulsar which other usages of that symbol need to be renamed as well.
This feature requires the community pulsar-refactor package.
Optional JavaScript support
Like ide-typescript, this package can be configured to start a language server for JavaScript-only projects. Enable the Include JavaScript setting in this packageās settings menu. No separate package is required.
A smaller feature set is available inside of JavaScript projects; autocompletion and symbol providers are sparser with their suggestions, and features like refactoring may not be available at all. Still, youāll probably be impressed with what it can do.
What exactly does it do?
Install this package, then install any of the following packages to get special features.
Start with these packages; theyāre all builtin, actively maintained, and/or built exclusively for Pulsar: