neoformat -> null-ls
This commit is contained in:
parent
d696237fc0
commit
3d070af4c7
3 changed files with 31 additions and 29 deletions
|
@ -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,
|
||||
}
|
|
@ -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 = {
|
||||
{ "<leader>lf", "<cmd>Neoformat<CR>", desc = "Format file" },
|
||||
},
|
||||
}
|
31
lua/plugins/null-ls.lua
Normal file
31
lua/plugins/null-ls.lua
Normal file
|
@ -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 = {
|
||||
{
|
||||
"<leader>lf",
|
||||
function()
|
||||
vim.lsp.buf.format()
|
||||
end,
|
||||
desc = "Format file",
|
||||
},
|
||||
{
|
||||
"<leader>a",
|
||||
function()
|
||||
vim.lsp.buf.code_action()
|
||||
end,
|
||||
desc = "Code action",
|
||||
},
|
||||
},
|
||||
}
|
Loading…
Reference in a new issue