feat: add null-ls to auto-format with prettier
This commit is contained in:
parent
415fcc08ae
commit
49a05c0306
@ -132,6 +132,25 @@ return require('packer').startup(function(use)
|
||||
config = function() require('plugins.nvim-lsp-setup') end,
|
||||
}
|
||||
|
||||
-- null-ls
|
||||
use {
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
requres = {
|
||||
{ "nvim-lua/plenary.nvim" },
|
||||
},
|
||||
config = function()
|
||||
require("null-ls").setup({
|
||||
sources = {
|
||||
require("null-ls").builtins.formatting.prettier,
|
||||
},
|
||||
on_attach = function(client)
|
||||
local utils = require("nvim-lsp-setup.utils")
|
||||
utils.format_on_save(client)
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
-- treesitter
|
||||
use({
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
|
Reference in New Issue
Block a user