feat(lemminx): change formatter to xmlformatter
This commit is contained in:
@@ -1,10 +1,40 @@
|
||||
-- spec: https://github.com/eclipse/lemminx/blob/main/docs/Configuration.md
|
||||
|
||||
local utils = require("utils")
|
||||
|
||||
return {
|
||||
enable = true,
|
||||
mason = {
|
||||
name = "lemminx",
|
||||
-- version = "",
|
||||
dependencies = { "xmlformatter" },
|
||||
},
|
||||
keymaps = {
|
||||
{
|
||||
mode = "n",
|
||||
lhs = "<leader>lf",
|
||||
rhs = function()
|
||||
utils.format({
|
||||
cmd = {
|
||||
"xmlformat",
|
||||
"-",
|
||||
},
|
||||
output = "stdout",
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
mode = "x",
|
||||
lhs = "<leader>lf",
|
||||
rhs = function()
|
||||
utils.format({
|
||||
cmd = {
|
||||
"xmlformat",
|
||||
"-",
|
||||
},
|
||||
output = "stdout",
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
lspconfig = {
|
||||
filetypes = {
|
||||
@@ -20,7 +50,7 @@ return {
|
||||
settings = {
|
||||
xml = {
|
||||
format = {
|
||||
enabled = true, -- is able to format document
|
||||
enabled = false, -- is able to format document
|
||||
splitAttributes = true, -- each attribute is formatted onto new line
|
||||
joinCDATALines = false, -- normalize content inside CDATA
|
||||
joinCommentLines = false, -- normalize content inside comments
|
||||
|
||||
Reference in New Issue
Block a user