Added configs
This commit is contained in:
@@ -3,13 +3,29 @@ return {
|
||||
"stevearc/conform.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
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({
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
javascript = { "dprint" },
|
||||
typescript = { "dprint" },
|
||||
json = { "dprint" },
|
||||
markdown = { "dprint" },
|
||||
javascript = dprintOrPrettier(),
|
||||
typescript = dprintOrPrettier(),
|
||||
json = dprintOrPrettier(),
|
||||
markdown = dprintOrPrettier(),
|
||||
svelte = { "prettier" },
|
||||
},
|
||||
format_on_save = {
|
||||
timeout_ms = 500,
|
||||
|
||||
@@ -33,6 +33,8 @@ return {
|
||||
"yamlls",
|
||||
"eslint",
|
||||
"bashls",
|
||||
"svelte",
|
||||
"tailwindcss",
|
||||
}
|
||||
|
||||
for _, lsp in ipairs(defaultLsps) do
|
||||
|
||||
@@ -35,6 +35,8 @@ return {
|
||||
"rust_analyzer",
|
||||
"yamlls",
|
||||
"bashls",
|
||||
"svelte",
|
||||
"tailwindcss",
|
||||
},
|
||||
automatic_installation = true,
|
||||
})
|
||||
|
||||
@@ -80,6 +80,9 @@ return {
|
||||
"windwp/nvim-ts-autotag",
|
||||
dependencies = "nvim-treesitter",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = function()
|
||||
require("nvim-ts-autotag").setup()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"szw/vim-maximizer",
|
||||
|
||||
Reference in New Issue
Block a user