mirror of
https://github.com/tuxdotrs/tnvim.git
synced 2026-03-22 21:46:33 +05:30
feat: add support for qml
This commit is contained in:
@@ -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 = {
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -30,6 +30,9 @@ M.treesitter = {
|
|||||||
|
|
||||||
-- rust
|
-- rust
|
||||||
"rust",
|
"rust",
|
||||||
|
|
||||||
|
-- qml
|
||||||
|
"qmljs",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,6 +63,9 @@ M.mason = {
|
|||||||
|
|
||||||
-- rust
|
-- rust
|
||||||
"codelldb",
|
"codelldb",
|
||||||
|
|
||||||
|
-- qml
|
||||||
|
"qmlls",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user