Skip to content

Commit 7219d48

Browse files
chore(build): auto-generate docs
1 parent 1986e85 commit 7219d48

File tree

2 files changed

+45
-6
lines changed

2 files changed

+45
-6
lines changed

docs/extras/editor/snacks_picker.md

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,34 @@ import TabItem from '@theme/TabItem';
2929

3030
## [snacks.nvim](https://github.com/folke/snacks.nvim)
3131

32-
recommended = true,
33-
34-
3532
<Tabs>
3633

3734
<TabItem value="opts" label="Options">
3835

3936
```lua
4037
opts = {
41-
picker = {},
38+
picker = {
39+
win = {
40+
input = {
41+
keys = {
42+
["<a-c>"] = {
43+
"toggle_cwd",
44+
mode = { "n", "i" },
45+
},
46+
},
47+
},
48+
},
49+
actions = {
50+
---@param p snacks.Picker
51+
toggle_cwd = function(p)
52+
local root = LazyVim.root({ buf = p.input.filter.current_buf, normalize = true })
53+
local cwd = vim.fs.normalize((vim.uv or vim.loop).cwd() or ".")
54+
local current = p:cwd()
55+
p:set_cwd(current == root and cwd or root)
56+
p:find()
57+
end,
58+
},
59+
},
4260
}
4361
```
4462

@@ -51,7 +69,28 @@ opts = {
5169
{
5270
"folke/snacks.nvim",
5371
opts = {
54-
picker = {},
72+
picker = {
73+
win = {
74+
input = {
75+
keys = {
76+
["<a-c>"] = {
77+
"toggle_cwd",
78+
mode = { "n", "i" },
79+
},
80+
},
81+
},
82+
},
83+
actions = {
84+
---@param p snacks.Picker
85+
toggle_cwd = function(p)
86+
local root = LazyVim.root({ buf = p.input.filter.current_buf, normalize = true })
87+
local cwd = vim.fs.normalize((vim.uv or vim.loop).cwd() or ".")
88+
local current = p:cwd()
89+
p:set_cwd(current == root and cwd or root)
90+
p:find()
91+
end,
92+
},
93+
},
5594
},
5695
-- stylua: ignore
5796
keys = {

docs/extras/lang/sql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ opts = nil
9999
vim.api.nvim_create_autocmd("FileType", {
100100
pattern = sql_ft,
101101
callback = function()
102-
if LazyVim.has("nvim-cmp") then
102+
if LazyVim.cmp_engine() == "nvim-cmp" then
103103
local cmp = require("cmp")
104104

105105
-- global sources

0 commit comments

Comments
 (0)