mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-22 08:53:31 +02:00
enc: upgrade v2 to v2.5
This commit is contained in:
parent
68ea712b98
commit
609234c086
443 changed files with 5224 additions and 90746 deletions
57
lua/pcode/plugins/lang/prisma.lua
Normal file
57
lua/pcode/plugins/lang/prisma.lua
Normal file
|
@ -0,0 +1,57 @@
|
|||
return {
|
||||
{
|
||||
"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,
|
||||
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",
|
||||
},
|
||||
{
|
||||
"<leader>ps",
|
||||
function()
|
||||
vim.cmd("terminal npx prisma studio")
|
||||
end,
|
||||
desc = "npx prisma Studio",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue