Skip to content

Commit dd12a4b

Browse files
Merge branch 'main' into enhance-service-documentation
2 parents 59bb55c + 67e10b7 commit dd12a4b

File tree

110 files changed

+1646
-909
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+1646
-909
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,11 @@ jobs:
3838
- name: Build Site
3939
run: npm run build
4040

41-
- name: Setup Pages
42-
uses: actions/configure-pages@v3
43-
4441
- name: Upload Artifact
45-
uses: actions/upload-pages-artifact@v1
42+
uses: actions/upload-pages-artifact@v3
4643
with:
4744
path: "./_dist"
4845

4946
- name: Deploy to GitHub pages
5047
id: deployment
51-
uses: actions/deploy-pages@v2
48+
uses: actions/deploy-pages@v4

docs/contributing-to-pulsar/building-pulsar.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,15 @@ zypper in libX11-devel libxkbfile-devel libsecret-devel
6161

6262
@tab macOS
6363

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.
6767

6868
@tab Windows
6969

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.
7173

7274
:::
7375

@@ -119,15 +121,15 @@ These instructions will also build `ppm` (Pulsar Package Manager) but it will re
119121

120122
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`.
121123

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 systems 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`.
123125

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.
125127

126128
::: tabs#core-hacking
127129

128130
@tab Linux
129131

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.:
131133

132134
- `yarn dist appimage`
133135
- `yarn dist deb`

docs/contributing-to-pulsar/contributing-to-official-pulsar-packages.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,33 +15,40 @@ The first step is creating your own clone. For some packages, you may also need
1515

1616
For example, if you want to make changes to the {tree-view} package, fork the Pulsar repo on your GitHub account, then clone it:
1717

18-
1918
```sh
2019
$ git clone https://github.com/[your-github-username]/pulsar.git
2120
```
2221

22+
:::tip
23+
24+
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+
2328
From the root of where you cloned the repo on your disk, navigate to the `tree-view` package’s directory and install its dependencies:
2429

2530
```sh
26-
$ cd packages/tree-view
31+
$ cd <path-to-pulsar-repo>/packages/tree-view
2732
$ pulsar -p install
2833
> Installing modules ✓
2934
```
3035

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:
3237

3338
```sh
3439
$ pulsar -p link --dev
3540
```
3641

3742
### Running in development mode
3843

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.
4047

4148
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`.
4249

4350
To load your package in development mode, create a symlink to it in <span class="platform-mac platform-linux">`~/.pulsar/dev/packages`</span><span class="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.
4451

4552
### Installing dependencies
4653

47-
You'll want to keep dependencies up to date by running `pulsar -p update` after pulling any upstream changes.
54+
Youll want to keep dependencies up to date by running `pulsar -p update` after pulling any upstream changes.

docs/contributing-to-pulsar/hacking-on-the-core.md

Lines changed: 70 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,92 @@ title: Hacking on the core
33
layout: doc.ejs
44
---
55

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:
11+
12+
```sh
13+
$ git clone [email protected]:pulsar-edit/pulsar.git
14+
```
15+
16+
## Set up dependencies
17+
18+
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 <span class="platform-linux platform-mac"><a href="https://github.com/nvm-sh/nvm">NVM</a> or <a href="https://asdf-vm.com/">asdf</a></span><span class="platform-win"><a href="https://github.com/coreybutler/nvm-windows">NVM for Windows</a> or <a href="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+
```
734

835
## Running in development mode
936

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 <span class="platform-linux platform-mac">`~/github/pulsar`</span><span class="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 <span class="platform-linux platform-mac">`~/github/pulsar`</span><span class="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.
1138

1239
To run Pulsar in dev mode, use the `--dev` parameter from the terminal:
1340

1441
```sh
1542
$ pulsar --dev <path-to-open>
1643
```
1744

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 <span class="platform-linux platform-mac">`~/.pulsar/dev/packages`</span><span class="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.
1954

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 <span class="platform-linux platform-mac">`~/.pulsar/dev/packages`</span><span class="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.
2356

2457
## Running Pulsar core tests locally
2558

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:
2762

2863
```sh
2964
$ cd <path-to-your-local-pulsar-repo>
3065
$ pulsar --test spec
3166
```
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.

docs/contributing-to-pulsar/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ layout: summary.ejs
55

66
While there are many ways to [customize the functionality of Pulsar](/customizing-pulsar), here we’ll dive into some advanced topics.
77

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 weve 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.
99

1010
From {tree-view} to {command-palette} to {find-and-replace}, even the most integral features of Pulsar are implemented as packages.
1111

docs/contributing-to-pulsar/tools-of-the-trade.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ layout: doc.ejs
55

66
Since all of Pulsar is implemented using web technologies, in this section we’ll assume you know web technologies such as JavaScript and CSS.
77

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).
99

1010
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.
1111

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,38 @@
11
---
2-
title: Using PPM (Pulsar Package Manager) (information may be out of date!)
2+
title: Using PPM (Pulsar Package Manager)
33
layout: doc.ejs
44
---
55

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. -->
77

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 Pulsars packages in much the same way that `apm` did on Atom.
99

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:
1311

1412
::: tabs#core-hacking
1513

1614
@tab Linux
1715

1816
```sh
1917
export ATOM_HOME=/home/<user>/.pulsar
20-
export APM_PATH=/ppm/bin/apm
18+
export APM_PATH=<absolute path to your ppm binary>
2119
export ATOM_ELECTRON_VERSION=12.2.3
2220
```
2321

2422
@tab macOS
2523

2624
```sh
27-
TODO
25+
export ATOM_HOME=/Users/<user>/.pulsar
26+
export APM_PATH=<absolute path to your ppm binary>
27+
export ATOM_ELECTRON_VERSION=12.2.3
2828
```
2929

3030
@tab Windows
3131

3232
```
3333
set ATOM_HOME=C:\Users\<user>\.pulsar
34-
set APM_PATH=\ppm\bin\apm
34+
set APM_PATH=<absolute path to your ppm binary>
35+
set ATOM_ELECTRON_VERSION=12.2.3
3536
```
3637

3738
:::
@@ -46,5 +47,5 @@ git clone https://github.com/pulsar-edit/ide-java
4647
cd ide-java
4748

4849
# from the directory where you are running pulsar source code
49-
<pulsar source>/ppm/bin/apm link
50+
<pulsar source>/ppm/bin/ppm link
5051
```

docs/core-packages-and-features/autocomplete.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Autocomplete
33
layout: doc.ejs
44
---
55

6-
If you're still looking to save some typing time, Pulsar also ships with powerful autocompletion functionality.
6+
If youre still looking to save some typing time, Pulsar also ships with powerful autocompletion functionality.
77

88
The autocomplete system lets you view and insert possible completions in the editor using [[Tab]] or [[Enter]].
99

@@ -12,12 +12,12 @@ The autocomplete system lets you view and insert possible completions in the edi
1212
The simplest form of autocompletion will simply use words in the current file as completion candidates;
1313

1414
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 youre starting to type. But other packages can register themselves as providers of autocompletion data, thereby making autocompletion smarter.
1616

1717
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`:
1818

1919
* The core {autocomplete-html} package suggests tag names and attribute names.
2020
* The core {autocomplete-css} package suggests tag names, CSS property names, and contextually relevant values for properties.
2121
* The core {autocomplete-snippets} package suggests snippets whose prefixes match what has already been typed in the current word.
2222

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

Comments
 (0)