Skip to content

Commit 7ca4312

Browse files
committed
doc updates
* recommend upstream nim extension for vscode * move editor integrations to manual * better install isntructions
1 parent 0d8000e commit 7ca4312

File tree

5 files changed

+45
-24
lines changed

5 files changed

+45
-24
lines changed

README.md

+10-18
Original file line numberDiff line numberDiff line change
@@ -37,29 +37,21 @@ More information about features and style available from the [documentation](htt
3737

3838
## Installation
3939

40-
Download binaries from the [releases page](https://github.com/arnetheduck/nph/releases/tag/latest).
40+
Binaries are available from the [releases page](https://github.com/arnetheduck/nph/releases/tag/latest) on Github.
4141

42-
`nph` can be also compiled or installed using `nimble` version `v0.14.2`+:
42+
`nph` can be also compiled or installed using `nimble` v0.16.4+:
4343

4444
```sh
45-
nimble -l setup
45+
# Install globally
46+
nimble install nph
47+
48+
# Alternatively, build in source folder:
49+
nimble setup -l
4650
nimble build
4751
```
4852

53+
See the [installation instructions](https://arnetheduck.github.io/nph/installation.html) in the manual for more details.
54+
4955
## Editor integration
5056

51-
* [VSCode](https://marketplace.visualstudio.com/items?itemName=arnetheduck.vscode-nph) (`ext install arnetheduck.vscode-nph`)
52-
* [NeoVim](https://github.com/sbdchd/neoformat) - Install **neoformat** in your neovim setup then add the nim formating option with **nph** with this option in init.vim `let g:neoformat_enabled_nim = ['nph']`
53-
* [Zed Editor](https://github.com/foxoman/zed-nim) - Use this in your editor settings
54-
```
55-
"languages": {
56-
"Nim": {
57-
"formatter": {
58-
"external": {
59-
"command": "nph",
60-
"arguments": ["-"]
61-
}
62-
}
63-
}
64-
}
65-
```
57+
Editor integrations are described [in the manual](https://arnetheduck.github.io/nph/installation.html#editor-integration).

docs/src/installation.md

+28-5
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,45 @@ Download binaries from the [releases page](https://github.com/arnetheduck/nph/re
66

77
## Install via nimble
88

9-
`nph` can be also compiled or installed using `nimble` version `v0.14.2`+:
9+
`nph` can be compiled or installed using `nimble` v0.16.4+:
1010

1111
```sh
12-
nimble -l setup
12+
# Install globally
13+
nimble install nph
14+
15+
# Alternatively, clone and build:
16+
git clone https://github.com/arnetheduck/nph.git
17+
cd nph
18+
nimble setup -l
1319
nimble build
1420
```
1521

16-
```admonish note "Nim version requirement"
22+
```admonish note "Nim version"
1723
`nph` requires an specific version of `nim` during the build process since it
1824
reuses parts of the compiler whose API frequently changes - this may lead to
19-
`nim` itself being built as part of the installation process
25+
`nim` itself being built as part of the installation process!
2026
```
2127

2228
For bonus points, replace `nimpretty` with a symlink to `nph` - similar
2329
command line options are supported ;)
2430

2531
## Editor integration
2632

27-
* [VSCode](https://marketplace.visualstudio.com/items?itemName=arnetheduck.vscode-nph) (`ext install arnetheduck.vscode-nph`)
33+
* [VSCode](https://marketplace.visualstudio.com/items?itemName=NimLang.nimlang) (`ext install NimLang.nimlang`) extension via [nimlangserver](https://github.com/nim-lang/langserver/) that supports `nph` out of the box
34+
* [NeoVim](https://github.com/sbdchd/neoformat) - Install **neoformat** in your neovim setup then add the nim formating option with **nph** with this option in init.vim `let g:neoformat_enabled_nim = ['nph']`
35+
* [Zed Editor](https://github.com/foxoman/zed-nim) - Use this in your editor settings
36+
```
37+
"languages": {
38+
"Nim": {
39+
"formatter": {
40+
"external": {
41+
"command": "nph",
42+
"arguments": ["-"]
43+
}
44+
}
45+
}
46+
}
47+
```
48+
* [vscode-nph](https://marketplace.visualstudio.com/items?itemName=arnetheduck.vscode-nph) (`ext install arnetheduck.vscode-nph`) for a formatting-only option for the official Nim extension.
49+
50+

vscode-nph/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## 0.0.5
4+
5+
- Note that upstream now supports `nph`
6+
37
## 0.0.4
48

59
- Register formatter for '.nims' and '.nimble'

vscode-nph/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Format [Nim](https://nim-lang.org) code using [`nph`](https://github.com/arnetheduck/nph).
44

5+
Full-featured `Nim` support including formatting via `nph` is available from the [official Nim extension](https://marketplace.visualstudio.com/items?itemName=NimLang.nimlang) - if you're using it, `vscode-nph` is no longer needed.
6+
57
## Features
68

79
Enables formatting of Nim code via `Format document` from the command palette as well as format-on-save if enabled in settings.

vscode-nph/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vscode-nph",
33
"displayName": "nph - Nim code formatter",
44
"description": "Opinionated code formatter for Nim",
5-
"version": "0.0.4",
5+
"version": "0.0.5",
66
"publisher": "arnetheduck",
77
"engines": {
88
"vscode": "^1.30.0"

0 commit comments

Comments
 (0)