From b87090c9527d4190ce1dc391f4cee983263f4853 Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Fri, 23 Feb 2024 01:16:07 -0600 Subject: refactor: lspconfig/mason and add null-ls, add c and python support --- lua/plugins/null-ls.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lua/plugins/null-ls.lua (limited to 'lua/plugins/null-ls.lua') diff --git a/lua/plugins/null-ls.lua b/lua/plugins/null-ls.lua new file mode 100644 index 0000000..91f94e6 --- /dev/null +++ b/lua/plugins/null-ls.lua @@ -0,0 +1,23 @@ +return { + 'nvimtools/none-ls.nvim', + dependencies = { + 'nvim-lua/plenary.nvim', + }, + config = function() + local null_ls = require("null-ls") + + null_ls.setup({ + sources = { + null_ls.builtins.formatting.clang_format, + null_ls.builtins.formatting.autopep8, + 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/python" } + end, + }), + null_ls.builtins.diagnostics.ruff, + }, + }) + end +} -- cgit v1.2.3-70-g09d2