1 require'lspconfig'.csharp_ls.setup({ -- install server: 'dotnet tool install --global csharp-ls'
2 -- cmd = {"~\\.dotnet\\tools\\csharp-ls.exe"},
3 on_attach = function ()
4 vim.keymap.set ("n", "K", vim.lsp.buf.hover, { buffer=0}) -- buffer=0 -> only in current buffer
5 vim.keymap.set ("n", "gd", vim.lsp.buf.definition, { buffer=0}) -- goto definition
6 vim.keymap.set ("n", "gT", vim.lsp.buf.type_definition, { buffer=0}) -- goto typedefinition
7 vim.keymap.set ("n", "gi", vim.lsp.buf.implementation, { buffer=0}) -- goto implementation
8 vim.keymap.set ("n", "dj", vim.diagnostic.goto_next, { buffer=0}) -- goto dignostic next
9 vim.keymap.set ("n", "dk", vim.diagnostic.goto_prev, { buffer=0}) -- goto diognostic prev
10 vim.keymap.set ("n", "dl", "<cmd>Telescope diagnostic", { buffer=0}) -- goto list failure
11 vim.keymap.set ("n", "<leader>r", vim.lsp.buf.rename, { buffer=0})