feat: add null-ls to auto-format with prettier

main
mandlm 2022-05-18 16:20:47 +02:00
parent 415fcc08ae
commit 49a05c0306
Signed by: mandlm
GPG Key ID: 4AA25D647AA54CC7
1 changed files with 19 additions and 0 deletions

View File

@ -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',