@aymanbagabas/drift 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -51,6 +51,12 @@ scoop install drift
|
|
|
51
51
|
cargo install drift-diff
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
+
Or grab the prebuilt binary from the GitHub release instead of compiling:
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
cargo binstall drift-diff
|
|
58
|
+
```
|
|
59
|
+
|
|
54
60
|
### npm
|
|
55
61
|
|
|
56
62
|
```sh
|
|
@@ -81,6 +87,15 @@ sudo yum install drift
|
|
|
81
87
|
yay -S drift-diff-bin
|
|
82
88
|
```
|
|
83
89
|
|
|
90
|
+
### Nix (NUR)
|
|
91
|
+
|
|
92
|
+
From the [Nix User Repositories](https://github.com/nix-community/NUR), install
|
|
93
|
+
`nur.repos.aymanbagabas.drift`. Or run it ad-hoc without configuring NUR:
|
|
94
|
+
|
|
95
|
+
```sh
|
|
96
|
+
nix-shell -p '(import (fetchTarball "https://github.com/aymanbagabas/nur/archive/master.tar.gz") {}).drift'
|
|
97
|
+
```
|
|
98
|
+
|
|
84
99
|
### Prebuilt binaries
|
|
85
100
|
|
|
86
101
|
Grab an archive for your platform from the
|
|
@@ -110,6 +125,13 @@ Make it your default git diff pager:
|
|
|
110
125
|
git config --global pager.diff drift
|
|
111
126
|
```
|
|
112
127
|
|
|
128
|
+
drift defaults to the `ansi` theme — your terminal's own colors, with syntax
|
|
129
|
+
highlighting off. Pick a theme to turn it on, globally via git config:
|
|
130
|
+
|
|
131
|
+
```sh
|
|
132
|
+
git config --global drift.theme onedark # onelight, dracula, nord, gruvbox-dark, ...
|
|
133
|
+
```
|
|
134
|
+
|
|
113
135
|
Some flags worth knowing:
|
|
114
136
|
|
|
115
137
|
| Flag | What it does |
|
|
@@ -171,9 +193,11 @@ drift is fully mouse-driven too:
|
|
|
171
193
|
|
|
172
194
|
## Themes
|
|
173
195
|
|
|
174
|
-
Set `theme = "..."` in your config.
|
|
196
|
+
Set `theme = "..."` in your config, or `git config drift.theme ...`. The default
|
|
197
|
+
is **`ansi`** — your terminal's own 16 colors, with syntax highlighting and
|
|
198
|
+
word-diff emphasis left off. Any other built-in theme turns highlighting on:
|
|
175
199
|
|
|
176
|
-
- `onedark`, `onelight`
|
|
200
|
+
- `onedark`, `onelight`
|
|
177
201
|
- `dracula`
|
|
178
202
|
- `gruvbox-dark`, `gruvbox-light`
|
|
179
203
|
- `nord`
|
|
@@ -181,13 +205,18 @@ Set `theme = "..."` in your config. Built in and ready:
|
|
|
181
205
|
- `catppuccin-mocha`, `catppuccin-latte`
|
|
182
206
|
- `tokyonight`
|
|
183
207
|
- `monokai`
|
|
184
|
-
- `ansi
|
|
185
|
-
whatever palette you already run. It leaves code text and word-diff
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
208
|
+
- `ansi` — the default: borrows your terminal's own 16 colors so drift matches
|
|
209
|
+
whatever palette you already run. It leaves code text and word-diff emphasis
|
|
210
|
+
alone, since 16 colors are too few to layer cleanly over diff colors.
|
|
211
|
+
|
|
212
|
+
A handful of [syntect](https://github.com/trishume/syntect) theme names also
|
|
213
|
+
work, but only the seven that ship in syntect's default set — `InspiredGitHub`,
|
|
214
|
+
`Solarized (dark)`, `Solarized (light)`, `base16-eighties.dark`,
|
|
215
|
+
`base16-mocha.dark`, `base16-ocean.dark`, and `base16-ocean.light`. They color
|
|
216
|
+
the code but won't repaint the UI chrome to match, and (Solarized aside) the
|
|
217
|
+
built-ins above already cover them with matching chrome. Any other theme name —
|
|
218
|
+
a custom `.tmTheme`, or a syntect theme not in that set — silently falls back to
|
|
219
|
+
`onedark`.
|
|
191
220
|
|
|
192
221
|
The `themes/` directory has a full, commented config for every built-in theme.
|
|
193
222
|
Copy one and go:
|