You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/contributing-to-pulsar/building-pulsar.md
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,13 +61,15 @@ zypper in libX11-devel libxkbfile-devel libsecret-devel
61
61
62
62
@tab macOS
63
63
64
-
```sh
65
-
TODO
66
-
```
64
+
macOS installations must have the components described on the [Installing dependencies for some community packages](/getting-started/dependencies-for-some-community-packages/#macos) page.
65
+
66
+
You can run `xcode-select --install` to setup these build tools if you think they’re not already present. You _do not_ need a full installation of Xcode.
67
67
68
68
@tab Windows
69
69
70
-
Firstly install [Visual Studio](https://visualstudio.microsoft.com/downloads/) from Microsoft.
70
+
Install all of the components described on the [Installing dependencies for some community packages](/getting-started/dependencies-for-some-community-packages/#installing-visual-studio-tools) page.
71
+
72
+
In particular, you must have either Visual Studio or Visual Studio Tools (_not_ Visual Studio Code) and the “Desktop development with C++” component must be enabled.
71
73
72
74
:::
73
75
@@ -119,15 +121,15 @@ These instructions will also build `ppm` (Pulsar Package Manager) but it will re
119
121
120
122
The following will allow you to build Pulsar as a stand alone binary or installer. After running you will find your built application in `pulsar/binaries`.
121
123
122
-
The build script will automatically build for your system's CPU architecture, for example building on an `x86_64` CPU will produce binaries for `x86_64`, building on `arm64` will only produce binaries for `arm64`.
124
+
The build script will automatically build for your system’s CPU architecture. For example, building on an `x86_64` CPU will produce binaries for `x86_64`, and building on `arm64` will only produce binaries for `arm64`.
123
125
124
-
It is not possible to “cross-build” for different OSs. For Linux binaries you must build from a Linux machine; macOS binaries must be built from macOS; and so on. Your OS is detected automatically and the script will build the correct binaries for it.
126
+
It is not possible to “cross-build” for different OSes. For Linux binaries you must build from a Linux machine; macOS binaries must be built from macOS; and so on. Your OS is detected automatically and the script will build the correct binaries for it.
125
127
126
128
::: tabs#core-hacking
127
129
128
130
@tab Linux
129
131
130
-
By default, running `yarn dist` will attempt to create `appimage` (for most Linux distributions), `deb` (for Debian or Ubuntu based distributions) and `rpm` (for Red Hat or Fedora based distributions) binaries but you can select the actual target you want to build by appending the above targets to the command. e.g.:
132
+
By default, running `yarn dist` will attempt to create `AppImage` (for most Linux distributions), `deb` (for Debian or Ubuntu based distributions) and `rpm` (for Red Hat or Fedora based distributions) binaries but you can select the actual target you want to build by appending the above targets to the command. e.g.:
Elsewhere in the docs, we explore the scenario where you want to run _all_ of Pulsar from source; **none of that is necessary** for this scenario. Our goal here is simply to get a single builtin package’s source code to live on your local disk so you can link to it in dev mode; the rest of the checked-out codebase can be ignored.
25
+
26
+
:::
27
+
23
28
From the root of where you cloned the repo on your disk, navigate to the `tree-view` package’s directory and install its dependencies:
24
29
25
30
```sh
26
-
$ cd packages/tree-view
31
+
$ cd<path-to-pulsar-repo>/packages/tree-view
27
32
$ pulsar -p install
28
33
> Installing modules ✓
29
34
```
30
35
31
-
Now you can link it to development mode so when you run an Pulsar window with `pulsar -p --dev`, it’ll load your fork instead of the built in package:
36
+
Now you can link it to development mode so that, when you run a Pulsar window with `pulsar -p --dev`, it’ll load your fork instead of the built in package:
32
37
33
38
```sh
34
39
$ pulsar -p link --dev
35
40
```
36
41
37
42
### Running in development mode
38
43
39
-
Editing a package in Pulsar is a bit of a circular experience: you're using Pulsar to modify itself. What happens if you temporarily break something? You don't want the version of Pulsar you're using to edit to become useless in the process. For this reason, it’s a good idea to load packages in **development mode** while you are working on them. You’ll perform your editing in **stable mode**, only switching to development mode to test your changes.
44
+
Editing a package in Pulsar is a bit of a circular experience: you’re using Pulsar to modify itself. What happens if you temporarily break something? You don’t want the version of Pulsar you’re using to edit to become useless in the process.
45
+
46
+
For this reason, it’s a good idea to load packages in **development mode** while you are working on them. You’ll perform your editing in **stable mode**, only switching to development mode to test your changes.
40
47
41
48
To open a development mode window, use the **Application: Open Dev** command. You can also run dev mode from the command line with `pulsar --dev`.
42
49
43
50
To load your package in development mode, create a symlink to it in <spanclass="platform-mac platform-linux">`~/.pulsar/dev/packages`</span><spanclass="platform-win">`%USERPROFILE%\.pulsar\dev\packages`</span>. This occurs automatically when you clone the package with `pulsar -p develop`. You can also run `pulsar -p link --dev` and `pulsar -p unlink --dev` from the package directory to create and remove dev-mode symlinks.
44
51
45
52
### Installing dependencies
46
53
47
-
You'll want to keep dependencies up to date by running `pulsar -p update` after pulling any upstream changes.
54
+
You’ll want to keep dependencies up to date by running `pulsar -p update` after pulling any upstream changes.
Copy file name to clipboardExpand all lines: docs/contributing-to-pulsar/hacking-on-the-core.md
+70-7Lines changed: 70 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,29 +3,92 @@ title: Hacking on the core
3
3
layout: doc.ejs
4
4
---
5
5
6
-
You will first want to build and run Pulsar [from source](../building-pulsar/).
6
+
If you’re hitting a bug in Pulsar or just want to experiment with adding a feature to the core of the system, you’ll want to run Pulsar in dev mode with access to a local copy of the Pulsar source.
7
+
8
+
## Check out the source code
9
+
10
+
Check out the Pulsar source from GitHub into a directory of your choosing:
You should install a compatible version of Node. Read the `.nvmrc` file to learn which version of Node is best to use. If you don’t have one yet, you’ll probably find it useful to install a tool like <spanclass="platform-linux platform-mac"><ahref="https://github.com/nvm-sh/nvm">NVM</a> or <ahref="https://asdf-vm.com/">asdf</a></span><spanclass="platform-win"><ahref="https://github.com/coreybutler/nvm-windows">NVM for Windows</a> or <ahref="https://github.com/Schniz/fnm">fnm</a></span> to manage multiple versions of Node.
19
+
20
+
:::tip
21
+
22
+
If these tools seem intimidating, or if you run into difficulties, you can always [install Node through more traditional means](https://nodejs.org/en/download).
23
+
24
+
:::
25
+
26
+
Pulsar uses [Yarn](https://yarnpkg.com/) to manage Node dependencies. Once you’ve got the right version of Node set up, you can [install Yarn using these instructions](https://classic.yarnpkg.com/lang/en/docs/install/). (You want the “classic stable” version 1 of Yarn, not version 2.)
27
+
28
+
To install the project’s Node dependencies, run
29
+
30
+
```sh
31
+
$ yarn install
32
+
$ yarn build
33
+
```
7
34
8
35
## Running in development mode
9
36
10
-
Once you have a local copy of Pulsar cloned and built, you can then run Pulsar in development mode. But first, if you cloned Pulsar to somewhere other than <spanclass="platform-linux platform-mac">`~/github/pulsar`</span><spanclass="platform-win">`%USERPROFILE%\github\pulsar`</span>, you will need to set the `ATOM_DEV_RESOURCE_PATH` environment variable to point to the folder in which you cloned Pulsar.
37
+
Once you have a local copy of Pulsar cloned and bootstrapped, you can then run Pulsar in development mode. But first, if you cloned Pulsar to somewhere other than <spanclass="platform-linux platform-mac">`~/github/pulsar`</span><spanclass="platform-win">`%USERPROFILE%\github\pulsar`</span>, you will need to set the `ATOM_DEV_RESOURCE_PATH` environment variable to point to the folder in which you cloned Pulsar.
11
38
12
39
To run Pulsar in dev mode, use the `--dev` parameter from the terminal:
13
40
14
41
```sh
15
42
$ pulsar --dev <path-to-open>
16
43
```
17
44
18
-
There are a couple benefits of running Pulsar in Dev Mode:
45
+
There are a couple benefits of running Pulsar in dev mode:
46
+
47
+
1. When the `ATOM_DEV_RESOURCE_PATH` environment variable is set correctly, Pulsar is run using the source code from your local `pulsar-edit/pulsar` repository. This means you don’t have to rebuild after every change — just reload your current window with **Window: Reload**.
48
+
49
+
(Changes to “main process” code — basically any code that lives in `src/main-process` — will require a full relaunch of Pulsar, but most of Pulsar’s logic is in the renderer process.)
50
+
51
+
2. Packages that exist in <spanclass="platform-linux platform-mac">`~/.pulsar/dev/packages`</span><spanclass="platform-win">`%USERPROFILE%\.pulsar\dev\packages`</span> are loaded instead of packages of the same name normally loaded from other locations.
52
+
53
+
This means that you can have development versions of packages you use loaded (via `pulsar -p link --dev [path-to-local-copy-of-a-package]`) but easily go back to the stable versions by launching without dev mode. This makes dev mode useful for developing packages even when `ATOM_DEV_RESOURCE_PATH` isn’t set.
19
54
20
-
1. When the `ATOM_DEV_RESOURCE_PATH` environment variable is set correctly, Pulsar is run using the source code from your local `pulsar-edit/pulsar` repository. This means you don't have to rebuild after every change — just restart Pulsar.
21
-
2. Packages that exist in <spanclass="platform-linux platform-mac">`~/.pulsar/dev/packages`</span><spanclass="platform-win">`%USERPROFILE%\.pulsar\dev\packages`</span> are loaded instead of packages of the same name normally loaded from other locations. This means that you can have development versions of packages you use loaded but easily go back to the stable versions by launching without dev mode.
22
-
3. Packages that contain stylesheets, such as syntax themes, will have those stylesheets automatically reloaded by the {dev-live-reload} package. This does not live reload JavaScript or CoffeeScript files — you'll need to reload the window (`window:reload`) to see changes to those.
55
+
3. Packages that contain stylesheets, such as syntax themes, will have those stylesheets automatically reloaded by the {dev-live-reload} package. This does not live reload JavaScript or CoffeeScript files — you’ll need to reload the window (`window:reload`) to see changes to those.
23
56
24
57
## Running Pulsar core tests locally
25
58
26
-
In order to run Pulsar Core tests from the terminal, first be certain to set the `ATOM_DEV_RESOURCE_PATH` environment variable as mentioned above and then:
59
+
### Within the terminal
60
+
61
+
In order to run Pulsar core tests from the terminal, first be certain to set the `ATOM_DEV_RESOURCE_PATH` environment variable as mentioned above and then:
27
62
28
63
```sh
29
64
$ cd<path-to-your-local-pulsar-repo>
30
65
$ pulsar --test spec
31
66
```
67
+
68
+
### Within Pulsar
69
+
70
+
First, make sure to set `ATOM_DEV_RESOURCE_PATH`; then launch Pulsar and open a project whose root is the root of the Pulsar codebase. You may then run the package specs from within Pulsar by invoking the **Window: Run Package Specs** command. This will spawn a window that runs the specs and reports on their outcomes.
71
+
72
+
## Running Pulsar builtin package tests locally
73
+
74
+
### Within the terminal
75
+
76
+
You can run a single package’s tests in similar fashion. For instance, to run the specs for the `autocomplete-plus` package, run the following from the root of the Pulsar project:
77
+
78
+
```sh
79
+
$ cd<path-to-your-local-pulsar-repo>
80
+
$ pulsar --test packages/autocomplete-plus/spec
81
+
```
82
+
83
+
Since different packages may have configured different test runners, you are encouraged to run each builtin package’s specs separately for the best results. However, you may experiment with glob syntax if you wish to run several at once and are willing to tolerate unusual behavior.
84
+
85
+
For instance, this will run all the specs for builtin language packages:
86
+
87
+
```sh
88
+
$ cd<path-to-your-local-pulsar-repo>
89
+
$ pulsar --test packages/language-**/spec
90
+
```
91
+
92
+
### Within Pulsar
93
+
94
+
You can run a single builtin package’s specs the same way you’d run specs for a package that _isn’t_ builtin: open the builtin package’s root directory in Pulsar as its own project, then invoke the **Window: Run Package Specs** command.
Copy file name to clipboardExpand all lines: docs/contributing-to-pulsar/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ layout: summary.ejs
5
5
6
6
While there are many ways to [customize the functionality of Pulsar](/customizing-pulsar), here we’ll dive into some advanced topics.
7
7
8
-
As we've seen, a huge part of Pulsar is made up of bundled packages. If you wish to add some functionality to Pulsar, you have access to the same APIs and tools that the core features of Pulsar has.
8
+
As we’ve seen, a huge part of Pulsar is made up of bundled packages. If you wish to add some functionality to Pulsar, you have access to the same APIs and tools that the core features of Pulsar has.
9
9
10
10
From {tree-view} to {command-palette} to {find-and-replace}, even the most integral features of Pulsar are implemented as packages.
Copy file name to clipboardExpand all lines: docs/contributing-to-pulsar/tools-of-the-trade.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ layout: doc.ejs
5
5
6
6
Since all of Pulsar is implemented using web technologies, in this section we’ll assume you know web technologies such as JavaScript and CSS.
7
7
8
-
While the majority of Pulsar is written in JavaScript, there are a few external modules that are still implemented in CoffeScript. All CoffeeScript that used to be present in the main Pulsar repository has been “decaffeinated” into JavaScript; you can [read more about that process here](https://github.com/pulsar-edit/.github/blob/main/guides/how-to-decaf.md).
8
+
While the majority of Pulsar is written in JavaScript, there are a few external modules that are still implemented in CoffeeScript. All CoffeeScript that used to be present in the main Pulsar repository has been “decaffeinated” into JavaScript; you can [read more about that process here](https://github.com/pulsar-edit/.github/blob/main/guides/how-to-decaf.md).
9
9
10
10
The only remnant of CoffeeScript that remains in Pulsar itself is CSON — a JSON-like notation based on CoffeeScript. We’ve kept CSON as the default file format for settings files (like your config file and keymap file) because it’s not as strict about delimiters and it allows comments.
title: Using PPM (Pulsar Package Manager) (information may be out of date!)
2
+
title: Using PPM (Pulsar Package Manager)
3
3
layout: doc.ejs
4
4
---
5
5
6
-
<!-- TODO: Needs updating. Not really accurate anymore. -->
6
+
<!-- TODO: This language is rewritten to hedge a bit more just so we can remove the “information may be outdated!” scare text from the title. This still needs further investigation. -->
7
7
8
-
`ppm` is used for installing and managing Pulsar's packages in much the same way that `apm` did on Atom. However at this point in the project there are a few hoops you have to jump through to get it to work correctly.
8
+
`ppm` is used for installing and managing Pulsar’s packages in much the same way that `apm` did on Atom.
9
9
10
-
After following the build instructions you will find the `ppm` binary at `pulsar/ppm/bin/apm` but by default Pulsar will be looking in the wrong place. There will also be issues relating to the Electron version which will prevent install from the package backend.
11
-
12
-
To solve this a couple of environmental variables need to be exported.
10
+
If you build Pulsar from source following the build instructions, you will find the `ppm` binary at `pulsar/ppm/bin/ppm`. This should be usable out of the box, but in some unusual scenarios you might find that you have to set some environment variables:
13
11
14
12
::: tabs#core-hacking
15
13
16
14
@tab Linux
17
15
18
16
```sh
19
17
export ATOM_HOME=/home/<user>/.pulsar
20
-
export APM_PATH=/ppm/bin/apm
18
+
export APM_PATH=<absolute path to your ppm binary>
21
19
export ATOM_ELECTRON_VERSION=12.2.3
22
20
```
23
21
24
22
@tab macOS
25
23
26
24
```sh
27
-
TODO
25
+
export ATOM_HOME=/Users/<user>/.pulsar
26
+
export APM_PATH=<absolute path to your ppm binary>
Copy file name to clipboardExpand all lines: docs/core-packages-and-features/autocomplete.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Autocomplete
3
3
layout: doc.ejs
4
4
---
5
5
6
-
If you're still looking to save some typing time, Pulsar also ships with powerful autocompletion functionality.
6
+
If you’re still looking to save some typing time, Pulsar also ships with powerful autocompletion functionality.
7
7
8
8
The autocomplete system lets you view and insert possible completions in the editor using [[Tab]] or [[Enter]].
9
9
@@ -12,12 +12,12 @@ The autocomplete system lets you view and insert possible completions in the edi
12
12
The simplest form of autocompletion will simply use words in the current file as completion candidates;
13
13
14
14
By default, the autocomplete system will look through the current open file for
15
-
strings that match what you're starting to type. But other packages can register themselves as providers of autocompletion data, thereby making autocompletion smarter.
15
+
strings that match what you’re starting to type. But other packages can register themselves as providers of autocompletion data, thereby making autocompletion smarter.
16
16
17
17
The autocompletion interface is implemented in the {autocomplete-plus} package. Several other core packages are present so that they can provide intelligent contextual suggestions to `autocomplete-plus`:
18
18
19
19
* The core {autocomplete-html} package suggests tag names and attribute names.
20
20
* The core {autocomplete-css} package suggests tag names, CSS property names, and contextually relevant values for properties.
21
21
* The core {autocomplete-snippets} package suggests snippets whose prefixes match what has already been typed in the current word.
22
22
23
-
Community packages — in particular packages that wrap language servers — can also act as “brains” for autocompletion. Pulsar’s package registry can show you [a list of packages](https://web.pulsar-edit.dev/packages?serviceType=provided&service=autocomplete.provider) that can supply data to `autocomplete-plus`.
23
+
Community packages — in particular [packages that wrap language servers](/ide-features/) — can also act as “brains” for autocompletion. Pulsar’s package registry can show you [a list of packages](https://packages.pulsar-edit.dev/packages?serviceType=provided&service=autocomplete.provider) that can supply data to `autocomplete-plus`.
0 commit comments