added roslyn and telescope_ui_select

This commit is contained in:
radumacocian
2025-08-24 18:44:25 +02:00
parent 2bce0398a0
commit 69d1e6613e
10 changed files with 63 additions and 59 deletions

View File

@@ -24,31 +24,32 @@ lspconfig.cssls.setup {
capabilities = capabilities,
}
lspconfig.lua_ls.setup {}
-- require('roslyn').setup({
-- config = {
-- settings = {
-- ["csharp|inlay_hints"] = {
-- csharp_enable_inlay_hints_for_implicit_object_creation = true,
-- csharp_enable_inlay_hints_for_implicit_variable_types = true,
-- csharp_enable_inlay_hints_for_lambda_parameter_types = true,
-- csharp_enable_inlay_hints_for_types = true,
-- dotnet_enable_inlay_hints_for_indexer_parameters = true,
-- dotnet_enable_inlay_hints_for_literal_parameters = true,
-- dotnet_enable_inlay_hints_for_object_creation_parameters = true,
-- dotnet_enable_inlay_hints_for_other_parameters = true,
-- dotnet_enable_inlay_hints_for_parameters = true,
-- dotnet_suppress_inlay_hints_for_parameters_that_differ_only_by_suffix = true,
-- dotnet_suppress_inlay_hints_for_parameters_that_match_argument_name = true,
-- dotnet_suppress_inlay_hints_for_parameters_that_match_method_intent = true,
-- },
-- },
-- },
-- exe = {
-- "dotnet",
-- vim.fs.joinpath(vim.fn.stdpath("data"), "roslyn", "Microsoft.CodeAnalysis.LanguageServer.dll"),
-- },
-- filewatching = true,
-- })
vim.lsp.config('roslyn', {
settings = {
["csharp|inlay_hints"] = {
csharp_enable_inlay_hints_for_implicit_object_creation = true,
csharp_enable_inlay_hints_for_implicit_variable_types = true,
csharp_enable_inlay_hints_for_lambda_parameter_types = true,
csharp_enable_inlay_hints_for_types = true,
dotnet_enable_inlay_hints_for_indexer_parameters = true,
dotnet_enable_inlay_hints_for_literal_parameters = true,
dotnet_enable_inlay_hints_for_object_creation_parameters = true,
dotnet_enable_inlay_hints_for_other_parameters = true,
dotnet_enable_inlay_hints_for_parameters = true,
dotnet_suppress_inlay_hints_for_parameters_that_differ_only_by_suffix = true,
dotnet_suppress_inlay_hints_for_parameters_that_match_argument_name = true,
dotnet_suppress_inlay_hints_for_parameters_that_match_method_intent = true,
},
},
})
require('roslyn').setup({
exe = {
"dotnet",
vim.fs.joinpath(vim.fn.stdpath("data"), "roslyn", "Microsoft.CodeAnalysis.LanguageServer.dll"),
},
filewatching = true,
})
vim.api.nvim_create_autocmd('LspAttach', {
@@ -63,7 +64,14 @@ vim.api.nvim_create_autocmd('LspAttach', {
vim.keymap.set('n', '<leader>gi', function() vim.lsp.buf.implementation() end, opts)
vim.keymap.set('n', '[d', function() vim.diagnostic.goto_next() end, opts)
vim.keymap.set('n', ']d', function() vim.diagnostic.goto_prev() end, opts)
vim.keymap.set('n', '<leader>vca', function() vim.lsp.buf.code_action() end, opts)
vim.keymap.set('n', '<leader>vca', function()
vim.lsp.buf.code_action({
context = {
diagnostics = vim.diagnostic.get(0),
only = { 'quickfix', 'refactor', 'source' }
}
})
end, opts)
vim.keymap.set('n', '<leader>vrr', function() vim.lsp.buf.references() end, opts)
vim.keymap.set('n', '<leader>vrn', function() vim.lsp.buf.rename() end, opts)
vim.keymap.set('i', '<C-h>', function() vim.lsp.buf.signature_help() end, opts)
@@ -71,29 +79,6 @@ vim.api.nvim_create_autocmd('LspAttach', {
end,
})
-- require('blink').setup({
-- cmp = {
-- sources = {
-- { name = 'lsp' },
-- { name = 'buffer' },
-- { name = 'path' },
-- { name = 'snippets' },
-- },
-- mapping = {
-- ['<C-j>'] = 'select_next',
-- ['<C-k>'] = 'select_prev',
-- ['<Tab>'] = 'confirm',
-- ['<C-Space>'] = 'trigger',
-- },
-- snippets = {
-- expand = function(args)
-- -- Optional: integrate with luasnip if you still use it
-- require('luasnip').lsp_expand(args.body)
-- end
-- }
-- }
-- })
local cmp = require('cmp')
local cmp_select = { behavior = cmp.SelectBehavior.Select }