mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-08-19 00:39:32 +02:00
add: prisma default config
This commit is contained in:
parent
14284a94ca
commit
ef97b8b1bc
5 changed files with 35 additions and 12 deletions
|
@ -45,7 +45,7 @@ pcode.format_timeout_ms = 5000
|
|||
-- https://github.com/mfussenegger/nvim-lint
|
||||
-- https://github.com/stevearc/conform.nvim
|
||||
-- use conform and nvim-lint if set true
|
||||
pcode.disable_null_ls = false
|
||||
pcode.disable_null_ls = true
|
||||
|
||||
pcode.treesitter_ensure_installed = {}
|
||||
pcode.tscontext = false
|
||||
|
@ -167,6 +167,7 @@ pcode.active_javascript_config = {
|
|||
jest_command = "npm test -- ",
|
||||
jest_config = "jest.config.mjs",
|
||||
}
|
||||
pcode.active_prisma_config = true
|
||||
pcode.active_php_config = false
|
||||
pcode.active_golang_config = false
|
||||
pcode.active_python_config = false
|
||||
|
|
|
@ -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
|
|
@ -20,6 +20,8 @@ M.cheack = function()
|
|||
sts = true
|
||||
elseif pcode.active_kotlin_config or false then
|
||||
sts = true
|
||||
elseif pcode.active_prisma_config or false then
|
||||
sts = true
|
||||
end
|
||||
return sts
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue