Skip to content

Commit 9d17d20

Browse files
chore(build): auto-generate docs
1 parent c5e4b9c commit 9d17d20

3 files changed

Lines changed: 153 additions & 18 deletions

File tree

docs/extras/formatting/biome.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,19 @@ They are only shown here for reference.
2626
import Tabs from '@theme/Tabs';
2727
import TabItem from '@theme/TabItem';
2828

29-
## [mason.nvim](https://github.com/mason-org/mason.nvim)
29+
## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig)
3030

3131
<Tabs>
3232

3333
<TabItem value="opts" label="Options">
3434

3535
```lua
36-
opts = { ensure_installed = { "biome" } }
36+
opts = {
37+
servers = {
38+
---@type lspconfig.settings.biome
39+
biome = {},
40+
},
41+
}
3742
```
3843

3944
</TabItem>
@@ -43,8 +48,13 @@ opts = { ensure_installed = { "biome" } }
4348

4449
```lua
4550
{
46-
"mason-org/mason.nvim",
47-
opts = { ensure_installed = { "biome" } },
51+
"neovim/nvim-lspconfig",
52+
opts = {
53+
servers = {
54+
---@type lspconfig.settings.biome
55+
biome = {},
56+
},
57+
},
4858
}
4959
```
5060

docs/extras/lang/typescript.md

Lines changed: 137 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ You can enable the extra with the `:LazyExtras` command.
77
Plugins marked as optional will only be configured if they are installed.
88
:::
99

