Skip to content

Commit 52d87a7

Browse files
chore(build): auto-generate docs
1 parent 305a2db commit 52d87a7

File tree

1 file changed

+156
-0
lines changed

1 file changed

+156
-0
lines changed

docs/extras/ai/sidekick.md

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
# `Sidekick`
2+
3+
<!-- plugins:start -->
4+
5+
:::info
6+
You can enable the extra with the `:LazyExtras` command.
7+
Plugins marked as optional will only be configured if they are installed.
8+
:::
9+
10+
Below you can find a list of included plugins and their default settings.
11+
12+
:::caution
13+
You don't need to copy the default settings to your config.
14+
They are only shown here for reference.
15+
:::
16+
17+
import Tabs from '@theme/Tabs';
18+
import TabItem from '@theme/TabItem';
19+
20+
## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig)
21+
22+
copilot-language-server
23+
24+
25+
<Tabs>
26+
27+
<TabItem value="opts" label="Options">
28+
29+
```lua
30+
opts = {
31+
servers = {
32+
copilot = {},
33+
},
34+
}
35+
```
36+
37+
</TabItem>
38+
39+
40+
<TabItem value="code" label="Full Spec">
41+
42+
```lua
43+
{
44+
"neovim/nvim-lspconfig",
45+
opts = {
46+
servers = {
47+
copilot = {},
48+
},
49+
},
50+
}
51+
```
52+
53+
</TabItem>
54+
55+
</Tabs>
56+
57+
## [sidekick.nvim](https://github.com/folke/sidekick.nvim)
58+
59+
<Tabs>
60+
61+
<TabItem value="opts" label="Options">
62+
63+
```lua
64+
opts = function()
65+
-- Accept inline suggestions or next edits
66+
LazyVim.cmp.actions.ai_nes = function()
67+
local Nes = require("sidekick.nes")
68+
if Nes.have() and (Nes.jump() or Nes.apply()) then
69+
return true
70+
end
71+
end
72+
end
73+
```
74+
75+
</TabItem>
76+
77+
78+
<TabItem value="code" label="Full Spec">
79+
80+
```lua
81+
{
82+
"folke/sidekick.nvim",
83+
opts = function()
84+
-- Accept inline suggestions or next edits
85+
LazyVim.cmp.actions.ai_nes = function()
86+
local Nes = require("sidekick.nes")
87+
if Nes.have() and (Nes.jump() or Nes.apply()) then
88+
return true
89+
end
90+
end
91+
end,
92+
keys = {
93+
-- nes is also useful in normal mode
94+
{ "<tab>", LazyVim.cmp.map({ "ai_nes" }, "<tab>"), mode = { "n" }, expr = true },
95+
},
96+
}
97+
```
98+
99+
</TabItem>
100+
101+
</Tabs>
102+
103+
## [lualine.nvim](https://github.com/nvim-lualine/lualine.nvim) _(optional)_
104+
105+
lualine
106+
107+
108+
<Tabs>
109+
110+
<TabItem value="opts" label="Options">
111+
112+
```lua
113+
opts = function(_, opts)
114+
table.insert(
115+
opts.sections.lualine_x,
116+
2,
117+
LazyVim.lualine.status(LazyVim.config.icons.kinds.Copilot, function()
118+
local status = require("sidekick.status").get()
119+
if status then
120+
return status.kind == "Error" and "error" or status.busy and "pending" or "ok"
121+
end
122+
end)
123+
)
124+
end
125+
```
126+
127+
</TabItem>
128+
129+
130+
<TabItem value="code" label="Full Spec">
131+
132+
```lua
133+
{
134+
"nvim-lualine/lualine.nvim",
135+
optional = true,
136+
event = "VeryLazy",
137+
opts = function(_, opts)
138+
table.insert(
139+
opts.sections.lualine_x,
140+
2,
141+
LazyVim.lualine.status(LazyVim.config.icons.kinds.Copilot, function()
142+
local status = require("sidekick.status").get()
143+
if status then
144+
return status.kind == "Error" and "error" or status.busy and "pending" or "ok"
145+
end
146+
end)
147+
)
148+
end,
149+
}
150+
```
151+
152+
</TabItem>
153+
154+
</Tabs>
155+
156+
<!-- plugins:end -->

0 commit comments

Comments
 (0)