diff --git a/home/editors/neovim/lsp/lsp.lua b/home/editors/neovim/lsp/lsp.lua index ae84f0d..55d4962 100644 --- a/home/editors/neovim/lsp/lsp.lua +++ b/home/editors/neovim/lsp/lsp.lua @@ -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")