From 3b43874e576e0d70fd13dc825bc9fcce94573bba Mon Sep 17 00:00:00 2001 From: kossLAN Date: Wed, 26 Feb 2025 14:35:20 -0500 Subject: [PATCH] ftplugin/qml: add qmlls, pretty jank --- nix/neovim-overlay.nix | 2 +- nvim/ftplugin/qml.lua | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/nix/neovim-overlay.nix b/nix/neovim-overlay.nix index 3951922..a600974 100644 --- a/nix/neovim-overlay.nix +++ b/nix/neovim-overlay.nix @@ -111,13 +111,13 @@ with final.pkgs.lib; let rust-analyzer # rust LSP vscode-langservers-extracted # various web dev lsps from vscode typescript-language-server # css lsp thing + qt6.qtdeclarative # qmlls # autoformatters alejandra # amazing nix autoformatter stylua # lua formatter rustfmt # rust formatter prettierd # typescript/javascript formatter - qt6.qtdeclarative # google-java-format # java formatter based off google guidelines # misc diff --git a/nvim/ftplugin/qml.lua b/nvim/ftplugin/qml.lua index 7250b84..80f5f6c 100644 --- a/nvim/ftplugin/qml.lua +++ b/nvim/ftplugin/qml.lua @@ -1,7 +1,16 @@ -if vim.fn.executable('qmlformat') ~= 1 then +if vim.fn.executable('qmlls') ~= 1 then return end vim.bo.tabstop = 4 vim.bo.shiftwidth = 4 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, +}