fix: thanks m$

This commit is contained in:
Fabio Lenherr / DashieTM 2023-05-13 16:42:12 +02:00
parent 482a6fd4a1
commit 872fcff707
2 changed files with 28 additions and 8 deletions

View file

@ -12,6 +12,26 @@
-- })
-- nvim-tree is also there in modified buffers so this function filter it out
vim.api.nvim_create_autocmd("LspAttach", {
callback = function(ev)
local client = vim.lsp.get_client_by_id(ev.data.client_id)
local function toSnakeCase(str)
return string.gsub(str, "%s*[- ]%s*", "_")
end
if client.name == "omnisharp" then
local tokenModifiers = client.server_capabilities.semanticTokensProvider.legend.tokenModifiers
for i, v in ipairs(tokenModifiers) do
tokenModifiers[i] = toSnakeCase(v)
end
local tokenTypes = client.server_capabilities.semanticTokensProvider.legend.tokenTypes
for i, v in ipairs(tokenTypes) do
tokenTypes[i] = toSnakeCase(v)
end
end
end,
})
local modifiedBufs = function(bufs)
local t = 0
for k, v in pairs(bufs) do