pulsar-ide-typescript-alpha Made for Pulsar!

A Pulsar-native IDE provider package for TypeScript and JavaScript

savetheclocktower

478

0

0.1.2

MIT

GitHub

This package consumes the following services:

pulsar-ide-typescript-alpha

An attempt to write a non-invasive IDE provider for TypeScript and JavaScript.

(The package name envisions that this could eventually be an official or semi-official Pulsar package, but it’s too early to presume that.)


IMPORTANT: New setting for v0.1.0 and above

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.

Here’s how this works:

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’s the philosophy?

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?

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:

file-symbols

Or search the entire project for symbols via Ctrl-Shift-R/Cmd-Shift-R:

project-wide-symbols

Or use Ctrl-Alt-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-Up/Cmd-Opt-Up to return to your original cursor position:

jump-to-definition

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:

intentions

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 does it do?

Install this package, then install any of the following packages to get special features:

Service list

This package provides the following services. Click on each link to find packages that can consume each service:

This package consumes the following services. Click on each link to find packages that can provide each service: