⚙️ config(nvim): merge html and css config together

This commit is contained in:
Sergio Laín 2024-01-03 10:58:07 +01:00
parent f0f8cdca0b
commit d15bfcfc66
No known key found for this signature in database
GPG key ID: 14C9B8080681777B
3 changed files with 17 additions and 40 deletions

View file

@ -54,8 +54,7 @@
"plugins.extras.lang.python-extended", "plugins.extras.lang.python-extended",
"plugins.extras.lang.rust-extended", "plugins.extras.lang.rust-extended",
"plugins.extras.lang.sql", "plugins.extras.lang.sql",
"plugins.extras.lang.web.css", "plugins.extras.lang.web.html-css",
"plugins.extras.lang.web.html",
"plugins.extras.lang.web.typescript-extended", "plugins.extras.lang.web.typescript-extended",
"plugins.extras.linting.eslint-extended", "plugins.extras.linting.eslint-extended",
"plugins.extras.linting.shellcheck", "plugins.extras.linting.shellcheck",
@ -89,3 +88,4 @@
}, },
"version": 2 "version": 2
} }

View file

@ -2,15 +2,19 @@ return {
{ {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
opts = function(_, opts) opts = function(_, opts)
if type(opts.ensure_installed) == "table" then vim.list_extend(opts.ensure_installed, {
vim.list_extend(opts.ensure_installed, { "css", "scss" }) "html",
end "css",
"scss",
})
end, end,
}, },
{ {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
opts = { opts = {
servers = { servers = {
emmet_language_server = {},
html = {},
cssmodules_ls = {}, cssmodules_ls = {},
cssls = { cssls = {
lint = { lint = {
@ -39,13 +43,19 @@ return {
"williamboman/mason.nvim", "williamboman/mason.nvim",
opts = function(_, opts) opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {} opts.ensure_installed = opts.ensure_installed or {}
vim.list_extend(opts.ensure_installed, { "cssmodules-language-server", "css-lsp" }) vim.list_extend(opts.ensure_installed, {
"emmet-language-server",
"html-lsp",
"cssmodules-language-server",
"css-lsp",
})
end, end,
}, },
{ {
"luckasRanarison/nvim-devdocs", "luckasRanarison/nvim-devdocs",
optional = true, optional = true,
ensure_installed = { ensure_installed = {
"html",
"css", "css",
"sass", "sass",
}, },

View file

@ -1,33 +0,0 @@
return {
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
vim.list_extend(opts.ensure_installed, {
"html",
})
end,
},
{
"neovim/nvim-lspconfig",
opts = {
servers = {
emmet_language_server = {},
html = {},
},
},
},
{
"williamboman/mason.nvim",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
vim.list_extend(opts.ensure_installed, { "emmet-language-server", "html-lsp" })
end,
},
{
"luckasRanarison/nvim-devdocs",
optional = true,
ensure_installed = {
"html",
},
},
}