From 24babf0be916731a5095ec6bcb7de1daac6dc755 Mon Sep 17 00:00:00 2001 From: venus Date: Wed, 17 Jun 2026 11:33:28 -0500 Subject: [PATCH] working on adding shortcuts for telescope searching --- init.lua | 1 - lua/keybinds.lua | 6 ++++++ lua/plugins/lsp.lua | 27 ++++++++++++++++++++++++++- lua/plugins/treesitter.lua | 2 ++ 4 files changed, 34 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 8261e48..560cc1a 100644 --- a/init.lua +++ b/init.lua @@ -34,7 +34,6 @@ require("lazy").setup({ 'rcarriga/nvim-notify', -- notification manager { "m4xshen/hardtime.nvim", lazy = false, dependencies = { "MunifTanjim/nui.nvim" }}, --annoying { "nvzone/typr", dependencies = "nvzone/volt", cmd = { "Typr", "TyprStats" }, }, --typing practice - { 'nvim-telescope/telescope.nvim', tag = 'v0.2.0', dependencies = { 'nvim-lua/plenary.nvim', 'BurntSushi/ripgrep', 'sharkdp/fd' } }, -- fuzyfinding over lists { 'norcalli/nvim-colorizer.lua', config = function() require('colorizer').setup{"*"} end,}, -- preview colors { 'edluffy/hologram.nvim', auto_display = true,}, --image viewer { "denialofsandwich/sudo.nvim", dependencies = { "MunifTanjim/nui.nvim", },config = true, }, --write restricted files without restart diff --git a/lua/keybinds.lua b/lua/keybinds.lua index becb2c3..9b350cc 100644 --- a/lua/keybinds.lua +++ b/lua/keybinds.lua @@ -76,6 +76,12 @@ vim.keymap.set('n', 'gg' ,'Neogit' ,{ desc = 'open Neo[g]it vim.keymap.set('n', 'gc' ,'Neogit commit' ,{ desc = 'open Neogit [c]ommit page' }) +-- Telecope +-- local builtin = require('telescope.builtin') +-- vim.keymap.set('n', 'ff', builtin.find_files, { desc = 'Telescope find files' }) +-- vim.keymap.set('n', 'fg', builtin.live_grep, { desc = 'Telescope live grep' }) +-- vim.keymap.set('n', 'fb', builtin.buffers, { desc = 'Telescope buffers' }) +-- vim.keymap.set('n', 'fh', builtin.help_tags, { desc = 'Telescope help tags' }) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 72c93c7..983f227 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -26,7 +26,32 @@ return { -- adds lsp functionality and api for included languages dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-mini/mini.nvim' }, -- if you use the mini.nvim suite ---@module 'render-markdown' }, - } + config = function() + local lspconfig = require('lspconfig') + -- Since you are using blink.cmp, extract its capabilities + local capabilities = require('blink.cmp').get_lsp_capabilities() + + -- Configure OmniSharp for C# / nanoFramework development + lspconfig.omnisharp.setup({ + capabilities = capabilities, + cmd = { "omnisharp" }, + settings = { + FormattingOptions = { + EnableEditorConfigSupport = true, + }, + MsBuild = { + LoadProjectsOnDemand = false, + }, + }, + on_attach = function(client, bufnr) + local opts = { buffer = bufnr, remap = false } + vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts) + vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts) + vim.keymap.set("n", "ca", function() vim.lsp.buf.code_action() end, opts) + end, + }) + end + }, }, { "folke/lazydev.nvim", diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 78f6030..05bc99c 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -29,6 +29,8 @@ return { -- basic tree sitter parser support "xml", "yaml", "zsh", + "cmake", + "c_sharp", }, } }