Skip to content

Commit ca380ef

Browse files
chore(build): auto-generate docs
1 parent d35448e commit ca380ef

File tree

4 files changed

+9
-67
lines changed

4 files changed

+9
-67
lines changed

docs/configuration/general.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ local opt = vim.opt
105105

106106
opt.autowrite = true -- Enable auto write
107107
-- only set clipboard if not in ssh, to make sure the OSC 52
108-
-- integration works automatically. Requires Neovim >= 0.10.0
108+
-- integration works automatically.
109109
opt.clipboard = vim.env.SSH_TTY and "" or "unnamedplus" -- Sync with system clipboard
110110
opt.completeopt = "menu,menuone,noselect"
111111
opt.conceallevel = 2 -- Hide * markup for bold and italic, but not markers with substitutions

docs/extras/lang/vue.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,7 @@ opts = { ensure_installed = { "vue", "css" } }
5959
```lua
6060
opts = {
6161
servers = {
62-
volar = {
63-
init_options = {
64-
vue = {
65-
hybridMode = true,
66-
},
67-
},
68-
},
62+
vue_ls = {},
6963
vtsls = {},
7064
},
7165
}
@@ -81,13 +75,7 @@ opts = {
8175
"neovim/nvim-lspconfig",
8276
opts = {
8377
servers = {
84-
volar = {
85-
init_options = {
86-
vue = {
87-
hybridMode = true,
88-
},
89-
},
90-
},
78+
vue_ls = {},
9179
vtsls = {},
9280
},
9381
},

docs/extras/linting/eslint.md

Lines changed: 2 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import TabItem from '@theme/TabItem';
3434

3535
```lua
3636
opts = {
37-
---@type lspconfig.options
37+
---@type table<string, vim.lsp.Config>
3838
servers = {
3939
eslint = {
4040
settings = {
@@ -50,35 +50,13 @@ opts = {
5050
return
5151
end
5252

53-
local function get_client(buf)
54-
return vim.lsp.get_clients({ name = "eslint", bufnr = buf })[1]
55-
end
56-
5753
local formatter = LazyVim.lsp.formatter({
5854
name = "eslint: lsp",
5955
primary = false,
6056
priority = 200,
6157
filter = "eslint",
6258
})
6359

64-
-- Use EslintFixAll on Neovim < 0.10.0
65-
if not pcall(require, "vim.lsp._dynamic") then
66-
formatter.name = "eslint: EslintFixAll"
67-
formatter.sources = function(buf)
68-
local client = get_client(buf)
69-
return client and { "eslint" } or {}
70-
end
71-
formatter.format = function(buf)
72-
local client = get_client(buf)
73-
if client then
74-
local diag = vim.diagnostic.get(buf, { namespace = vim.lsp.diagnostic.get_namespace(client.id) })
75-
if #diag > 0 then
76-
vim.cmd("EslintFixAll")
77-
end
78-
end
79-
end
80-
end
81-
8260
-- register the formatter with LazyVim
8361
LazyVim.format.register(formatter)
8462
end,
@@ -96,7 +74,7 @@ opts = {
9674
"neovim/nvim-lspconfig",
9775
-- other settings removed for brevity
9876
opts = {
99-
---@type lspconfig.options
77+
---@type table<string, vim.lsp.Config>
10078
servers = {
10179
eslint = {
10280
settings = {
@@ -112,35 +90,13 @@ opts = {
11290
return
11391
end
11492

115-
local function get_client(buf)
116-
return vim.lsp.get_clients({ name = "eslint", bufnr = buf })[1]
117-
end
118-
11993
local formatter = LazyVim.lsp.formatter({
12094
name = "eslint: lsp",
12195
primary = false,
12296
priority = 200,
12397
filter = "eslint",
12498
})
12599

126-
-- Use EslintFixAll on Neovim < 0.10.0
127-
if not pcall(require, "vim.lsp._dynamic") then
128-
formatter.name = "eslint: EslintFixAll"
129-
formatter.sources = function(buf)
130-
local client = get_client(buf)
131-
return client and { "eslint" } or {}
132-
end
133-
formatter.format = function(buf)
134-
local client = get_client(buf)
135-
if client then
136-
local diag = vim.diagnostic.get(buf, { namespace = vim.lsp.diagnostic.get_namespace(client.id) })
137-
if #diag > 0 then
138-
vim.cmd("EslintFixAll")
139-
end
140-
end
141-
end
142-
end
143-
144100
-- register the formatter with LazyVim
145101
LazyVim.format.register(formatter)
146102
end,

docs/plugins/lsp.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ opts = function()
5050
source = "if_many",
5151
prefix = "",
5252
-- this will set set the prefix to a function that returns the diagnostics icon based on the severity
53-
-- this only works on a recent 0.10.0 build. Will be set to "●" when not supported
5453
-- prefix = "icons",
5554
},
5655
severity_sort = true,
@@ -63,14 +62,14 @@ opts = function()
6362
},
6463
},
6564
},
66-
-- Enable this to enable the builtin LSP inlay hints on Neovim >= 0.10.0
65+
-- Enable this to enable the builtin LSP inlay hints on Neovim.
6766
-- Be aware that you also will need to properly configure your LSP server to
6867
-- provide the inlay hints.
6968
inlay_hints = {
7069
enabled = true,
7170
exclude = { "vue" }, -- filetypes for which you don't want to enable inlay hints
7271
},
73-
-- Enable this to enable the builtin LSP code lenses on Neovim >= 0.10.0
72+
-- Enable this to enable the builtin LSP code lenses on Neovim.
7473
-- Be aware that you also will need to properly configure your LSP server to
7574
-- provide the code lenses.
7675
codelens = {
@@ -170,7 +169,6 @@ end
170169
source = "if_many",
171170
prefix = "",
172171
-- this will set set the prefix to a function that returns the diagnostics icon based on the severity
173-
-- this only works on a recent 0.10.0 build. Will be set to "●" when not supported
174172
-- prefix = "icons",
175173
},
176174
severity_sort = true,
@@ -183,14 +181,14 @@ end
183181
},
184182
},
185183
},
186-
-- Enable this to enable the builtin LSP inlay hints on Neovim >= 0.10.0
184+
-- Enable this to enable the builtin LSP inlay hints on Neovim.
187185
-- Be aware that you also will need to properly configure your LSP server to
188186
-- provide the inlay hints.
189187
inlay_hints = {
190188
enabled = true,
191189
exclude = { "vue" }, -- filetypes for which you don't want to enable inlay hints
192190
},
193-
-- Enable this to enable the builtin LSP code lenses on Neovim >= 0.10.0
191+
-- Enable this to enable the builtin LSP code lenses on Neovim.
194192
-- Be aware that you also will need to properly configure your LSP server to
195193
-- provide the code lenses.
196194
codelens = {

0 commit comments

Comments
 (0)