From 75c19f44876bc6833ecd5ccb0d715cab8d70416b Mon Sep 17 00:00:00 2001 From: Ariel D'Alessandro Date: Tue, 5 Sep 2023 15:35:27 +0200 Subject: updates --- lua/alpha/lsp/attach.lua | 2 +- lua/alpha/lsp/mason.lua | 12 ++++++------ lua/alpha/lsp/servers.lua | 8 +++++++- lua/alpha/test_strategy.lua | 2 +- 4 files changed, 15 insertions(+), 9 deletions(-) (limited to 'lua/alpha') diff --git a/lua/alpha/lsp/attach.lua b/lua/alpha/lsp/attach.lua index 84212a6..e15ad92 100644 --- a/lua/alpha/lsp/attach.lua +++ b/lua/alpha/lsp/attach.lua @@ -1,7 +1,7 @@ local telescope_mapper = require "alpha.telescope.mappings" local filetype_attach = setmetatable({ - php = function(client, bufnr) + php = function(_, bufnr) vim.api.nvim_buf_create_user_command(bufnr, "LspPhpactorReindex", function() vim.lsp.buf_notify(bufnr, "phpactor/index/reindex", {}) end, {}) diff --git a/lua/alpha/lsp/mason.lua b/lua/alpha/lsp/mason.lua index 752f6ac..a8c6ce7 100644 --- a/lua/alpha/lsp/mason.lua +++ b/lua/alpha/lsp/mason.lua @@ -12,12 +12,12 @@ for server, _ in pairs(servers) do end mason_lspconfig.setup { - ensure_installed = mason_servers, + -- ensure_installed = mason_servers, } -- filter the list for the ones not globally installed -require("mason-tool-installer").setup { - ensure_installed = vim.tbl_filter(function (tool) - return vim.fn.executable(tool) == 0 - end, require "alpha.lsp.tools"), -} +-- require("mason-tool-installer").setup { +-- ensure_installed = vim.tbl_filter(function (tool) +-- return vim.fn.executable(tool) == 0 +-- end, require "alpha.lsp.tools"), +-- } diff --git a/lua/alpha/lsp/servers.lua b/lua/alpha/lsp/servers.lua index ab70468..14ec9d3 100644 --- a/lua/alpha/lsp/servers.lua +++ b/lua/alpha/lsp/servers.lua @@ -76,7 +76,13 @@ return { }, } end, - ["marksman"] = default, + ["omnisharp"] = function() + return { + cmd = {"OmniSharp"}, + on_attach = lsp_attach, + flags = lsp_flags, + } + end, ["nil_ls"] = default, ["phpactor"] = function() return { diff --git a/lua/alpha/test_strategy.lua b/lua/alpha/test_strategy.lua index 46aae3c..9a2d34a 100644 --- a/lua/alpha/test_strategy.lua +++ b/lua/alpha/test_strategy.lua @@ -51,7 +51,7 @@ local function myStrategy(cmd) vim.notify("Test run successfully", vim.log.levels.INFO, { title = "Test" }) return end - local result = j:stderr_result() + local result = j:stderr_result() or j:stdout_result() -- join result in a single string result = table.concat(result, "\n") -- escape / characters -- cgit v1.2.3