mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-27 19:28:52 +02:00
add: prisma default config
This commit is contained in:
parent
14284a94ca
commit
ef97b8b1bc
5 changed files with 35 additions and 12 deletions
|
@ -71,7 +71,7 @@ if disable then
|
|||
}
|
||||
end
|
||||
|
||||
local listtest = {}
|
||||
-- local listtest = {}
|
||||
-- finally add the formatter to it's compatible filetype(s)
|
||||
for _, ft in pairs(pkg.spec.languages) do
|
||||
local ftl = string.lower(ft)
|
||||
|
@ -85,9 +85,9 @@ if disable then
|
|||
pkg.spec.name = name_map[pkg.spec.name]
|
||||
end
|
||||
|
||||
if substring(pkg.spec.name, "ktfmt") then
|
||||
table.insert(listtest, ftl)
|
||||
end
|
||||
-- if substring(pkg.spec.name, "ktfmt") then
|
||||
-- table.insert(listtest, ftl)
|
||||
-- end
|
||||
|
||||
-- add new mapping language
|
||||
for key, value in pairs(addnew) do
|
||||
|
@ -103,7 +103,7 @@ if disable then
|
|||
end
|
||||
end
|
||||
end
|
||||
print(table.concat(listtest, ","))
|
||||
-- print(table.concat(listtest, ","))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
23
lua/plugins/prisma.lua
Normal file
23
lua/plugins/prisma.lua
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue