diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/configs.md | 23 | ||||
| -rw-r--r-- | doc/configs.txt | 21 |
2 files changed, 30 insertions, 14 deletions
diff --git a/doc/configs.md b/doc/configs.md index 1cc8e254..ad7fde8e 100644 --- a/doc/configs.md +++ b/doc/configs.md @@ -8545,28 +8545,37 @@ It can be installed via `npm`: npm i -g oxlint ``` +Type-aware linting will automatically be enabled if `tsgolint` exists in your +path and your `.oxlintrc.json` contains the string "typescript". + +The default `on_attach` function provides an `:LspOxlintFixAll` command which +can be used to fix all fixable diagnostics. See the `eslint` config entry for +an example of how to use this to automatically fix all errors on write. + Snippet to enable the language server: ```lua vim.lsp.enable('oxlint') ``` Default config: +- `before_init`: [../lsp/oxlint.lua:32](../lsp/oxlint.lua#L32) - `cmd` : ```lua { "oxlint", "--lsp" } ``` - `filetypes` : ```lua - { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx", "vue", "svelte", "astro" } + { "javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "svelte", "astro" } ``` -- `init_options` : +- `on_attach`: [../lsp/oxlint.lua:32](../lsp/oxlint.lua#L32) +- `root_markers` : ```lua - { - settings = {} - } + { ".oxlintrc.json" } + ``` +- `settings` : + ```lua + {} ``` -- `on_attach`: [../lsp/oxlint.lua:17](../lsp/oxlint.lua#L17) -- `root_dir`: [../lsp/oxlint.lua:17](../lsp/oxlint.lua#L17) - `workspace_required` : `true` --- diff --git a/doc/configs.txt b/doc/configs.txt index 7094414e..2d56241e 100644 --- a/doc/configs.txt +++ b/doc/configs.txt @@ -6276,21 +6276,28 @@ It can be installed via `npm`: >sh npm i -g oxlint +Type-aware linting will automatically be enabled if `tsgolint` exists in your +path and your `.oxlintrc.json` contains the string "typescript". + +The default `on_attach` function provides an `:LspOxlintFixAll` command which +can be used to fix all fixable diagnostics. See the `eslint` config entry for +an example of how to use this to automatically fix all errors on write. + Snippet to enable the language server: >lua vim.lsp.enable('oxlint') Default config: +- before_init (use "gF" to view): ../lsp/oxlint.lua:32 - cmd: >lua { "oxlint", "--lsp" } - filetypes: >lua - { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx", "vue", "svelte", "astro" } -- init_options: >lua - { - settings = {} - } -- on_attach (use "gF" to view): ../lsp/oxlint.lua:17 -- root_dir (use "gF" to view): ../lsp/oxlint.lua:17 + { "javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "svelte", "astro" } +- on_attach (use "gF" to view): ../lsp/oxlint.lua:32 +- root_markers: >lua + { ".oxlintrc.json" } +- settings: >lua + {} - `workspace_required` : `true` < |
