Skip to content

Commit ec14e9b

Browse files
committed
was having some issues with csharp_ls, try switching to omnisharp
1 parent fcec22e commit ec14e9b

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

lazy-lock.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"mini.nvim": { "branch": "main", "commit": "0e9d1f972a91acf5a0513319099ba41f7c09c30a" },
1414
"nvim-lspconfig": { "branch": "master", "commit": "45ff1914044de7dbd4cd85053dc09f47312a2f4d" },
1515
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
16+
"omnisharp-extended-lsp.nvim": { "branch": "main", "commit": "ec1a2431f8872f650a85ed71c24f0715df2e49c2" },
1617
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
1718
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
1819
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },

lua/kickstart/plugins/lspconfig.lua

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ return {
2828

2929
-- Allows extra capabilities provided by blink.cmp
3030
'saghen/blink.cmp',
31+
32+
'Hoffs/omnisharp-extended-lsp.nvim', -- omnisharp-roslyn extensions plugin
3133
},
3234
config = function()
3335
-- Brief aside: **What is LSP?**
@@ -109,6 +111,16 @@ return {
109111
-- the definition of its *type*, not where it was *defined*.
110112
map('grt', require('telescope.builtin').lsp_type_definitions, '[G]oto [T]ype Definition')
111113

114+
-- Telescope keybinds for omnisharp
115+
vim.keymap.set('n', 'gr', function()
116+
require('omnisharp_extended').telescope_lsp_references(require('telescope.themes').get_ivy { excludeDefinition = true })
117+
end, { noremap = true })
118+
vim.keymap.set('n', 'gd', require('omnisharp_extended').telescope_lsp_definition, { noremap = true })
119+
vim.keymap.set('n', '<leader>D', function()
120+
require('omnisharp_extended').telescope_lsp_references()
121+
end, { noremap = true })
122+
vim.keymap.set('n', 'gi', require('omnisharp_extended').telescope_lsp_implementation, { noremap = true })
123+
112124
-- This function resolves a difference between neovim nightly (version 0.11) and stable (version 0.10)
113125
---@param client vim.lsp.Client
114126
---@param method vim.lsp.protocol.Method
@@ -237,7 +249,8 @@ return {
237249
awk_ls = {},
238250
bashls = {},
239251
clangd = {}, -- TODO: setup compile_commands.json generation for any projects that need to use this LSP
240-
csharp_ls = {}, -- or use omnisharp or rosyln_ls instead?
252+
-- csharp_ls = {}, -- or use omnisharp or rosyln_ls instead?
253+
omnisharp = {},
241254
css_variables = {},
242255
cssls = {},
243256
docker_compose_language_service = {},

0 commit comments

Comments
 (0)