Compare commits

..

10 Commits

Author SHA1 Message Date
venus
976501e9d8 added telescope keybinds 2026-06-17 11:43:30 -05:00
venus
69b825c35f moved telescope file 2026-06-17 11:34:15 -05:00
venus
24babf0be9 working on adding shortcuts for telescope searching 2026-06-17 11:33:28 -05:00
venus
552b3e1a79 Implemented chat and inline functionality with codecompanion!! 2026-06-06 01:56:41 -05:00
venus
b056fe2097 trying to get AI integration to work :( 2026-06-05 03:12:43 -05:00
venus
fdb7cc83d1 adding support for codecompanion! 2026-06-05 02:44:15 -05:00
venus
16e7916672 moved gitsigns out of lsp config 2026-06-02 01:37:32 -05:00
venus
bbed1e2083 added functionality to easily replay last command 2026-06-02 01:36:34 -05:00
venus
07940444c9 actually added keybind lol 2026-06-02 00:47:27 -05:00
venus
0e76ac466d added keybind to refresh current config page without restarting nvim 2026-06-02 00:45:28 -05:00
11 changed files with 213 additions and 65 deletions

View File

@@ -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

View File

@@ -3,14 +3,14 @@
"base16-nvim": { "branch": "master", "commit": "23e5128eb5f629c29532c24a1e733cbe019f05bb" },
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
"codecompanion.nvim": { "branch": "main", "commit": "6cbbcb4503430644f04ea5f087c8e2ea4cdc6f6e" },
"conform.nvim": { "branch": "master", "commit": "619363c30309d29ffa631e67c8183f2a72caa373" },
"dashboard-nvim": { "branch": "master", "commit": "f787e3462c2ee2b6117b17c1aa4ddf66cb6f57fe" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"distant.nvim": { "branch": "v0.3", "commit": "67d6b066e8490725718b79f643966f4eafc7da3c" },
"fd": { "branch": "master", "commit": "42b2ab8a84ddedf80eeed9079128c60161f64658" },
"fzf-lua": { "branch": "main", "commit": "fea9eedc6894c44d44cbb772a5cd11c93b82d7a1" },
"fd": { "branch": "master", "commit": "f7d4d717c287a7834f8721efc0fa91c51d92afee" },
"fzf-lua": { "branch": "main", "commit": "988416cc782dfe28bff3f0da9b8c943b236cd86a" },
"gemini-cli.nvim": { "branch": "main", "commit": "c9fd62adda823628f5131a939d9c56ef7a898600" },
"gitsigns.nvim": { "branch": "main", "commit": "dd3f588bacbeb041be6facf1742e42097f62165d" },
"gitsigns.nvim": { "branch": "main", "commit": "25050e4ed39e628282831d4cbecb1850454ce915" },
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
"hardtime.nvim": { "branch": "main", "commit": "b4e431934af1fe224a3a801f632c008278cb7628" },
"hex.nvim": { "branch": "master", "commit": "b46e63356a69e8d6f046c38a9708d55d17f15038" },
@@ -19,13 +19,14 @@
"inc-rename.nvim": { "branch": "main", "commit": "0074b551a17338ccdcd299bd86687cc651bcb33d" },
"jq.nvim": { "branch": "main", "commit": "70e12681b1026ba7c06c691fd815eed0e2244b81" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" },
"log-highlight.nvim": { "branch": "main", "commit": "b2e00cfd41ca94338265a595f3f3f423d9f9322e" },
"ltex-ls.nvim": { "branch": "main", "commit": "968eac261279d88d7f1ed556aa2dbc535a7489fe" },
"lualine.nvim": { "branch": "master", "commit": "131a558e13f9f28b15cd235557150ccb23f89286" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "7b01e2974a47d489bb92f47a41e4c0088ea8f86e" },
"mason.nvim": { "branch": "main", "commit": "bb639d4bf385a4d89f478b83af4d770be05ab7eb" },
"mini.nvim": { "branch": "main", "commit": "9d0b9b7188d5c24b5a87f0d8b383ec8bda7a0de4" },
"mini.pick": { "branch": "main", "commit": "26f94e9c84f529d713de00b900c0a307ca260f35" },
"lualine.nvim": { "branch": "master", "commit": "221ce6b2d999187044529f49da6554a92f740a96" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "0a695750d747db1e7e70bcf0267ef8951c95fc83" },
"mason.nvim": { "branch": "main", "commit": "16ba83bfc8a25f52bb545134f5bee082b195c460" },
"mini.nvim": { "branch": "main", "commit": "cbae4fa396bbf9c802b3d2dc2e9c5362e8fb9468" },
"mini.pick": { "branch": "main", "commit": "34fdef3b0966974378c4f39e3ddb54ffc628fbe9" },
"neogit": { "branch": "master", "commit": "99326a1310fb2d616b455d2fd16d01bf00682f06" },
"neoscroll.nvim": { "branch": "master", "commit": "c8d29979cb0cb3a2437a8e0ae683fd82f340d3b8" },
"nui-components.nvim": { "branch": "main", "commit": "1654dd709f13874089eefc80d82e0eb667f7fdfb" },
@@ -34,17 +35,18 @@
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
"nvim-dap": { "branch": "master", "commit": "531771530d4f82ad2d21e436e3cc052d68d7aebb" },
"nvim-java": { "branch": "main", "commit": "602a5f7fa92f9c1d425a2159133ff9de86842f0a" },
"nvim-lspconfig": { "branch": "master", "commit": "9573948c38bfabeec353ae7dd7d3ffec4c506a6b" },
"nvim-lspconfig": { "branch": "master", "commit": "229b79051b380377664edc4cbd534930154921a1" },
"nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" },
"nvim-tree.lua": { "branch": "master", "commit": "07f541fcaa4a5ae019598240362449ab7e9812b3" },
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
"nvim-web-devicons": { "branch": "master", "commit": "dfbfaa967a6f7ec50789bead7ef87e336c1fa63c" },
"obsidian.nvim": { "branch": "main", "commit": "d2349fdeb2c1e30cc2126fc6c7712f5103de8d15" },
"obsidian.nvim": { "branch": "main", "commit": "239af7e896d1857d0a644253d2c7e571d38529a5" },
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
"remote-nvim.nvim": { "branch": "main", "commit": "9992c2fb8bf4f11aca2c8be8db286b506f92efcb" },
"render-markdown.nvim": { "branch": "main", "commit": "5adf0895310c1904e5abfaad40a2baad7fe44a07" },
"resize.nvim": { "branch": "main", "commit": "0b8943ef2ce54e65b9e56974e94dee593b28e7b5" },
"ripgrep": { "branch": "master", "commit": "4857d6fa67db69a95cd4b6f2adda5d807d4d0119" },
"ripgrep": { "branch": "master", "commit": "48a6ad93f152dc848f1883ceb3bf2c7baab6738c" },
"snacks.nvim": { "branch": "main", "commit": "882c996cf28183f4d63640de0b4c02ec886d01f2" },
"spring-boot.nvim": { "branch": "main", "commit": "218c0c26c14d99feca778e4d13f5ec3e8b1b60f0" },
"sudo.nvim": { "branch": "main", "commit": "10c211716f0f0149ea91732bc12338ade76d4af8" },

View File

@@ -2,22 +2,20 @@
-- A library file with custom functions for cleaner code elsewhere
local C = {}
function C.runLastCommand()
-- TODO fix implementation
local term = require("toggleterm.terminal").get(1)-- Get terminal ID 1
-- Save position and buffer context
if term then
local original_window = vim.api.nvim_get_current_win()
local saved_view = vim.fn.winsaveview()
-- Using \r (carriage return) or \n\n often bypasses shell interceptors
-- term:send("clear\r")
term:send("test_dev.sh\r")
vim.api.nvim_set_current_win(original_window)
vim.fn.winrestview(saved_view)
else
vim.notify("Terminal 1 is not open yet!", vim.log.levels.WARN)
end
-- Return logic
function C.RunCommand(Command)
-- TODO IMplement an autocompiler function based on context
local tt = require("toggleterm")
local command = string.lower(Command)
if command == "l" or command == "last" then tt.exec("clear && fc -e -\r") end
if command == "c" or command == "compile" then tt.exec("clear && make\r") end
vim.defer_fn(function ()
vim.api.nvim_echo({
{ "▶ Terminal: ", "WarningMsg" },
{ "Running previous terminal command... ", "Normal" },
}, true, {})
end, 50)
return ""
end
return C

View File

@@ -1,6 +1,16 @@
--/lua/keybinds.lua
-- This file defines all of the kybinds for nvim.
-- vim.keymap.set('mode','<modifier>key','action', {desc = 'description'})
-- Add these lines at the very top of your keymaps file
vim.cmd('silent! unmapclear') -- Clears Normal, Visual, Select, and Operator-pending maps
vim.cmd('silent! cmapclear') -- Clears Command-line maps
vim.cmd('silent! imapclear') -- Clears Insert maps
vim.cmd('silent! tmapclear') -- Clears Terminal maps
-- ==========================================
-- Define your current keymaps below this line
-- ==========================================
vim.keymap.set('n', '<leader>w', ':w<CR>')
package.loaded["custom-functions"] = nil
local utils = require("custom-functions")
-- move betwwen buffer easier
@@ -16,12 +26,13 @@ vim.keymap.set('n','<M-Down>' ,"<cmd>lua require('resize').ResizeDown()<CR>")
vim.keymap.set('n','<Esc>' ,'<cmd>nohlsearch<CR>')
vim.keymap.set('t','<Esc><Esc>' ,'<C-\\><C-n>' ,{ desc = 'Exit terminal mode' })
vim.keymap.set('n','<leader>r' ,'<cmd>TermExec cmd="clear && make"<CR>' ,{ desc = '[r]un make in terminal' })
vim.keymap.set('n','<leader>l' ,function() utils.RunCommand("l") end ,{ desc = 'run [l]ast command in terminal' })
vim.keymap.set('n','<leader>n' ,'<cmd>ToggleTerm direction=vertical name=compile size=70<CR>', { desc = 'open a [n]ew terminal' })
vim.keymap.set('n','<leader>t' ,'<cmd>ToggleTerm<CR>' ,{desc = '[T]oggle all terminals'})
vim.keymap.set("n","<leader>e" ,"<cmd>NvimTreeToggle<CR>" ,{desc = 'open [E]xplorer'})
vim.keymap.set("n", "<leader>l" ,utils.runLastCommand ,{ desc = "Run [L]ast command in terminal 1" })
-- Diagnostic keymaps
vim.keymap.set('n', '<leader>q' ,vim.diagnostic.setloclist ,{ desc = 'Open diagnostic [Q]uickfix list' })
vim.keymap.set("n", "<leader>R" ,"<cmd>source %<Cr>:echo 'Config reloaded!'<CR>" ,{ desc = "[S]ource config file"})
-- Disable arrow keys in normal mode
vim.keymap.set('n','<left>' ,'<cmd>echo "Use h to move!!"<CR>')
@@ -45,12 +56,12 @@ vim.keymap.set("n","<C-S-k>" ,"<C-w>K" ,{ desc = "Move window to the upper
-- vim.keymap.set("n", "<leader>a", ":IncRename ", {desc = 'ren[A]me variable under cursor'})
-- PLUGIN KEYBINDS
-- gemini CLI bindngs
-- TODO better AI implementation
vim.keymap.set('n',"<leader>a/" ,"<cmd>Gemini toggle<cr>" ,{ desc = "Toggle Gemini CLI" })
vim.keymap.set('n',"<leader>aa" ,"<cmd>Gemini toggle<cr>" ,{ desc = "Toggle Gemini CLI" })
vim.keymap.set('n',"<leader>aq" ,"<cmd>Gemini ask<cr>" ,{ desc = "Ask Gemini", })
vim.keymap.set('n',"<leader>af" ,"<cmd>Gemini add_file<cr>" ,{ desc = "Add File"} )
vim.keymap.set({ "n", "v" } ,"<leader>aa" ,"<cmd>CodeCompanionActions<cr>" ,{ desc = "CodeCompanion - Actions" })
vim.keymap.set({ "n", "v" } ,"<leader>ac" ,"<cmd>CodeCompanionChat Toggle<cr>" ,{ desc = "CodeCompanion - Chat" })
vim.keymap.set({ "n", "v" } ,"<leader>ai" ,"<cmd>CodeCompanion<cr>" ,{ desc = "CodeCompanion - Inline" })
vim.keymap.set("v" ,"<leader>ad" ,"<cmd>CodeCompanionChat Add<cr>" ,{ desc = "CodeCompanion - Add to Chat" })
-- Expand 'cc' into 'CodeCompanion' in the command line
vim.cmd([[cab cc CodeCompanion]])
--spellcheck keybind to toggle on current buffer
vim.keymap.set('n',"<leader>ze" ,"<cmd>setlocal spell<cr>" ,{ desc = "enable spellecheck on buffer" })
@@ -65,6 +76,11 @@ vim.keymap.set('n', '<leader>gg' ,'<cmd>Neogit<cr>' ,{ desc = 'open Neo[g]it
vim.keymap.set('n', '<leader>gc' ,'<cmd>Neogit commit<cr>' ,{ desc = 'open Neogit [c]ommit page' })
-- Telecope
vim.keymap.set('n', '<leader>ff' ,'<cmd>Telescope find_files<cr>' ,{ desc = 'Telescope find files' })
vim.keymap.set('n', '<leader>fg' ,'<cmd>Telescope live_grep<cr>' ,{ desc = 'Telescope live grep' })
vim.keymap.set('n', '<leader>fb' ,'<cmd>Telescope buffers<cr>' ,{ desc = 'Telescope buffers' })
vim.keymap.set('n', '<leader>fh' ,'<cmd>Telescope help_tags<cr>' ,{ desc = 'Telescope help tags' })

View File

@@ -37,8 +37,8 @@ vim.o.updatetime = 250
-- Decrease mapped sequence wait time
vim.o.timeoutlen = 300
-- Configure how new splits should be opened
-- vim.o.splitright = false
-- vim.o.splitbelow = true
vim.o.splitright = true
vim.o.splitbelow = true
vim.o.list = true
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '' }
-- Preview substitutions live, as you type!

View File

@@ -0,0 +1,74 @@
return {
"olimorris/codecompanion.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
},
opts = {
display = {
chat = {
window = {
layout = "vertical",
width = 0.35,
height = 0.35,
},
keymaps = {
close = {
modes = {
n = "q", -- Bind "q" in normal mode to close the chat
},
index = 1,
callback = "keymaps.close",
description = "Close Chat",
},
}
},
},
interactions = {
chat = {
adapter = "gemini_pro", -- Removed the curly braces
},
inline = {
adapter = "gemini_flash", -- Removed the curly braces
},
},
background = {
adapter = "ollama_bg", -- Pointed this to the new extended adapter string
},
adapters = {
http = {
gemini_pro = function()
return require("codecompanion.adapters").extend("gemini", {
name = "gemini_pro",
schema = {
model = {
default = "gemini-3.5-flash",
},
},
})
end,
gemini_flash = function()
return require("codecompanion.adapters").extend("gemini", {
name = "gemini_flash",
schema = {
model = {
default = "gemini-2.0-flash",
},
},
})
end,
-- Added an extended Ollama adapter to fix your background task
ollama_bg = function()
return require("codecompanion.adapters").extend("ollama", {
name = "ollama_bg",
schema = {
model = {
default = "qwen-7b-instruct",
},
},
})
end,
},
},
}
}

12
lua/plugins/gitsigns.lua Normal file
View File

@@ -0,0 +1,12 @@
return { -- Adds git related signs to the gutter, as well as utilities for managing changes
'lewis6991/gitsigns.nvim',
opts = {
signs = {
add = { text = '+' },
change = { text = '~' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
},
},
}

View File

@@ -11,8 +11,8 @@ return { -- adds lsp functionality and api for included languages
{
keymap = {
preset = 'none',
['<CR>'] = { 'select_next', 'fallback' },
['<S-CR>'] = { 'select_prev', 'fallback' },
['<Down>'] = { 'select_next', 'fallback' },
['<Up>'] = { 'select_prev', 'fallback' },
['<Tab>'] = { 'accept', 'fallback' },
['<C-space>'] = { 'show', 'show_documentation', 'hide_documentation' },
},
@@ -26,26 +26,55 @@ 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'
},
{ -- Adds git related signs to the gutter, as well as utilities for managing changes
'lewis6991/gitsigns.nvim',
opts = {
signs = {
add = { text = '+' },
change = { text = '~' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
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", "<leader>ca", function() vim.lsp.buf.code_action() end, opts)
end,
})
end
},
}
},
{
'NMAC427/guess-indent.nvim',
config = function()
require('guess-indent').setup ({
filetype_exclude = {"lua"},
})
"folke/lazydev.nvim",
ft = "lua", -- only load on lua files
opts = {
library = {
-- Only load luvit types when the `vim.uv` word is found
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
-- always load the LazyVim library
"LazyVim",
-- Only load the lazyvim library when the `LazyVim` global is found
{ path = "LazyVim", words = { "LazyVim" } },
-- Load the wezterm types when the `wezterm` module is required
-- Needs `DrKJeff16/wezterm-types` to be installed
{ path = "wezterm-types", mods = { "wezterm" } },
-- Load the xmake types when opening file named `xmake.lua`
-- Needs `LelouchHe/xmake-luals-addon` to be installed
{ path = "xmake-luals-addon/library", files = { "xmake.lua" } },
},
-- disable when a .luarc.json file is found
enabled = function(root_dir)
return not vim.uv.fs_stat(root_dir .. "/.luarc.json")
end,
}, -- Detect tabstop and shiftwidth automatically
},
},
}

View File

@@ -1,7 +1,14 @@
return {
'chipsenkbeil/distant.nvim',
branch = 'v0.3',
"amitds1997/remote-nvim.nvim",
version = "*", -- Pin to GitHub releases for stability
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim",
"MunifTanjim/nui.nvim",
},
config = function()
require('distant'):setup()
require("remote-nvim").setup({
ssh_config_file_paths = { vim.fn.expand("$HOME/.ssh/config") },
})
end
}
}

View File

@@ -0,0 +1,9 @@
return {
'nvim-telescope/telescope.nvim', tag = 'v0.2.0',
dependencies = {
'nvim-lua/plenary.nvim',
'BurntSushi/ripgrep',
'sharkdp/fd'
}
}

View File

@@ -29,6 +29,8 @@ return { -- basic tree sitter parser support
"xml",
"yaml",
"zsh",
"cmake",
"c_sharp",
},
}
}