fix(neovim): add workaround for omnisharp issues

This commit is contained in:
Felix Schröter 2023-06-26 18:03:50 +02:00
parent 94518025ba
commit b46461a872
Signed by: felschr
GPG key ID: 671E39E6744C807D

View file

@ -35,6 +35,18 @@ local on_attach = function(client, bufnr)
end,
})
end
-- workaround for https://github.com/OmniSharp/omnisharp-roslyn/issues/2483
if client.name == "omnisharp" then
local tokenModifiers = client.server_capabilities.semanticTokensProvider.legend.tokenModifiers
for i, v in ipairs(tokenModifiers) do
tokenModifiers[i] = string.gsub(v, "%s*[- ]%s*", "_")
end
local tokenTypes = client.server_capabilities.semanticTokensProvider.legend.tokenTypes
for i, v in ipairs(tokenTypes) do
tokenTypes[i] = string.gsub(v, "%s*[- ]%s*", "_")
end
end
end
local config = require("lspconfig")