fix: thanks m$
This commit is contained in:
parent
482a6fd4a1
commit
872fcff707
2 changed files with 28 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -69,14 +69,14 @@ return {
|
|||
ansiblels = {},
|
||||
marksman = {},
|
||||
asm_lsp = {},
|
||||
typst_lsp = {},
|
||||
csharp_ls = {
|
||||
cmd = { "/home/dashie/.local/share/nvim/mason/bin/csharp-ls" },
|
||||
filetypes = { "cs" },
|
||||
init_options = {
|
||||
AutomaticWorkspaceInit = true,
|
||||
},
|
||||
},
|
||||
omnisharp = {},
|
||||
-- csharp_ls = {
|
||||
-- cmd = { "/home/dashie/.local/share/nvim/mason/bin/csharp-ls" },
|
||||
-- filetypes = { "cs" },
|
||||
-- init_options = {
|
||||
-- AutomaticWorkspaceInit = true,
|
||||
-- },
|
||||
-- },
|
||||
tsserver = {
|
||||
settings = {
|
||||
typescript = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue