From f4491410b3fb6cd71224969aed9c05dccfa0ee64 Mon Sep 17 00:00:00 2001 From: tastytea Date: Thu, 8 Sep 2022 06:05:36 +0200 Subject: [PATCH] nvim: add working check for perlls --- .config/nvim/lua/my/lsp.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.config/nvim/lua/my/lsp.lua b/.config/nvim/lua/my/lsp.lua index 64eba7f..c74f7af 100644 --- a/.config/nvim/lua/my/lsp.lua +++ b/.config/nvim/lua/my/lsp.lua @@ -193,12 +193,13 @@ if vim.fn.executable('gopls') > 0 then }) end --- there is no good and fast enough way to check for its existence -lspconfig.perlls.setup({ - autostart = false, - on_attach = on_attach, - capabilities = capabilities -}) +if vim.fn.glob('/usr/lib64/perl5/vendor_perl/5.*/Perl/LanguageServer.pm') ~= '' +then + lspconfig.perlls.setup({ + on_attach = on_attach, + capabilities = capabilities + }) +end if vim.fn.executable('qml-lsp') > 0 then lspconfig.qml_lsp.setup({