Skip to content

Commit 2b7936c

Browse files
cbochsgithub-actions[bot]
authored andcommitted
chore(docs): auto generate docs
1 parent 81e195f commit 2b7936c

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

doc/grapple.nvim.txt

+19-5
Original file line numberDiff line numberDiff line change
@@ -163,18 +163,20 @@ A **project scope** is determined by means of a
163163
- `global`: tags are scoped to a global namespace
164164
- `static`: tags are scoped to neovim’s initial working directory
165165
- `directory`: tags are scoped to the current working directory
166-
- `git`: tags are scoped to the current git repository, **fallback**: `static`
167166
- `lsp`: tags are scoped using the `root_dir` of the current buffer’s attached LSP server, **fallback**: `static`
167+
- `git`: tags are scoped to the current git repository, **fallback**: `static`
168+
- `git_branch`: tags are scoped to the current git repository and branch, **fallback**: `static`
168169

169170

170-
There are two additional scope resolvers which should be preferred when
171+
There are three additional scope resolvers which should be preferred when
171172
creating a **|grapple.nvim-fallback-scope-resolver|**. These resolvers act
172173
identically to their similarly named counterparts, but do not have default
173174
fallbacks.
174175

175176

176-
- `git_fallback`: the same as `git`, but without a fallback
177177
- `lsp_fallback`: the same as `lsp`, but without a fallback
178+
- `git_fallback`: the same as `git`, but without a fallback
179+
- `git_branch_suffix`: resolves suffix (branch) for `git_branch`
178180

179181

180182
It is also possible to create your own **custom scope resolver**. For the
@@ -187,7 +189,7 @@ available scope resolver types, please see the Scope API in
187189
>
188190
-- Setup using a builtin scope resolver
189191
require("grapple").setup({
190-
scope = require("grapple").resolvers.static
192+
scope = require("grapple").resolvers.git
191193
})
192194
193195
-- Setup using a custom scope resolver
@@ -498,7 +500,8 @@ Scope API
498500

499501
**`returns`**: |grapple.nvim-`grapple.scoperesolver`|
500502

501-
**`scope_callback`**: |grapple.nvim-`grapple.scopefunction`|
503+
**`scope_callback`**: |grapple.nvim-`grapple.scopefunction`| |
504+
|grapple.nvim-`grapple.scopejob`|
502505

503506
**`opts?`**: |grapple.nvim-`grapple.scopeoptions`|
504507

@@ -515,6 +518,17 @@ Scope API
515518
require("grapple.scope").resolver(function()
516519
return vim.fn.getcwd()
517520
end, { cache = "DirChanged" })
521+
522+
-- Create an scope resolver that asynchronously runs the "echo"
523+
-- shell command and uses its output as the resolved scope
524+
require("grapple.scope").resolver({
525+
command = "echo",
526+
args = [ "hello_world" ],
527+
cwd = vim.fn.getcwd(),
528+
on_exit = function(job, return_value)
529+
return job:result()[1]
530+
end
531+
})
518532
<
519533

520534

0 commit comments

Comments
 (0)