mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-21 08:35:48 +02:00
add: prisma format and key mappings
This commit is contained in:
parent
ef97b8b1bc
commit
02f4aab215
1 changed files with 33 additions and 2 deletions
|
@ -14,9 +14,40 @@ if pcode.active_prisma_config then
|
|||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, { "prismals" })
|
||||
vim.cmd([[
|
||||
autocmd BufWritePost *.prisma silent! execute "!npx prisma format"
|
||||
]])
|
||||
autocmd BufWritePost *.prisma silent! execute "!npx prisma format"
|
||||
]])
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>p", "", desc = " Prisma" },
|
||||
{
|
||||
"<leader>pf",
|
||||
function()
|
||||
vim.cmd("execute '!npx prisma format'")
|
||||
end,
|
||||
desc = "Prisma Format",
|
||||
},
|
||||
{
|
||||
"<leader>pm",
|
||||
function()
|
||||
vim.cmd("execute '!npx prisma init --datasource-provider mysql'")
|
||||
end,
|
||||
desc = "init MySQL",
|
||||
},
|
||||
{
|
||||
"<leader>pp",
|
||||
function()
|
||||
vim.cmd("execute '!npx prisma init --datasource-provider postgresql'")
|
||||
end,
|
||||
desc = "init postgresql",
|
||||
},
|
||||
{
|
||||
"<leader>pe",
|
||||
function()
|
||||
vim.cmd("execute '!npx prisma migrate dev --name init'")
|
||||
end,
|
||||
desc = "Migrate",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue