diff --git a/lua/plugins/barbar.lua b/lua/plugins/barbar.lua deleted file mode 100644 index d5e0c83..0000000 --- a/lua/plugins/barbar.lua +++ /dev/null @@ -1,15 +0,0 @@ -return { - "romgrk/barbar.nvim", - dependencies = { - "lewis6991/gitsigns.nvim", -- OPTIONAL: for git status - "nvim-tree/nvim-web-devicons", -- OPTIONAL: for file icons - }, - init = function() - vim.g.barbar_auto_setup = false - end, - opts = { - auto_hide = 1, - }, - - enabled = false, -} diff --git a/lua/plugins/neoformat.lua b/lua/plugins/neoformat.lua deleted file mode 100644 index 96bae62..0000000 --- a/lua/plugins/neoformat.lua +++ /dev/null @@ -1,14 +0,0 @@ -return { - "sbdchd/neoformat", - init = function() - -- Basic formatting - vim.g.neoformat_basic_format_retab = 1 - vim.g.neoformat_basic_format_trim = 1 - - -- Prefer Alejandra for Nix files - vim.g.neoformat_enabled_nix = { "alejandra" } - end, - keys = { - { "lf", "Neoformat", desc = "Format file" }, - }, -} diff --git a/lua/plugins/null-ls.lua b/lua/plugins/null-ls.lua new file mode 100644 index 0000000..90556a7 --- /dev/null +++ b/lua/plugins/null-ls.lua @@ -0,0 +1,31 @@ +return { + "nvimtools/none-ls.nvim", + dependencies = { "nvim-lua/plenary.nvim" }, + opts = function() + local null_ls = require("null-ls") + + null_ls.setup({ + sources = { + null_ls.builtins.formatting.alejandra, + null_ls.builtins.formatting.stylua, + null_ls.builtins.formatting.black, + }, + }) + end, + keys = { + { + "lf", + function() + vim.lsp.buf.format() + end, + desc = "Format file", + }, + { + "a", + function() + vim.lsp.buf.code_action() + end, + desc = "Code action", + }, + }, +}