Skip to content

Commit f4e9d36

Browse files
docs: update configs.md
skip-checks: true
1 parent 5020eab commit f4e9d36

2 files changed

Lines changed: 30 additions & 14 deletions

File tree

doc/configs.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8545,28 +8545,37 @@ It can be installed via `npm`:
85458545
npm i -g oxlint
85468546
```
85478547

8548+
Type-aware linting will automatically be enabled if `tsgolint` exists in your
8549+
path and your `.oxlintrc.json` contains the string "typescript".
8550+
8551+
The default `on_attach` function provides an `:LspOxlintFixAll` command which
8552+
can be used to fix all fixable diagnostics. See the `eslint` config entry for
8553+
an example of how to use this to automatically fix all errors on write.
8554+
85488555
Snippet to enable the language server:
85498556
```lua
85508557
vim.lsp.enable('oxlint')
85518558
```
85528559

85538560
Default config:
8561+
- `before_init`: [../lsp/oxlint.lua:32](../lsp/oxlint.lua#L32)
85548562
- `cmd` :
85558563
```lua
85568564
{ "oxlint", "--lsp" }
85578565
```
85588566
- `filetypes` :
85598567
```lua
8560-
{ "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx", "vue", "svelte", "astro" }
8568+
{ "javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "svelte", "astro" }
85618569
```
8562-
- `init_options` :
8570+
- `on_attach`: [../lsp/oxlint.lua:32](../lsp/oxlint.lua#L32)
8571+
- `root_markers` :
85638572
```lua
8564-
{
8565-
settings = {}
8566-
}
8573+
{ ".oxlintrc.json" }
8574+
```
8575+
- `settings` :
8576+
```lua
8577+
{}
85678578
```
8568-
- `on_attach`: [../lsp/oxlint.lua:17](../lsp/oxlint.lua#L17)
8569-
- `root_dir`: [../lsp/oxlint.lua:17](../lsp/oxlint.lua#L17)
85708579
- `workspace_required` : `true`
85718580

85728581
---

doc/configs.txt

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6276,21 +6276,28 @@ It can be installed via `npm`:
62766276
>sh
62776277
npm i -g oxlint
62786278

6279+
Type-aware linting will automatically be enabled if `tsgolint` exists in your
6280+
path and your `.oxlintrc.json` contains the string "typescript".
6281+
6282+
The default `on_attach` function provides an `:LspOxlintFixAll` command which
6283+
can be used to fix all fixable diagnostics. See the `eslint` config entry for
6284+
an example of how to use this to automatically fix all errors on write.
6285+
62796286
Snippet to enable the language server: >lua
62806287
vim.lsp.enable('oxlint')
62816288

62826289

62836290
Default config:
6291+
- before_init (use "gF" to view): ../lsp/oxlint.lua:32
62846292
- cmd: >lua
62856293
{ "oxlint", "--lsp" }
62866294
- filetypes: >lua
6287-
{ "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx", "vue", "svelte", "astro" }
6288-
- init_options: >lua
6289-
{
6290-
settings = {}
6291-
}
6292-
- on_attach (use "gF" to view): ../lsp/oxlint.lua:17
6293-
- root_dir (use "gF" to view): ../lsp/oxlint.lua:17
6295+
{ "javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "svelte", "astro" }
6296+
- on_attach (use "gF" to view): ../lsp/oxlint.lua:32
6297+
- root_markers: >lua
6298+
{ ".oxlintrc.json" }
6299+
- settings: >lua
6300+
{}
62946301
- `workspace_required` : `true`
62956302
<
62966303

0 commit comments

Comments
 (0)