mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
增加html-css
This commit is contained in:
parent
1913434354
commit
262babb6db
1 changed files with 92 additions and 0 deletions
92
lua/lazyvim/plugins/extras/lang/html-css.lua
Normal file
92
lua/lazyvim/plugins/extras/lang/html-css.lua
Normal file
|
|
@ -0,0 +1,92 @@
|
||||||
|
local list_insert_unique = require("utils").list_insert_unique
|
||||||
|
local filetypes = {
|
||||||
|
"css",
|
||||||
|
"eruby",
|
||||||
|
"html",
|
||||||
|
"htmldjango",
|
||||||
|
"javascriptreact",
|
||||||
|
"less",
|
||||||
|
"pug",
|
||||||
|
"sass",
|
||||||
|
"scss",
|
||||||
|
"typescriptreact",
|
||||||
|
"vue",
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
opts = function(_, opts)
|
||||||
|
vim.tbl_deep_extend("force", opts.servers, {
|
||||||
|
emmet_language_server = {
|
||||||
|
init_options = {
|
||||||
|
--- @type boolean Defaults to `true`
|
||||||
|
showAbbreviationSuggestions = false,
|
||||||
|
--- @type "always" | "never" Defaults to `"always"`
|
||||||
|
showExpandedAbbreviation = "always",
|
||||||
|
--- @type boolean Defaults to `false`
|
||||||
|
showSuggestionsAsSnippets = true,
|
||||||
|
},
|
||||||
|
filetypes,
|
||||||
|
},
|
||||||
|
html = { init_options = { provideFormatter = false } },
|
||||||
|
cssls = {
|
||||||
|
init_options = { provideFormatter = false },
|
||||||
|
settings = {
|
||||||
|
css = {
|
||||||
|
lint = {
|
||||||
|
unknownAtRules = "ignore",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
less = {
|
||||||
|
lint = {
|
||||||
|
unknownAtRules = "ignore",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
scss = {
|
||||||
|
validate = false,
|
||||||
|
lint = {
|
||||||
|
unknownAtRules = "ignore",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
opts = function(_, opts)
|
||||||
|
if opts.ensure_installed ~= "all" then
|
||||||
|
list_insert_unique(opts.ensure_installed, {
|
||||||
|
"html",
|
||||||
|
"css",
|
||||||
|
"scss",
|
||||||
|
})
|
||||||
|
end
|
||||||
|
vim.treesitter.language.register("scss", "less")
|
||||||
|
vim.treesitter.language.register("scss", "postcss")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mason-org/mason.nvim",
|
||||||
|
opts = function(_, opts)
|
||||||
|
opts.ensure_installed = opts.ensure_installed or {}
|
||||||
|
list_insert_unique(opts.ensure_installed, {
|
||||||
|
"html-lsp",
|
||||||
|
"cssmodules-language-server",
|
||||||
|
"css-lsp",
|
||||||
|
"emmet-language-server",
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"echasnovski/mini.icons",
|
||||||
|
optional = true,
|
||||||
|
opts = {
|
||||||
|
filetype = {
|
||||||
|
postcss = { glyph = "", hl = "MiniIconsOrange" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue