add: prisma default config

This commit is contained in:
asep.komarudin 2024-06-30 18:02:32 +07:00
parent 14284a94ca
commit ef97b8b1bc
5 changed files with 35 additions and 12 deletions

23
lua/plugins/prisma.lua Normal file
View file

@ -0,0 +1,23 @@
local M = {}
if pcode.active_prisma_config then
M = {
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
vim.list_extend(opts.ensure_installed, { "prisma" })
end,
},
{
"williamboman/mason-lspconfig.nvim",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
vim.list_extend(opts.ensure_installed, { "prismals" })
vim.cmd([[
autocmd BufWritePost *.prisma silent! execute "!npx prisma format"
]])
end,
},
}
end
return M