1
0

Removed AI config , moved away from lspconfig, added roslyn lsp and folke/flash

This commit is contained in:
2025-12-10 15:36:29 +01:00
parent 1337963f72
commit 693aaa0c75
5 changed files with 68 additions and 103 deletions

View File

@@ -1,55 +1,2 @@
return {
"github/copilot.vim",
{
"nomnivore/ollama.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
},
cmd = { "Ollama", "OllamaModel", "OllamaServe", "OllamaServeStop" },
keys = {
{
"<leader>oo",
":<c-u>lua require('ollama').prompt()<cr>",
desc = "ollama prompt",
mode = { "n", "v" },
},
{
"<leader>oG",
":<c-u>lua require('ollama').prompt('Generate_Code')<cr>",
desc = "ollama Generate Code",
mode = { "n", "v" },
},
},
opts = {
model = "qwen2.5-coder"
},
},
{
"yetone/avante.nvim",
event = "VeryLazy",
version = false, -- Never set this value to "*"! Never!
opts = {
system_prompt = function()
local hub = require("mcphub").get_hub_instance()
return hub:get_active_servers_prompt()
end,
custom_tools = function()
return {
require("mcphub.extensions.avante").mcp_tool(),
}
end,
provider = "ollama",
ollama = {
model = "qwen2.5-coder"
}
},
dependencies = {
"nvim-treesitter/nvim-treesitter",
"stevearc/dressing.nvim",
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
}
}
}

View File

@@ -0,0 +1,12 @@
return {
"folke/flash.nvim",
event = "VeryLazy",
opts = {},
keys = {
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
{ "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
},
}

View File

@@ -114,8 +114,7 @@ return
require("luasnip.loaders.from_vscode").lazy_load()
-- Set up lspconfig.
local capabilities = require("cmp_nvim_lsp").default_capabilities()
local lsp = require("lspconfig")
local lsp = vim.lsp.config
local language_server = {
asm_lsp = true,
mojo = true,
@@ -133,7 +132,7 @@ return
},
clangd = {
capabilities = capabilities,
root_dir = require('lspconfig').util.root_pattern("compile_commands.json", "compile_flags.txt", ".git"),
root_dir = vim.fs.root(0, { 'compile_commands.json', 'compile_flags.txt', '.git' }), -- require("lspconfig").util.root_pattern("compile_commands.json", "compile_flags.txt", ".git"),
cmd = { "clangd" },
filetypes = { "c", "cpp", "objc", "objcpp" },
settings = {
@@ -172,7 +171,8 @@ return
config = {}
end
config = vim.tbl_deep_extend("force", {}, { capabilities = capabilities }, config)
lsp[name].setup({})
vim.lsp.config(name, config)
vim.lsp.enable(name)
end
vim.api.nvim_create_autocmd("LspAttach", {
callback = function(args)

View File

@@ -0,0 +1,6 @@
return {
"seblyng/roslyn.nvim",
config = function()
require("roslyn").setup()
end,
}