mirror of
https://github.com/boxpositron/absolute-vim.git
synced 2026-02-28 11:40:36 +00:00
feat(none-ls.lua): add mypy diagnostic tool with extra_args to specify python executable path based on environment variables
This commit is contained in:
@@ -6,5 +6,11 @@ null_ls.setup({
|
||||
null_ls.builtins.formatting.prettierd,
|
||||
null_ls.builtins.formatting.shfmt,
|
||||
null_ls.builtins.formatting.black,
|
||||
null_ls.builtins.diagnostics.mypy.with({
|
||||
extra_args = function()
|
||||
local virtual = os.getenv("VIRTUAL_ENV") or os.getenv("CONDA_PREFIX") or "/usr"
|
||||
return { "--python-executable", virtual .. "/bin/python3" }
|
||||
end,
|
||||
}),
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user