Skip to content

Commit eb63230

Browse files
committed
docs: linting
1 parent dbfcc74 commit eb63230

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

README.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ require("tinygit").setup {
219219
```
220220

221221
## Commands
222-
All commands are available as Lua function or as sub-command of `:Tinygit`,
222+
All commands are available as Lua function or as subcommand of `:Tinygit`,
223223
for example `require("tinygit").interactiveStaging()` and `:Tinygit
224224
interactiveStaging`. Note that the Lua function is preferable,
225225
since `:Tinygit` does not accept command-specific options and does not
@@ -229,9 +229,9 @@ trigger visual-mode specific changes.
229229
- Interactive straging requires `telescope`.
230230
- This command stages hunks, that is, *parts* of a file instead of the full
231231
file. It is roughly comparable to `git add -p`.
232-
- Use `<Space>` to stage/unstage the hunk, `<CR>` to go to the hunk, or `<C-r>` to
233-
reset the hunk (mappings customizable). Your regular `telescope` mappings also
234-
apply.
232+
- Use `<Space>` to stage/unstage the hunk, `<CR>` to go to the hunk, or `<C-r>`
233+
to reset the hunk (mappings customizable). Your regular `telescope` mappings
234+
also apply.
235235
- The size of the hunks is determined by the setting `staging.contextSize`.
236236
Larger context size is going to "merge" changes that are close to one another
237237
into one hunk. (As such, the hunks displayed are not 1:1 the same as the hunks
@@ -279,7 +279,12 @@ vim.keymap.set(
279279
function() require("tinygit").smartCommit() end,
280280
{ desc = "git commit" }
281281
)
282-
vim.keymap.set("n", "<leader>gp", function() require("tinygit").push() end, { desc = "git push" })
282+
vim.keymap.set(
283+
"n",
284+
"<leader>gp",
285+
function() require("tinygit").push() end,
286+
{ desc = "git push" }
287+
)
283288
```
284289

285290
1. Stage some changes via `<leader>ga`.
@@ -303,7 +308,10 @@ commit you intend to make.
303308
```lua
304309
-- values shown are the defaults
305310
require("tinygit").amendOnlyMsg { forcePushIfDiverged = false }
306-
require("tinygit").amendNoEdit { forcePushIfDiverged = false, stageAllIfNothingStaged = true }
311+
require("tinygit").amendNoEdit {
312+
forcePushIfDiverged = false,
313+
stageAllIfNothingStaged = true,
314+
}
307315
```
308316

309317
**Fixup commits**
@@ -376,7 +384,9 @@ require("tinygit").push {
376384
forceWithLease = false,
377385
createGitHubPr = false,
378386
}
379-
require("tinygit").createGitHubPr() -- to push before, use `.push { createGitHubPr = true }`
387+
388+
require("tinygit").createGitHubPr()
389+
-- to push before the PR, use `require("tinygit").push { createGitHubPr = true }`
380390
```
381391

382392
### File history

0 commit comments

Comments
 (0)