10+
### Options
11+
12+
Additional options for this extra can be configured in your [lua/config/options.lua](/configuration/general#options) file:
13+
14+
```lua title="lua/config/options.lua"
15+
-- LSP Server to use for TypeScript.
16+
vim.g.lazyvim_ts_lsp = "vtsls" -- currently the default
17+
-- Set to "tsgo" to use the new typescript-language-server implementation instead of tsserver.
18+
vim.g.lazyvim_ts_lsp = "tsgo"
19+
```
20+
1021
Below you can find a list of included plugins and their default settings.
1122

1223
:::caution
@@ -30,13 +41,50 @@ import TabItem from '@theme/TabItem';
3041
opts = {
3142
-- make sure mason installs the server
3243
servers = {
33-
--- @deprecated -- tsserver renamed to ts_ls but not yet released, so keep this for now
34-
--- the proper approach is to check the nvim-lspconfig release version when it's released to determine the server name dynamically
35-
tsserver = {
36-
enabled = false,
37-
},
38-
ts_ls = {
39-
enabled = false,
44+
---@type lspconfig.settings.tsgo
45+
tsgo = {
46+
-- explicitly add default filetypes, so that we can extend
47+
-- them in related extras
48+
filetypes = {
49+
"javascript",
50+
"javascriptreact",
51+
"javascript.jsx",
52+
"typescript",
53+
"typescriptreact",
54+
"typescript.tsx",
55+
},
56+
settings = {
57+
typescript = {
58+
inlayHints = {
59+
parameterNames = {
60+
enabled = "literals",
61+
suppressWhenArgumentMatchesName = true,
62+
},
63+
parameterTypes = { enabled = true },
64+
variableTypes = { enabled = true },
65+
propertyDeclarationTypes = { enabled = true },
66+
functionLikeReturnTypes = { enabled = true },
67+
enumMemberValues = { enabled = true },
68+
},
69+
},
70+
},
71+
keys = {
72+
{
73+
"<leader>co",
74+
LazyVim.lsp.action["source.organizeImports"],
75+
desc = "Organize Imports",
76+
},
77+
{
78+
"<leader>cu",
79+
LazyVim.lsp.action["source.removeUnused.ts"],
80+
desc = "Remove unused imports",
81+
},
82+
{
83+
"<leader>cD",
84+
LazyVim.lsp.action["source.fixAll.ts"],
85+
desc = "Fix all diagnostics",
86+
},
87+
},
4088
},
4189
vtsls = {
4290
-- explicitly add default filetypes, so that we can extend
@@ -216,13 +264,50 @@ opts = {
216264
opts = {
217265
-- make sure mason installs the server
218266
servers = {
219-
--- @deprecated -- tsserver renamed to ts_ls but not yet released, so keep this for now
220-
--- the proper approach is to check the nvim-lspconfig release version when it's released to determine the server name dynamically
221-
tsserver = {
222-
enabled = false,
223-
},
224-
ts_ls = {
225-
enabled = false,
267+
---@type lspconfig.settings.tsgo
268+
tsgo = {
269+
-- explicitly add default filetypes, so that we can extend
270+
-- them in related extras
271+
filetypes = {
272+
"javascript",
273+
"javascriptreact",
274+
"javascript.jsx",
275+
"typescript",
276+
"typescriptreact",
277+
"typescript.tsx",
278+
},
279+
settings = {
280+
typescript = {
281+
inlayHints = {
282+
parameterNames = {
283+
enabled = "literals",
284+
suppressWhenArgumentMatchesName = true,
285+
},
286+
parameterTypes = { enabled = true },
287+
variableTypes = { enabled = true },
288+
propertyDeclarationTypes = { enabled = true },
289+
functionLikeReturnTypes = { enabled = true },
290+
enumMemberValues = { enabled = true },
291+
},
292+
},
293+
},
294+
keys = {
295+
{
296+
"<leader>co",
297+
LazyVim.lsp.action["source.organizeImports"],
298+
desc = "Organize Imports",
299+
},
300+
{
301+
"<leader>cu",
302+
LazyVim.lsp.action["source.removeUnused.ts"],
303+
desc = "Remove unused imports",
304+
},
305+
{
306+
"<leader>cD",
307+
LazyVim.lsp.action["source.fixAll.ts"],
308+
desc = "Fix all diagnostics",
309+
},
310+
},
226311
},
227312
vtsls = {
228313
-- explicitly add default filetypes, so that we can extend
@@ -396,6 +481,44 @@ opts = {
396481

397482
</Tabs>
398483

484+
## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig)
485+
486+
<Tabs>
487+
488+
<TabItem value="opts" label="Options">
489+
490+
```lua
491+
opts = function(_, opts)
492+
local servers = { "tsserver", "ts_ls", "vtsls", "tsgo", lsp }
493+
for _, server in ipairs(servers) do
494+
opts.servers[server] = opts.servers[server] or {}
495+
opts.servers[server].enabled = server == lsp
496+
end
497+
end
498+
```
499+
500+
</TabItem>
501+
502+
503+
<TabItem value="code" label="Full Spec">
504+
505+
```lua
506+
{
507+
"neovim/nvim-lspconfig",
508+
opts = function(_, opts)
509+
local servers = { "tsserver", "ts_ls", "vtsls", "tsgo", lsp }
510+
for _, server in ipairs(servers) do
511+
opts.servers[server] = opts.servers[server] or {}
512+
opts.servers[server].enabled = server == lsp
513+
end
514+
end,
515+
}
516+
```
517+
518+
</TabItem>
519+
520+
</Tabs>
521+
399522
## [mason.nvim](https://github.com/mason-org/mason.nvim)
400523

401524
<Tabs>

docs/plugins/coding.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ opts = {
195195
{ path = "LazyVim", words = { "LazyVim" } },
196196
{ path = "snacks.nvim", words = { "Snacks" } },
197197
{ path = "lazy.nvim", words = { "LazyVim" } },
198+
{ path = "nvim-lspconfig", words = { "lspconfig.settings" } },
198199
},
199200
}
200201
```
@@ -215,6 +216,7 @@ opts = {
215216
{ path = "LazyVim", words = { "LazyVim" } },
216217
{ path = "snacks.nvim", words = { "Snacks" } },
217218
{ path = "lazy.nvim", words = { "LazyVim" } },
219+
{ path = "nvim-lspconfig", words = { "lspconfig.settings" } },
218220
},
219221
},
220222
}

0 commit comments

Comments
 (0)