diff options
| author | Igor Lacerda <igorlfs@ufmg.br> | 2026-05-28 14:17:27 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-28 13:17:27 -0400 |
| commit | 9573948c38bfabeec353ae7dd7d3ffec4c506a6b (patch) | |
| tree | 63cfba197dc03ca395441213b0432ed33d319d11 | |
| parent | docs: update configs.md (diff) | |
| download | nvim-lspconfig-9573948c38bfabeec353ae7dd7d3ffec4c506a6b.tar nvim-lspconfig-9573948c38bfabeec353ae7dd7d3ffec4c506a6b.tar.gz nvim-lspconfig-9573948c38bfabeec353ae7dd7d3ffec4c506a6b.tar.bz2 nvim-lspconfig-9573948c38bfabeec353ae7dd7d3ffec4c506a6b.tar.lz nvim-lspconfig-9573948c38bfabeec353ae7dd7d3ffec4c506a6b.tar.xz nvim-lspconfig-9573948c38bfabeec353ae7dd7d3ffec4c506a6b.tar.zst nvim-lspconfig-9573948c38bfabeec353ae7dd7d3ffec4c506a6b.zip | |
| -rw-r--r-- | lsp/oxlint.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lsp/oxlint.lua b/lsp/oxlint.lua index ab96f96a..e0595fef 100644 --- a/lsp/oxlint.lua +++ b/lsp/oxlint.lua @@ -93,7 +93,12 @@ return { }, before_init = function(init_params, config) local settings = config.settings or {} - if settings.typeAware == nil and vim.fn.executable('tsgolint') == 1 then + local has_tsgolint = vim.fn.executable('tsgolint') == 1 + if not has_tsgolint and (config or {}).root_dir then + local local_cmd = vim.fs.joinpath(config.root_dir, 'node_modules/.bin', 'tsgolint') + has_tsgolint = vim.fn.executable(local_cmd) == 1 + end + if settings.typeAware == nil and has_tsgolint then local ok, res = pcall(oxlint_conf_mentions_typescript, config.root_dir) if ok and res then settings = vim.tbl_extend('force', settings, { typeAware = true }) |
