-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I pass on_attach
and capabilities
to omnisharp?
#2
Comments
Thank you for your input, @bartoszluka I'll extend the configuration to allow passing capabilities and on_attach. There's another way to add the custom mapping that I personally prefer, which is to use LspAttach autocmd instead of passing the on_attach function. e.g., vim.api.nvim_create_autocmd("LspAttach", {
callback = function(args)
local bufnr = args.buf
local client = vim.lsp.get_client_by_id(args.data.client_id)
if client.name ~= "omnisharp" then
return
end
vim.keymap.set("n", "gd", require("csharp").go_to_definition, { silent = true, nowait = true, noremap = true, desc = "Go to Definition", buffer = bufnr })
end,
})
|
That is exactly what I ended up doing, funny we figured out the same solution to this. |
Yes @bartoszluka 😄 I pushed a commit which adds capabilities and on_attach to the configuration. Thank you for the suggestion ^^ |
thank you! |
I have custom LSP mappings that work for all language servers and I would like to pass them to omnisharp using this plugin. Is this possible now?
The text was updated successfully, but these errors were encountered: