ftplugin/qml: add qmlls, pretty jank

This commit is contained in:
kossLAN 2025-02-26 14:35:20 -05:00
parent 3e02c57c0a
commit 3b43874e57
Signed by: kossLAN
SSH key fingerprint: SHA256:bdV0x+wdQHGJ6LgmstH3KV8OpWY+OOFmJcPcB0wQPV8
2 changed files with 11 additions and 2 deletions

View file

@ -111,13 +111,13 @@ with final.pkgs.lib; let
rust-analyzer # rust LSP rust-analyzer # rust LSP
vscode-langservers-extracted # various web dev lsps from vscode vscode-langservers-extracted # various web dev lsps from vscode
typescript-language-server # css lsp thing typescript-language-server # css lsp thing
qt6.qtdeclarative # qmlls
# autoformatters # autoformatters
alejandra # amazing nix autoformatter alejandra # amazing nix autoformatter
stylua # lua formatter stylua # lua formatter
rustfmt # rust formatter rustfmt # rust formatter
prettierd # typescript/javascript formatter prettierd # typescript/javascript formatter
qt6.qtdeclarative
# google-java-format # java formatter based off google guidelines # google-java-format # java formatter based off google guidelines
# misc # misc

View file

@ -1,7 +1,16 @@
if vim.fn.executable('qmlformat') ~= 1 then if vim.fn.executable('qmlls') ~= 1 then
return return
end end
vim.bo.tabstop = 4 vim.bo.tabstop = 4
vim.bo.shiftwidth = 4 vim.bo.shiftwidth = 4
vim.bo.expandtab = true vim.bo.expandtab = true
local lsp = require('user.lsp')
vim.lsp.start {
name = 'qmlls',
cmd = { 'qmlls', '-E' },
capabilities = lsp.make_client_capabilities(),
on_attach = lsp.on_attach,
}