Readd omnisharp and disable roslyn

It isnt quite ready for prime time yet. diagnostics
arent getting handled.
This commit is contained in:
Jeremy Wall 2024-01-09 12:24:39 -05:00
parent fcb1d2420b
commit b9ad9eac83
3 changed files with 39 additions and 38 deletions

View File

@ -165,6 +165,7 @@ EOF";
nil-pkg nil-pkg
lua-language-server lua-language-server
rust-analyzer rust-analyzer
omnisharp-roslyn
]); ]);
}; };
}; };

View File

@ -138,45 +138,45 @@ lspconfig.nil_ls.setup {
capabilities = caps, capabilities = caps,
} }
require('roslyn').setup({ --require('roslyn').setup({
on_attach = function (client, _) -- on_attach = function (client, _)
--vim.notify(vim.inspect(client)) -- --vim.notify(vim.inspect(client))
end, -- end,
capabilities = caps, -- capabilities = caps,
log_level = "Trace", -- log_level = "Trace",
}); --});
local vim_pid = vim.fn.getpid() local vim_pid = vim.fn.getpid()
-- "FormatterOptions:EnableEditorConfigSupport=true" -- "FormatterOptions:EnableEditorConfigSupport=true"
--local omnisharp_cmd = { 'omnisharp', '--languageserver', '-v', '--hostPID', tostring(vim_pid), } local omnisharp_cmd = { 'omnisharp', '--languageserver', '-v', '--hostPID', tostring(vim_pid), }
--
--local function toSnakeCase(str) local function toSnakeCase(str)
-- return string.gsub(str, "%s*[- ]%s*", "_") return string.gsub(str, "%s*[- ]%s*", "_")
--end end
--
--lspconfig.omnisharp.setup { lspconfig.omnisharp.setup {
-- cmd = omnisharp_cmd, cmd = omnisharp_cmd,
-- enable_roslyn_analyzers = true, enable_roslyn_analyzers = true,
-- enable_editorconfig_support = true, enable_editorconfig_support = true,
-- enable_import_completion = true, enable_import_completion = true,
-- -- Omnisharp has issues with the semanticTokens feature we need to massage it a bit. -- Omnisharp has issues with the semanticTokens feature we need to massage it a bit.
-- on_attach = function(client, bufnr) on_attach = function(client, bufnr)
-- -- https://github.com/OmniSharp/omnisharp-roslyn/issues/2483#issuecomment-1492605642 -- https://github.com/OmniSharp/omnisharp-roslyn/issues/2483#issuecomment-1492605642
-- local tokenModifiers = client.server_capabilities.semanticTokensProvider.legend.tokenModifiers local tokenModifiers = client.server_capabilities.semanticTokensProvider.legend.tokenModifiers
-- for i, v in ipairs(tokenModifiers) do for i, v in ipairs(tokenModifiers) do
-- tokenModifiers[i] = toSnakeCase(v) tokenModifiers[i] = toSnakeCase(v)
-- end end
-- local tokenTypes = client.server_capabilities.semanticTokensProvider.legend.tokenTypes local tokenTypes = client.server_capabilities.semanticTokensProvider.legend.tokenTypes
-- for i, v in ipairs(tokenTypes) do for i, v in ipairs(tokenTypes) do
-- tokenTypes[i] = toSnakeCase(v) tokenTypes[i] = toSnakeCase(v)
-- end end
-- end, end,
-- handlers = { handlers = {
-- ["textDocument/definition"] = require('omnisharp_extended').handler, ["textDocument/definition"] = require('omnisharp_extended').handler,
-- }, },
-- capabilities = caps, capabilities = caps,
--} }
--ocaml --ocaml
lspconfig.ocamllsp.setup { lspconfig.ocamllsp.setup {

6
nix/darwin/flake.lock generated
View File

@ -37,12 +37,12 @@
}, },
"locked": { "locked": {
"lastModified": 1, "lastModified": 1,
"narHash": "sha256-LPZptn4TgP1Rk6u1FQauqeRdswDP5VxmhlE8AfFVRFE=", "narHash": "sha256-VDkul+Z32T3/AhU5fY7Wtaf7n6U3WOPFG63Z7lL2WjQ=",
"path": "/nix/store/89vbp2wn5hvs421h8c220jazqfcrbwf0-source/nix/base-system", "path": "/nix/store/ljim4cw8ldrl6azj7kwmy2fa0vgnhgm6-source/nix/base-system",
"type": "path" "type": "path"
}, },
"original": { "original": {
"path": "/nix/store/89vbp2wn5hvs421h8c220jazqfcrbwf0-source/nix/base-system", "path": "/nix/store/ljim4cw8ldrl6azj7kwmy2fa0vgnhgm6-source/nix/base-system",
"type": "path" "type": "path"
} }
}, },