feat: add support for qml

This commit is contained in:
tux
2026-02-26 07:01:30 +05:30
parent afd150b869
commit 967709187e
4 changed files with 16 additions and 0 deletions

View File

@@ -17,6 +17,7 @@ local options = {
nix = { "alejandra" }, nix = { "alejandra" },
go = { "goimports", "gofumpt" }, go = { "goimports", "gofumpt" },
rust = { "rust_analyzer" }, rust = { "rust_analyzer" },
qml = { "qmlformat" },
}, },
format_on_save = { format_on_save = {

View File

@@ -19,4 +19,9 @@ vim.lsp.config("htmx", {
filetypes = { "html", "templ" }, filetypes = { "html", "templ" },
}) })
vim.lsp.config("qmlls", {
cmd = { "qmlls", "-E" },
filetypes = { "qml" },
})
vim.lsp.enable(servers) vim.lsp.enable(servers)

View File

@@ -23,6 +23,10 @@ local opts = {
-- python -- python
b.diagnostics.ruff, b.diagnostics.ruff,
b.formatting.black, b.formatting.black,
-- qml
b.diagnostics.qmllint,
b.formatting.qmlformat,
}, },
on_attach = function(client, bufnr) on_attach = function(client, bufnr)
if client.supports_method("textDocument/formatting") then if client.supports_method("textDocument/formatting") then

View File

@@ -30,6 +30,9 @@ M.treesitter = {
-- rust -- rust
"rust", "rust",
-- qml
"qmljs",
}, },
} }
@@ -60,6 +63,9 @@ M.mason = {
-- rust -- rust
"codelldb", "codelldb",
-- qml
"qmlls",
}, },
} }