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
|
@ -17,6 +17,37 @@ if pcode.active_prisma_config then
|
|||
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