Added configs
This commit is contained in:
@@ -3,13 +3,29 @@ return {
|
|||||||
"stevearc/conform.nvim",
|
"stevearc/conform.nvim",
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
config = function()
|
config = function()
|
||||||
|
function checkPrettierConfig()
|
||||||
|
local prettier_config = vim.fn.glob(".prettierrc*", 0, 1)
|
||||||
|
if prettier_config[1] == nil then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function dprintOrPrettier()
|
||||||
|
if checkPrettierConfig() then
|
||||||
|
return { "prettier" }
|
||||||
|
else
|
||||||
|
return { "dprint" }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
require("conform").setup({
|
require("conform").setup({
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
lua = { "stylua" },
|
lua = { "stylua" },
|
||||||
javascript = { "dprint" },
|
javascript = dprintOrPrettier(),
|
||||||
typescript = { "dprint" },
|
typescript = dprintOrPrettier(),
|
||||||
json = { "dprint" },
|
json = dprintOrPrettier(),
|
||||||
markdown = { "dprint" },
|
markdown = dprintOrPrettier(),
|
||||||
|
svelte = { "prettier" },
|
||||||
},
|
},
|
||||||
format_on_save = {
|
format_on_save = {
|
||||||
timeout_ms = 500,
|
timeout_ms = 500,
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ return {
|
|||||||
"yamlls",
|
"yamlls",
|
||||||
"eslint",
|
"eslint",
|
||||||
"bashls",
|
"bashls",
|
||||||
|
"svelte",
|
||||||
|
"tailwindcss",
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, lsp in ipairs(defaultLsps) do
|
for _, lsp in ipairs(defaultLsps) do
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ return {
|
|||||||
"rust_analyzer",
|
"rust_analyzer",
|
||||||
"yamlls",
|
"yamlls",
|
||||||
"bashls",
|
"bashls",
|
||||||
|
"svelte",
|
||||||
|
"tailwindcss",
|
||||||
},
|
},
|
||||||
automatic_installation = true,
|
automatic_installation = true,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -80,6 +80,9 @@ return {
|
|||||||
"windwp/nvim-ts-autotag",
|
"windwp/nvim-ts-autotag",
|
||||||
dependencies = "nvim-treesitter",
|
dependencies = "nvim-treesitter",
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
|
config = function()
|
||||||
|
require("nvim-ts-autotag").setup()
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"szw/vim-maximizer",
|
"szw/vim-maximizer",
|
||||||
|
|||||||
Reference in New Issue
Block a user