this post was submitted on 02 Nov 2023
5 points (85.7% liked)

Pulsar

100 readers
2 users here now

Pulsar

The community led, hyper-hackable text editor

Rules

By posting here you also agree to adhere to our Code of Conduct by:

Useful Links

founded 1 year ago
MODERATORS
 

Hello! I was a big fan of Atom editor, and I'm very glad that Pulsar is continuing the legacy of Atom. My concern/question is, how in the heck do I install plugins? Specifically, plugins for python? And also, is there a terminal/space to run Python code like there is in VSCodium? In VSCodium, there's a play button and code runs automatically in the built in terminal. Any help is appreciated!

top 12 comments
sorted by: hot top controversial new old
[โ€“] [email protected] 2 points 9 months ago (1 children)

There are a couple of ways to install packages on Pulsar, we have a lot of it in the existing documentation (https://pulsar-edit.dev/docs/launch-manual/sections/using-pulsar/#pulsar-packages). The most common way is just to go to the package manager (Packages > Open Package Manager > Install (on left panel of the package manager)) where you can search for packages. Alternatively you can browse packages via the PPR (Pulsar Package Registry) at https://web.pulsar-edit.dev/ and use ppm to install (https://pulsar-edit.dev/docs/launch-manual/sections/using-pulsar/#command-line).

As for the second part there are a few answers. You can install the x-terminal-reloaded if you simply want to get a terminal pane within Pulsar. However this won't help run things like Python code "interactively" with a console, it is "just" a terminal. Unfortunately this is where I run out of knowledge a bit, I've never been one for trying to run code directly in the editor, I've always just used terminal commands, which seems to echo the experience of a lot of the Pulsar team. However I do know somebody a few people have asked this before so we might need to look into this, if for nothing other than to have a good answer.

There is a package called script-runner which sounds like it would do what you are after and another called script you might also like to have a look at.

Generally if you are after info about how to "make Pulsar do x" then you can probably find still relevant info using "make Atom do x" but obviously any links or apm commands won't work and would need to reference the new Pulsar commands and links instead.

[โ€“] [email protected] 1 points 9 months ago (1 children)

So, if I wanted to run python code in Pulsar, I'd have to look up how to run python code in Atom, is what you're saying?

[โ€“] [email protected] 1 points 9 months ago (1 children)

To a degree, yeah. Obviously Atom was a pretty popular project before its decline so there are a lot of guides and help out there for it that go back a very long way but adoption of Pulsar has been much slower in that sense, mostly attracting people who were already using Atom. The changes we have made so far are mostly "under the hood" so really it is still Atom with some changes made. It is also a far newer project so there simply isn't as much "community" material.

[โ€“] [email protected] 1 points 9 months ago (1 children)

That's good to know. I thought it was based on vim, and I had to use special keyboard shortcuts to open things or run code.

[โ€“] [email protected] 1 points 9 months ago (1 children)

Nah, Atom was basically custom from the ground up (in fact it was Atom that first used, for better or worse, the Electron framework which was written specifically for it) and we just forked Atom before it got sunset. There are a lot of keybdinds but generally any action that would require some kind of special command would be accessible from the command palette (ctrl/cmd + shift + p) which is searchable.

It is a little more like vim in terms of what you get "out of the box", you more or less just get a basic editor and language grammars, it is designed to be extensible to be kind of whatever you want it to be via packages which allows you to make it your own.

[โ€“] [email protected] 1 points 9 months ago (1 children)

Okay, so I'm really dumb. I downloaded Visual Studio, because a plugin in Pulsar required Clang, and now when I open Pulsar, it's still saying the plugin can't be installed, and then a window showing the installation pops up and I can't escape the window. It should be installing the plugin now that I have CLang installed, right? What am I doing wrong and how do I install the plugin so I don't get the popup anymore?

[โ€“] [email protected] 1 points 9 months ago (1 children)

What package are you trying to install? Some packages do have native modules which is why you might need the visual studio tools. What window is popping up that you can't escape from?

[โ€“] [email protected] 1 points 9 months ago (1 children)

I'm trying to install Platformio IDE and it needs CLang to finish installation. It's an installation window that shows what components have been installed, there are four sections, but it keeps freezing on the Atom dependencies section. Maybe I just need to wait longer for it to install?

[โ€“] [email protected] 1 points 9 months ago (1 children)

I think the platformio stuff hasn't been kept under active development for a long time now and I'm pretty sure the whole thing was archived on GitHub, it might need something like an older version of the tools or it might be broken entirely.

Unfortunately that will be something you might come across with Pulsar, some of the changes we have had to make to update our dependencies (and sometimes just changes in the later releases of Atom) have broken some packages and they just aren't maintained any more. We do try to keep track of these when found and mark them as such with special labels.

What features of platformio-ide were you after? There are almost certainly some alternatives.

[โ€“] [email protected] 1 points 9 months ago (1 children)

I wanted to use a built-in terminal. Like running python code and having it show up in the built-in terminal

[โ€“] [email protected] 1 points 9 months ago (1 children)

So this is stuff we have been talking about a lot recently. At the moment the only terminal that I'm aware of that is 1) maintained and 2) working properly is x-terminal-reloaded which is maintained by one of the members of the core Pulsar team.

However I'm not aware of anything that will output to it. The various script runners I mentioned before will output to their own panels (atom-runner, script and script-runner). However another person on the team is currently developing a new script runner package that currently outputs to its own pane:

However we were talking about the possibility that it could maybe interface directly with x-terminal-reloaded to provide output directly in the terminal.

[โ€“] [email protected] 1 points 9 months ago

Yes! That's what I'm looking for. I'll download the x-terminal-reloaded plugin as well.