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
|
-- 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 modifiedBufs = function(bufs)
|
||||||
local t = 0
|
local t = 0
|
||||||
for k, v in pairs(bufs) do
|
for k, v in pairs(bufs) do
|
||||||
|
|
|
||||||
|
|
@ -69,14 +69,14 @@ return {
|
||||||
ansiblels = {},
|
ansiblels = {},
|
||||||
marksman = {},
|
marksman = {},
|
||||||
asm_lsp = {},
|
asm_lsp = {},
|
||||||
typst_lsp = {},
|
omnisharp = {},
|
||||||
csharp_ls = {
|
-- csharp_ls = {
|
||||||
cmd = { "/home/dashie/.local/share/nvim/mason/bin/csharp-ls" },
|
-- cmd = { "/home/dashie/.local/share/nvim/mason/bin/csharp-ls" },
|
||||||
filetypes = { "cs" },
|
-- filetypes = { "cs" },
|
||||||
init_options = {
|
-- init_options = {
|
||||||
AutomaticWorkspaceInit = true,
|
-- AutomaticWorkspaceInit = true,
|
||||||
},
|
-- },
|
||||||
},
|
-- },
|
||||||
tsserver = {
|
tsserver = {
|
||||||
settings = {
|
settings = {
|
||||||
typescript = {
|
typescript = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue