From dd0c6b3f737c919baac00953e6d43a2ae5130c50 Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Thu, 3 Oct 2024 19:29:06 +0200 Subject: [PATCH] feat: allow linter's cwd to be specifed as function --- lua/lint.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/lint.lua b/lua/lint.lua index 15b5f4f8..c1fec90d 100644 --- a/lua/lint.lua +++ b/lua/lint.lua @@ -357,6 +357,9 @@ function M.lint(linter, opts) -- pop up shortly. detached = not iswin } + if type(linter_opts.cwd) == 'function' then + linter_opts.cwd = linter_opts.cwd() + end -- prevents cmd.exe taking over the tab title if iswin then linter_opts.hide = true