mirror of
				https://github.com/mitchell/dotfiles.git
				synced 2025-10-28 11:35:25 +00:00 
			
		
		
		
	Compare commits
	
		
			3 commits
		
	
	
		
			e511802ea3
			...
			73c5b0b7d7
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 73c5b0b7d7 | ||
|  | 1517f56c86 | ||
|  | 3179a5b48d | 
							
								
								
									
										9
									
								
								.config/fish/functions/adr.fish
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								.config/fish/functions/adr.fish
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,9 @@ | |||
| function adr --wraps aider | ||||
|     aider \ | ||||
|         --model gemini \ | ||||
|         --editor-model gpt-4.1-mini \ | ||||
|         --weak-model gpt-4.1-mini \ | ||||
|         --dark-mode \ | ||||
|         --completion-menu-bg-color '#1f1f28' \ | ||||
|         --vim $argv | ||||
| end | ||||
							
								
								
									
										10
									
								
								.config/fish/functions/aikeys.fish
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								.config/fish/functions/aikeys.fish
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,10 @@ | |||
| function aikeys -d 'Set AI API keys' -a service | ||||
|     switch $service | ||||
|         case gemini | ||||
|             echo "set -lx GEMINI_API_KEY (kp Keys/google-aistudio-key -a Password)" | ||||
|         case openai | ||||
|             echo "set -lx OPENAI_API_KEY (kp Keys/openai-general -a Password)" | ||||
|         case anthro | ||||
|             echo "set -lx ANTHROPIC_API_KEY (kp Keys/google-aistudio-key -a Password)" | ||||
|     end | ||||
| end | ||||
|  | @ -22,591 +22,16 @@ vim.g.mapleader = "," | |||
| require("lazy").setup({ | ||||
| 	install = { colorscheme = { "kanagawa" } }, | ||||
| 	spec = { | ||||
| 		-- UI and appearance | ||||
| 		"edkolev/tmuxline.vim", | ||||
| 		{ | ||||
| 			"rebelot/kanagawa.nvim", | ||||
| 			lazy = false, | ||||
| 			priority = 1000, | ||||
| 			opts = { | ||||
| 				transparent = not vim.g.neovide, | ||||
| 			}, | ||||
| 			init = function() | ||||
| 				vim.cmd([[colorscheme kanagawa]]) | ||||
| 			end, | ||||
| 		}, | ||||
| 		{ | ||||
| 			"akinsho/bufferline.nvim", | ||||
| 			event = "VeryLazy", | ||||
| 			version = "*", | ||||
| 			dependencies = { "nvim-tree/nvim-web-devicons" }, | ||||
| 			opts = { | ||||
| 				options = { | ||||
| 					separator_style = "slope", | ||||
| 					offsets = { | ||||
| 						{ | ||||
| 							filetype = "neo-tree", | ||||
| 							text = "explorer", | ||||
| 							highlight = "Directory", | ||||
| 							separator = true, | ||||
| 						}, | ||||
| 					}, | ||||
| 				}, | ||||
| 			}, | ||||
| 			keys = { | ||||
| 				{ "<leader>j", "<cmd>BufferLinePick<cr>", desc = "BufferLinePick", silent = true }, | ||||
| 				{ "<leader>J", "<cmd>BufferLinePickClose<cr>", desc = "BufferLinePickClose", silent = true }, | ||||
| 			}, | ||||
| 		}, | ||||
| 		{ | ||||
| 			"nvim-lualine/lualine.nvim", | ||||
| 			dependencies = { "nvim-tree/nvim-web-devicons" }, | ||||
| 			opts = { | ||||
| 				extensions = { | ||||
| 					"neo-tree", | ||||
| 					"symbols-outline", | ||||
| 				}, | ||||
| 			}, | ||||
| 		}, | ||||
| 		{ | ||||
| 			"rcarriga/nvim-notify", | ||||
| 			opts = { | ||||
| 				background_colour = "#000000", | ||||
| 			}, | ||||
| 		}, | ||||
| 		{ | ||||
| 			"folke/noice.nvim", | ||||
| 			event = "VeryLazy", | ||||
| 			dependencies = { "MunifTanjim/nui.nvim", "rcarriga/nvim-notify" }, | ||||
| 			opts = { | ||||
| 				lsp = { | ||||
| 					override = { | ||||
| 						["vim.lsp.util.convert_input_to_markdown_lines"] = true, | ||||
| 						["vim.lsp.util.stylize_markdown"] = true, | ||||
| 						["cmp.entry.get_documentation"] = true, | ||||
| 					}, | ||||
| 				}, | ||||
| 				presets = { | ||||
| 					bottom_search = true, | ||||
| 					command_palette = true, | ||||
| 					long_message_to_split = true, | ||||
| 				}, | ||||
| 				views = { | ||||
| 					notify = { | ||||
| 						replace = true, | ||||
| 						merge = true, | ||||
| 					}, | ||||
| 				}, | ||||
| 			}, | ||||
| 		}, | ||||
| 		{ | ||||
| 			"OXY2DEV/markview.nvim", | ||||
| 			lazy = false, | ||||
| 			dependencies = { "saghen/blink.cmp" }, | ||||
| 			opts = { | ||||
| 				preview = { | ||||
| 					icon_provider = "devicons", | ||||
| 					filetypes = { "markdown", "codecompanion" }, | ||||
| 					ignore_buftypes = {}, | ||||
| 				}, | ||||
| 			}, | ||||
| 		}, | ||||
| 
 | ||||
| 		-- Editor enhancements | ||||
| 		{ | ||||
| 			"w0rp/ale", | ||||
| 			event = "VeryLazy", | ||||
| 			keys = { | ||||
| 				{ "<leader>f", "<cmd>ALEFix<cr>", desc = "ALE Fix", silent = true }, | ||||
| 				{ "<leader>a", "<cmd>ALEToggle<cr>", desc = "ALE Toggle", silent = true }, | ||||
| 			}, | ||||
| 			config = function() | ||||
| 				vim.g.ale_linters_explicit = 1 | ||||
| 				vim.g.ale_completion_enabled = 0 -- Using blink.cmp for completion | ||||
| 
 | ||||
| 				vim.g.ale_linters = { | ||||
| 					javascript = { "eslint", "stylelint", "biome" }, | ||||
| 					typescript = { "eslint", "stylelint", "biome" }, | ||||
| 					javascriptreact = { "eslint", "stylelint", "biome" }, | ||||
| 					typescriptreact = { "eslint", "stylelint", "biome" }, | ||||
| 					svelte = { "eslint" }, | ||||
| 					go = { "golint", "go vet" }, | ||||
| 					vue = { "eslint", "stylelint", "biome" }, | ||||
| 					make = { "checkmake" }, | ||||
| 					proto = { "protoc-gen-lint" }, | ||||
| 					dockerfile = { "hadolint" }, | ||||
| 					dart = { "dartanalyzer" }, | ||||
| 					fish = { "fish" }, | ||||
| 					vim = { "vint" }, | ||||
| 					elixir = { "credo" }, | ||||
| 					cs = { "OmniSharp" }, | ||||
| 					terraform = { "tflint" }, | ||||
| 					ruby = { "rubocop" }, | ||||
| 					css = { "stylelint", "biome" }, | ||||
| 					sh = { "shellcheck" }, | ||||
| 					python = { "pylint" }, | ||||
| 				} | ||||
| 
 | ||||
| 				vim.g.ale_fixers = { | ||||
| 					go = { "goimports", "remove_trailing_lines", "trim_whitespace" }, | ||||
| 					graphql = { "prettier" }, | ||||
| 					javascript = { "prettier", "biome" }, | ||||
| 					typescript = { "prettier", "biome" }, | ||||
| 					javascriptreact = { "prettier", "biome" }, | ||||
| 					typescriptreact = { "prettier", "biome" }, | ||||
| 					svelte = { "prettier" }, | ||||
| 					vue = { "prettier", "biome" }, | ||||
| 					css = { "prettier", "biome" }, | ||||
| 					yaml = { "prettier", "biome" }, | ||||
| 					json = { "prettier", "biome" }, | ||||
| 					dart = { "dartfmt" }, | ||||
| 					html = { "prettier", "biome" }, | ||||
| 					markdown = { "prettier", "biome" }, | ||||
| 					make = { "remove_trailing_lines", "trim_whitespace" }, | ||||
| 					elixir = { "mix_format" }, | ||||
| 					terraform = { "terraform" }, | ||||
| 					ruby = { "rubocop" }, | ||||
| 					python = { "black" }, | ||||
| 					lua = { "stylua" }, | ||||
| 				} | ||||
| 			end, | ||||
| 		}, | ||||
| 		"tpope/vim-eunuch", | ||||
| 		"tpope/vim-surround", | ||||
| 		-- { "airblade/vim-gitgutter", lazy = false }, | ||||
| 		{ | ||||
| 			"echasnovski/mini.diff", | ||||
| 			version = false, | ||||
| 			lazy = false, | ||||
| 			opts = {}, | ||||
| 			keys = { | ||||
| 				{ | ||||
| 					"<leader>i", | ||||
| 					function() | ||||
| 						require("mini.diff").toggle_overlay() | ||||
| 					end, | ||||
| 					desc = "Mini.diff overlay", | ||||
| 					silent = true, | ||||
| 				}, | ||||
| 			}, | ||||
| 		}, | ||||
| 		{ | ||||
| 			"reedes/vim-pencil", | ||||
| 			cmd = { "HardPencil", "SoftPencil" }, | ||||
| 			config = function() | ||||
| 				vim.g["pencil#map#suspend_af"] = "K" -- Use bracket notation for '#' | ||||
| 			end, | ||||
| 		}, | ||||
| 		{ | ||||
| 			"tpope/vim-fugitive", | ||||
| 			cmd = { "G", "Git" }, | ||||
| 			ft = "gitcommit", | ||||
| 		}, | ||||
| 		{ | ||||
| 			"folke/zen-mode.nvim", | ||||
| 			opts = { | ||||
| 				window = { | ||||
| 					backdrop = 0.95, | ||||
| 				}, | ||||
| 				plugins = { | ||||
| 					twilight = { enabled = false }, | ||||
| 				}, | ||||
| 			}, | ||||
| 			keys = { | ||||
| 				{ "<leader>z", "<cmd>ZenMode<cr>", desc = "Zen Mode", silent = true }, | ||||
| 			}, | ||||
| 		}, | ||||
| 		{ | ||||
| 			"folke/twilight.nvim", | ||||
| 			opts = {}, | ||||
| 			keys = { | ||||
| 				{ "<leader>l", "<cmd>Twilight<cr>", desc = "Twilight", silent = true }, | ||||
| 			}, | ||||
| 		}, | ||||
| 
 | ||||
| 		-- Completion and LSP | ||||
| 		{ | ||||
| 			"saghen/blink.cmp", | ||||
| 			dependencies = { "rafamadriz/friendly-snippets" }, | ||||
| 			version = "1.*", | ||||
| 			---@module 'blink.cmp' | ||||
| 			---@type blink.cmp.Config | ||||
| 			opts = {}, | ||||
| 			opts_extend = { "sources.default" }, | ||||
| 		}, | ||||
| 		{ | ||||
| 			"neovim/nvim-lspconfig", | ||||
| 			dependencies = { "saghen/blink.cmp" }, | ||||
| 		}, | ||||
| 		{ | ||||
| 			"pmizio/typescript-tools.nvim", | ||||
| 			dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" }, | ||||
| 		}, | ||||
| 
 | ||||
| 		-- Navigation and search | ||||
| 		{ | ||||
| 			"nvim-neo-tree/neo-tree.nvim", | ||||
| 			branch = "v3.x", | ||||
| 			dependencies = { | ||||
| 				"nvim-lua/plenary.nvim", | ||||
| 				"nvim-tree/nvim-web-devicons", | ||||
| 				"MunifTanjim/nui.nvim", | ||||
| 			}, | ||||
| 			lazy = false, -- neo-tree will lazily load itself | ||||
| 			---@module "neo-tree" | ||||
| 			---@type neotree.Config? | ||||
| 			opts = {}, | ||||
| 			keys = { | ||||
| 				{ | ||||
| 					"<leader>nn", | ||||
| 					"<cmd>Neotree toggle reveal_force_cwd<cr>", | ||||
| 					desc = "Neo-tree Toggle Sidebar", | ||||
| 					silent = true, | ||||
| 				}, | ||||
| 				{ | ||||
| 					"<leader>nf", | ||||
| 					"<cmd>Neotree float reveal_force_cwd<cr>", | ||||
| 					desc = "Neo-tree Float", | ||||
| 					silent = true, | ||||
| 				}, | ||||
| 			}, | ||||
| 		}, | ||||
| 		{ | ||||
| 			"nvim-telescope/telescope.nvim", | ||||
| 			dependencies = { | ||||
| 				"nvim-lua/plenary.nvim", | ||||
| 				"nvim-tree/nvim-web-devicons", | ||||
| 			}, | ||||
| 			opts = {}, | ||||
| 			keys = { | ||||
| 				{ "<leader>t", "<cmd>Telescope<cr>", desc = "Telescope", silent = true }, | ||||
| 				{ "<leader>p", "<cmd>Telescope git_files<cr>", desc = "Telescope Git Files", silent = true }, | ||||
| 				{ "<C-p>", "<cmd>Telescope find_files<cr>", desc = "Telescope Find Files", silent = true }, | ||||
| 				-- Note: 's' is used by flash.nvim, this mapping shadows the default 's' jump. | ||||
| 				-- You might want to change this leader mapping if you use flash jump often. | ||||
| 				{ "<leader>s", "<cmd>Telescope treesitter<cr>", desc = "Telescope Treesitter", silent = true }, | ||||
| 				{ "<leader>gs", "<cmd>Telescope grep_string<cr>", desc = "Telescope Grep String", silent = true }, | ||||
| 				{ "<leader>gl", "<cmd>Telescope live_grep<cr>", desc = "Telescope Grep String", silent = true }, | ||||
| 				{ "<leader>gg", "<cmd>Telescope lsp_definitions<cr>", desc = "LSP Definitions", silent = true }, | ||||
| 				{ "<leader>gr", "<cmd>Telescope lsp_references<cr>", desc = "LSP References", silent = true }, | ||||
| 				{ "<leader>gi", "<cmd>Telescope lsp_implementations<cr>", desc = "LSP Implementations", silent = true }, | ||||
| 				{ | ||||
| 					"<leader>gd", | ||||
| 					"<cmd>Telescope lsp_type_definitions<cr>", | ||||
| 					desc = "LSP Type Definitions", | ||||
| 					silent = true, | ||||
| 				}, | ||||
| 			}, | ||||
| 		}, | ||||
| 		{ | ||||
| 			"nvim-telescope/telescope-fzf-native.nvim", | ||||
| 			build = "make", | ||||
| 			dependencies = { | ||||
| 				"nvim-telescope/telescope.nvim", | ||||
| 			}, | ||||
| 			config = function() | ||||
| 				require("telescope").load_extension("fzf") | ||||
| 			end, | ||||
| 		}, | ||||
| 		{ | ||||
| 			"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", | ||||
| 				}, | ||||
| 			}, | ||||
| 		}, | ||||
| 
 | ||||
| 		-- Treesitter | ||||
| 		{ | ||||
| 			"nvim-treesitter/nvim-treesitter", | ||||
| 			build = ":TSUpdate", | ||||
| 			opts = { | ||||
| 				ensure_installed = { | ||||
| 					"c", | ||||
| 					"cpp", | ||||
| 					"lua", | ||||
| 					"vim", | ||||
| 					"regex", | ||||
| 					"bash", | ||||
| 					"fish", | ||||
| 					"typescript", | ||||
| 					"javascript", | ||||
| 					"tsx", | ||||
| 					"go", | ||||
| 					"elixir", | ||||
| 					"vue", | ||||
| 					"groovy", | ||||
| 					"java", | ||||
| 					"objc", | ||||
| 					"swift", | ||||
| 					"hcl", | ||||
| 					"terraform", | ||||
| 					"yaml", | ||||
| 					"json", | ||||
| 					"markdown", | ||||
| 					"markdown_inline", | ||||
| 				}, | ||||
| 				auto_install = false, | ||||
| 				highlight = { | ||||
| 					enable = true, | ||||
| 					additional_vim_regex_highlighting = false, | ||||
| 				}, | ||||
| 				incremental_selection = { | ||||
| 					enable = true, | ||||
| 					keymaps = { | ||||
| 						init_selection = "gnn", | ||||
| 						node_incremental = "grn", | ||||
| 						scope_incremental = "grc", | ||||
| 						node_decremental = "grm", | ||||
| 					}, | ||||
| 				}, | ||||
| 				indent = { | ||||
| 					enable = true, | ||||
| 				}, | ||||
| 			}, | ||||
| 			init = function() | ||||
| 				vim.opt.foldmethod = "expr" | ||||
| 				vim.opt.foldexpr = "nvim_treesitter#foldexpr()" | ||||
| 				vim.opt.foldenable = false | ||||
| 			end, | ||||
| 			config = function(plugin, opts) | ||||
| 				require("nvim-treesitter.configs").setup(opts) | ||||
| 			end, | ||||
| 		}, | ||||
| 
 | ||||
| 		-- CodeCompanion | ||||
| 		{ | ||||
| 			"olimorris/codecompanion.nvim", | ||||
| 			dependencies = { "nvim-lua/plenary.nvim", "nvim-treesitter/nvim-treesitter", "echasnovski/mini.diff" }, | ||||
| 			opts = { | ||||
| 				display = { diff = { provider = "mini_diff" }, chat = { show_settings = true } }, | ||||
| 				strategies = { | ||||
| 					chat = { adapter = "gemini_deep" }, | ||||
| 					inline = { adapter = "gemini" }, | ||||
| 					cmd = { adapter = "gemini" }, | ||||
| 				}, | ||||
| 				adapters = { | ||||
| 					anthro = function() | ||||
| 						return require("codecompanion.adapters").extend("anthropic", { | ||||
| 							schema = { | ||||
| 								model = { default = "claude-3-5-haiku-20241022" }, | ||||
| 							}, | ||||
| 						}) | ||||
| 					end, | ||||
| 					anthro_deep = function() | ||||
| 						return require("codecompanion.adapters").extend("anthropic", { | ||||
| 							schema = { | ||||
| 								model = { default = "claude-3-7-sonnet-20250219" }, | ||||
| 							}, | ||||
| 						}) | ||||
| 					end, | ||||
| 					gemini = function() | ||||
| 						return require("codecompanion.adapters").extend("gemini", { | ||||
| 							schema = { | ||||
| 								model = { default = "gemini-2.5-flash-preview-04-17" }, | ||||
| 							}, | ||||
| 						}) | ||||
| 					end, | ||||
| 					gemini_deep = function() | ||||
| 						return require("codecompanion.adapters").extend("gemini", { | ||||
| 							schema = { | ||||
| 								model = { default = "gemini-2.5-pro-preview-05-06" }, | ||||
| 							}, | ||||
| 						}) | ||||
| 					end, | ||||
| 					ollama = function() | ||||
| 						return require("codecompanion.adapters").extend("ollama", { | ||||
| 							env = { | ||||
| 								url = "http://scimitar.lan:11434", | ||||
| 							}, | ||||
| 							schema = { | ||||
| 								model = { default = "deepseek-r1:7b" }, | ||||
| 								num_ctx = { default = 8192 }, | ||||
| 							}, | ||||
| 						}) | ||||
| 					end, | ||||
| 				}, | ||||
| 			}, | ||||
| 			keys = { | ||||
| 				{ "<leader>c", "<cmd>CodeCompanionChat<cr>", desc = "CodeCompanion Chat", silent = true }, | ||||
| 			}, | ||||
| 		}, | ||||
| 		{ import = "plugins.ui" }, | ||||
| 		{ import = "plugins.editor" }, | ||||
| 		{ import = "plugins.lsp_completion" }, | ||||
| 		{ import = "plugins.navigation" }, | ||||
| 		{ import = "plugins.treesitter" }, | ||||
| 		{ import = "plugins.tools" }, | ||||
| 	}, | ||||
| }) | ||||
| 
 | ||||
| -- General settings | ||||
| vim.opt.guifont = "JetBrainsMono Nerd Font:h13" | ||||
| vim.opt.colorcolumn = "100" | ||||
| vim.opt.cursorline = true | ||||
| vim.opt.showmatch = true | ||||
| vim.opt.number = true | ||||
| vim.opt.showmode = false | ||||
| vim.opt.background = "dark" | ||||
| vim.opt.wrap = false | ||||
| vim.opt.cmdheight = 1 | ||||
| vim.opt.shortmess:append("c") | ||||
| vim.opt.termguicolors = true | ||||
| vim.opt.foldenable = false | ||||
| vim.opt.mouse = "a" | ||||
| vim.opt.mousemodel = "extend" | ||||
| vim.opt.tabstop = 2 | ||||
| vim.opt.shiftwidth = 0 | ||||
| vim.opt.expandtab = true | ||||
| vim.opt.textwidth = 100 | ||||
| vim.opt.hlsearch = true | ||||
| vim.opt.ignorecase = true | ||||
| vim.opt.smartcase = true | ||||
| 
 | ||||
| -- Key Mappings | ||||
| local map = vim.keymap.set | ||||
| local map_opts_silent = { noremap = true, silent = true } | ||||
| 
 | ||||
| -- General Mappings | ||||
| map("i", "jj", "<Esc>", { noremap = true, silent = true, desc = "Escape Insert Mode" }) | ||||
| map("t", "<Esc>", "<C-\\><C-n>", { noremap = true, silent = true, desc = "Escape Terminal Mode" }) | ||||
| map("v", "//", function() | ||||
| 	vim.cmd("normal! y") | ||||
| 	local sel = vim.fn.getreg('"') | ||||
| 	local pattern = vim.fn.escape(sel, "/\\") | ||||
| 	vim.fn.setreg("/", "\\V" .. pattern) | ||||
| 	vim.cmd("normal! n") | ||||
| end, { noremap = true, silent = true, desc = "Search for Visual Selection" }) | ||||
| 
 | ||||
| -- Neovide GUI Settings | ||||
| if vim.g.neovide then | ||||
| 	vim.g.neovide_scale_factor = 0.75 | ||||
| 	vim.g.neovide_transparency = 0.7 | ||||
| 	vim.g.neovide_cursor_vfx_mode = "sonicboom" | ||||
| end | ||||
| 
 | ||||
| -- Autocommands | ||||
| local augroup = vim.api.nvim_create_augroup | ||||
| local autocmd = vim.api.nvim_create_autocmd | ||||
| 
 | ||||
| -- Fish filetype settings | ||||
| augroup("FishSettings", { clear = true }) | ||||
| autocmd("FileType", { | ||||
| 	pattern = "fish", | ||||
| 	command = "setlocal tabstop=4", | ||||
| 	group = "FishSettings", | ||||
| }) | ||||
| 
 | ||||
| -- Terminal settings | ||||
| augroup("TerminalSettings", { clear = true }) | ||||
| autocmd("TermOpen", { | ||||
| 	pattern = "*", | ||||
| 	command = "setlocal nonumber norelativenumber", | ||||
| 	group = "TerminalSettings", | ||||
| }) | ||||
| 
 | ||||
| -- LSP Mappings | ||||
| local opts = { silent = true } | ||||
| vim.keymap.set("n", "<leader>d", vim.diagnostic.open_float, opts) | ||||
| vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) | ||||
| vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts) | ||||
| vim.keymap.set("n", "<space>q", vim.diagnostic.setloclist, opts) | ||||
| 
 | ||||
| -- Use an on_attach function to only map the following keys | ||||
| -- after the language server attaches to the current buffer | ||||
| local on_attach = function(client, bufnr) | ||||
| 	vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc") | ||||
| 
 | ||||
| 	local bufopts = { silent = true, buffer = bufnr } | ||||
| 	vim.keymap.set("n", "<leader>h", vim.lsp.buf.hover, bufopts) | ||||
| 	vim.keymap.set("n", "<C-k>", vim.lsp.buf.signature_help, bufopts) | ||||
| 	vim.keymap.set("n", "<leader>wa", vim.lsp.buf.add_workspace_folder, bufopts) | ||||
| 	vim.keymap.set("n", "<leader>wr", vim.lsp.buf.remove_workspace_folder, bufopts) | ||||
| 	vim.keymap.set("n", "<leader>wl", function() | ||||
| 		print(vim.inspect(vim.lsp.buf.list_workspace_folders())) | ||||
| 	end, bufopts) | ||||
| 	vim.keymap.set("n", "<leader>m", vim.lsp.buf.code_action, bufopts) | ||||
| 	vim.keymap.set("n", "<leader>r", vim.lsp.buf.rename, bufopts) | ||||
| 	vim.keymap.set("n", "<leader>F", function() | ||||
| 		vim.lsp.buf.format({ async = true }) | ||||
| 	end, bufopts) | ||||
| end | ||||
| 
 | ||||
| -- LSP Setup | ||||
| local lspconfig = require("lspconfig") | ||||
| local capabilities = require("blink.cmp").get_lsp_capabilities() | ||||
| 
 | ||||
| local lsp_flags = { debounce_text_changes = 150 } | ||||
| 
 | ||||
| -- Unused for now | ||||
| local vue_plugin_location = vim.fn.expand("$HOME/.bun/install/global/node_modules/@vue/typescript-plugin") | ||||
| 
 | ||||
| vim.lsp.config("ts_ls", { | ||||
| 	on_attach = on_attach, | ||||
| 	flags = lsp_flags, | ||||
| 	capabilities = capabilities, | ||||
| 	filetypes = { | ||||
| 		"javascript", | ||||
| 		"typescript", | ||||
| 		"javascriptreact", | ||||
| 		"typescriptreact", | ||||
| 		"vue", | ||||
| 	}, | ||||
| 	init_options = { | ||||
| 		plugins = { | ||||
| 			{ | ||||
| 				name = "@vue/typescript-plugin", | ||||
| 				location = vue_plugin_location, | ||||
| 				languages = { "javascript", "typescript", "vue" }, | ||||
| 			}, | ||||
| 		}, | ||||
| 	}, | ||||
| }) | ||||
| 
 | ||||
| vim.lsp.enable("ts_ls") | ||||
| 
 | ||||
| require("lspconfig").volar.setup({}) | ||||
| 
 | ||||
| local servers = { "elixirls", "gopls", "pylsp", "svelte" } | ||||
| for _, lsp in ipairs(servers) do | ||||
| 	vim.lsp.config(lsp, { | ||||
| 		on_attach = on_attach, | ||||
| 		flags = lsp_flags, | ||||
| 		capabilities = capabilities, | ||||
| 	}) | ||||
| 	vim.lsp.enable(lsp) | ||||
| end | ||||
| -- Load core configurations | ||||
| require("core.options") | ||||
| require("core.keymaps") | ||||
| require("core.autocmds") | ||||
|  |  | |||
							
								
								
									
										30
									
								
								.config/nvim/lazy-lock.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								.config/nvim/lazy-lock.json
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,30 @@ | |||
| { | ||||
|   "ale": { "branch": "master", "commit": "5098dfd27edf2b38e5af284f6f440d24cf806b53" }, | ||||
|   "blink.cmp": { "branch": "main", "commit": "022521a8910a5543b0251b21c9e1a1e989745796" }, | ||||
|   "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, | ||||
|   "codecompanion.nvim": { "branch": "main", "commit": "0beb9183954ae1afa2e1f5a91812706764d1a743" }, | ||||
|   "flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" }, | ||||
|   "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, | ||||
|   "kanagawa.nvim": { "branch": "master", "commit": "4de88d695634a8776c687af8e7436cfa074aa0c0" }, | ||||
|   "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, | ||||
|   "lualine.nvim": { "branch": "master", "commit": "15884cee63a8c205334ab13ab1c891cd4d27101a" }, | ||||
|   "markview.nvim": { "branch": "main", "commit": "23f8bda5a172287c3423a3ffe7640efefa52a48b" }, | ||||
|   "mini.diff": { "branch": "main", "commit": "ec8a5ae365c5d15920721ea42b1351dbc9e61f2d" }, | ||||
|   "neo-tree.nvim": { "branch": "v3.x", "commit": "f481de16a0eb59c985abac8985e3f2e2f75b4875" }, | ||||
|   "noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" }, | ||||
|   "nui.nvim": { "branch": "main", "commit": "f535005e6ad1016383f24e39559833759453564e" }, | ||||
|   "nvim-lspconfig": { "branch": "master", "commit": "ac1dfbe3b60e5e23a2cff90e3bd6a3bc88031a57" }, | ||||
|   "nvim-notify": { "branch": "master", "commit": "b5825cf9ee881dd8e43309c93374ed5b87b7a896" }, | ||||
|   "nvim-treesitter": { "branch": "master", "commit": "066fd6505377e3fd4aa219e61ce94c2b8bdb0b79" }, | ||||
|   "nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" }, | ||||
|   "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, | ||||
|   "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, | ||||
|   "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, | ||||
|   "tmuxline.vim": { "branch": "master", "commit": "4119c553923212cc67f4e135e6f946dc3ec0a4d6" }, | ||||
|   "twilight.nvim": { "branch": "main", "commit": "1584c0b0a979b71fd86b18d302ba84e9aba85b1b" }, | ||||
|   "vim-eunuch": { "branch": "master", "commit": "e86bb794a1c10a2edac130feb0ea590a00d03f1e" }, | ||||
|   "vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" }, | ||||
|   "vim-pencil": { "branch": "master", "commit": "6d70438a8886eaf933c38a7a43a61adb0a7815ed" }, | ||||
|   "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, | ||||
|   "zen-mode.nvim": { "branch": "main", "commit": "863f150ca321b3dd8aa1a2b69b5f411a220e144f" } | ||||
| } | ||||
							
								
								
									
										20
									
								
								.config/nvim/lua/core/autocmds.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								.config/nvim/lua/core/autocmds.lua
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,20 @@ | |||
| -- lua/core/autocmds.lua | ||||
| 
 | ||||
| local augroup = vim.api.nvim_create_augroup | ||||
| local autocmd = vim.api.nvim_create_autocmd | ||||
| 
 | ||||
| -- Fish filetype settings | ||||
| augroup("FishSettings", { clear = true }) | ||||
| autocmd("FileType", { | ||||
| 	pattern = "fish", | ||||
| 	command = "setlocal tabstop=4", | ||||
| 	group = "FishSettings", | ||||
| }) | ||||
| 
 | ||||
| -- Terminal settings | ||||
| augroup("TerminalSettings", { clear = true }) | ||||
| autocmd("TermOpen", { | ||||
| 	pattern = "*", | ||||
| 	command = "setlocal nonumber norelativenumber", | ||||
| 	group = "TerminalSettings", | ||||
| }) | ||||
							
								
								
									
										22
									
								
								.config/nvim/lua/core/keymaps.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								.config/nvim/lua/core/keymaps.lua
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,22 @@ | |||
| -- lua/core/keymaps.lua | ||||
| 
 | ||||
| local map = vim.keymap.set | ||||
| local map_opts_silent = { noremap = true, silent = true } | ||||
| 
 | ||||
| -- General Mappings | ||||
| map("i", "jj", "<Esc>", { noremap = true, silent = true, desc = "Escape Insert Mode" }) | ||||
| map("t", "<Esc>", "<C-\\><C-n>", { noremap = true, silent = true, desc = "Escape Terminal Mode" }) | ||||
| map("v", "//", function() | ||||
| 	vim.cmd("normal! y") | ||||
| 	local sel = vim.fn.getreg('"') | ||||
| 	local pattern = vim.fn.escape(sel, "/\\") | ||||
| 	vim.fn.setreg("/", "\\V" .. pattern) | ||||
| 	vim.cmd("normal! n") | ||||
| end, { noremap = true, silent = true, desc = "Search for Visual Selection" }) | ||||
| 
 | ||||
| -- LSP Diagnostic Mappings | ||||
| local diag_opts = { silent = true } | ||||
| vim.keymap.set("n", "<leader>d", vim.diagnostic.open_float, diag_opts) | ||||
| vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, diag_opts) | ||||
| vim.keymap.set("n", "]d", vim.diagnostic.goto_next, diag_opts) | ||||
| vim.keymap.set("n", "<space>q", vim.diagnostic.setloclist, diag_opts) | ||||
							
								
								
									
										28
									
								
								.config/nvim/lua/core/options.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								.config/nvim/lua/core/options.lua
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,28 @@ | |||
| -- lua/core/options.lua | ||||
| 
 | ||||
| vim.opt.guifont = "JetBrainsMono Nerd Font:h13" | ||||
| vim.opt.colorcolumn = "100" | ||||
| vim.opt.cursorline = true | ||||
| vim.opt.showmatch = true | ||||
| vim.opt.number = true | ||||
| vim.opt.showmode = false | ||||
| vim.opt.background = "dark" | ||||
| vim.opt.wrap = false | ||||
| vim.opt.cmdheight = 1 | ||||
| vim.opt.shortmess:append("c") | ||||
| vim.opt.termguicolors = true | ||||
| vim.opt.mouse = "a" | ||||
| vim.opt.mousemodel = "extend" | ||||
| vim.opt.tabstop = 2 | ||||
| vim.opt.shiftwidth = 0 | ||||
| vim.opt.expandtab = true | ||||
| vim.opt.textwidth = 100 | ||||
| vim.opt.hlsearch = true | ||||
| vim.opt.ignorecase = true | ||||
| vim.opt.smartcase = true | ||||
| 
 | ||||
| if vim.g.neovide then | ||||
| 	vim.g.neovide_scale_factor = 0.75 | ||||
| 	vim.g.neovide_transparency = 0.7 | ||||
| 	vim.g.neovide_cursor_vfx_mode = "sonicboom" | ||||
| end | ||||
							
								
								
									
										105
									
								
								.config/nvim/lua/plugins/editor.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										105
									
								
								.config/nvim/lua/plugins/editor.lua
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,105 @@ | |||
| -- lua/plugins/editor.lua | ||||
| 
 | ||||
| return { | ||||
| 	"tpope/vim-fugitive", | ||||
| 	"tpope/vim-eunuch", | ||||
| 	"tpope/vim-surround", | ||||
| 	{ | ||||
| 		"w0rp/ale", | ||||
| 		event = "VeryLazy", | ||||
| 		keys = { | ||||
| 			{ "<leader>f", "<cmd>ALEFix<cr>", desc = "ALE Fix", silent = true }, | ||||
| 			{ "<leader>a", "<cmd>ALEToggle<cr>", desc = "ALE Toggle", silent = true }, | ||||
| 		}, | ||||
| 		config = function() | ||||
| 			vim.g.ale_linters_explicit = 1 | ||||
| 			vim.g.ale_completion_enabled = 0 -- Using blink.cmp for completion | ||||
| 
 | ||||
| 			vim.g.ale_linters = { | ||||
| 				javascript = { "eslint", "stylelint", "biome" }, | ||||
| 				typescript = { "eslint", "stylelint", "biome" }, | ||||
| 				javascriptreact = { "eslint", "stylelint", "biome" }, | ||||
| 				typescriptreact = { "eslint", "stylelint", "biome" }, | ||||
| 				svelte = { "eslint" }, | ||||
| 				go = { "golint", "go vet" }, | ||||
| 				vue = { "eslint", "stylelint", "biome" }, | ||||
| 				make = { "checkmake" }, | ||||
| 				proto = { "protoc-gen-lint" }, | ||||
| 				dockerfile = { "hadolint" }, | ||||
| 				dart = { "dartanalyzer" }, | ||||
| 				fish = { "fish" }, | ||||
| 				vim = { "vint" }, | ||||
| 				elixir = { "credo" }, | ||||
| 				cs = { "OmniSharp" }, | ||||
| 				terraform = { "tflint" }, | ||||
| 				ruby = { "rubocop" }, | ||||
| 				css = { "stylelint", "biome" }, | ||||
| 				sh = { "shellcheck" }, | ||||
| 				python = { "pylint" }, | ||||
| 			} | ||||
| 
 | ||||
| 			vim.g.ale_fixers = { | ||||
| 				go = { "goimports", "remove_trailing_lines", "trim_whitespace" }, | ||||
| 				graphql = { "prettier" }, | ||||
| 				javascript = { "prettier", "biome" }, | ||||
| 				typescript = { "prettier", "biome" }, | ||||
| 				javascriptreact = { "prettier", "biome" }, | ||||
| 				typescriptreact = { "prettier", "biome" }, | ||||
| 				svelte = { "prettier" }, | ||||
| 				vue = { "prettier", "biome" }, | ||||
| 				css = { "prettier", "biome" }, | ||||
| 				yaml = { "prettier", "biome" }, | ||||
| 				json = { "prettier", "biome" }, | ||||
| 				dart = { "dartfmt" }, | ||||
| 				html = { "prettier", "biome" }, | ||||
| 				markdown = { "prettier", "biome" }, | ||||
| 				make = { "remove_trailing_lines", "trim_whitespace" }, | ||||
| 				elixir = { "mix_format" }, | ||||
| 				terraform = { "terraform" }, | ||||
| 				ruby = { "rubocop" }, | ||||
| 				python = { "black" }, | ||||
| 				lua = { "stylua" }, | ||||
| 			} | ||||
| 		end, | ||||
| 	}, | ||||
| 	{ | ||||
| 		"echasnovski/mini.diff", | ||||
| 		version = false, | ||||
| 		lazy = false, | ||||
| 		opts = {}, | ||||
| 		keys = { | ||||
| 			{ | ||||
| 				"<leader>i", | ||||
| 				function() | ||||
| 					require("mini.diff").toggle_overlay() | ||||
| 				end, | ||||
| 				desc = "Mini.diff overlay", | ||||
| 				silent = true, | ||||
| 			}, | ||||
| 		}, | ||||
| 	}, | ||||
| 	{ | ||||
| 		"reedes/vim-pencil", | ||||
| 		cmd = { "HardPencil", "SoftPencil" }, | ||||
| 		config = function() | ||||
| 			vim.g["pencil#map#suspend_af"] = "K" | ||||
| 		end, | ||||
| 	}, | ||||
| 	{ | ||||
| 		"folke/zen-mode.nvim", | ||||
| 		opts = { | ||||
| 			window = { backdrop = 0.95, options = { number = false } }, | ||||
| 			plugins = { twilight = { enabled = false } }, | ||||
| 		}, | ||||
| 		keys = { | ||||
| 			{ "<leader>z", "<cmd>ZenMode<cr>", desc = "Zen Mode", silent = true }, | ||||
| 		}, | ||||
| 	}, | ||||
| 	{ | ||||
| 		"folke/twilight.nvim", | ||||
| 		opts = {}, | ||||
| 		keys = { | ||||
| 			{ "<leader>l", "<cmd>Twilight<cr>", desc = "Twilight", silent = true }, | ||||
| 		}, | ||||
| 	}, | ||||
| } | ||||
							
								
								
									
										70
									
								
								.config/nvim/lua/plugins/lsp_completion.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										70
									
								
								.config/nvim/lua/plugins/lsp_completion.lua
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,70 @@ | |||
| -- lua/plugins/lsp_completion.lua | ||||
| 
 | ||||
| return { | ||||
| 	{ | ||||
| 		"saghen/blink.cmp", | ||||
| 		dependencies = { "rafamadriz/friendly-snippets" }, | ||||
| 		version = "1.*", | ||||
| 		opts = {}, | ||||
| 		opts_extend = { "sources.default" }, | ||||
| 	}, | ||||
| 	{ | ||||
| 		"neovim/nvim-lspconfig", | ||||
| 		dependencies = { "saghen/blink.cmp" }, | ||||
| 		config = function() | ||||
| 			local on_attach = function(client, bufnr) | ||||
| 				vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc") | ||||
| 				local bufopts = { silent = true, buffer = bufnr } | ||||
| 				vim.keymap.set("n", "<leader>h", vim.lsp.buf.hover, bufopts) | ||||
| 				vim.keymap.set("n", "<C-k>", vim.lsp.buf.signature_help, bufopts) | ||||
| 				vim.keymap.set("n", "<leader>wa", vim.lsp.buf.add_workspace_folder, bufopts) | ||||
| 				vim.keymap.set("n", "<leader>wr", vim.lsp.buf.remove_workspace_folder, bufopts) | ||||
| 				vim.keymap.set("n", "<leader>wl", function() | ||||
| 					print(vim.inspect(vim.lsp.buf.list_workspace_folders())) | ||||
| 				end, bufopts) | ||||
| 				vim.keymap.set("n", "<leader>m", vim.lsp.buf.code_action, bufopts) | ||||
| 				vim.keymap.set("n", "<leader>r", vim.lsp.buf.rename, bufopts) | ||||
| 				vim.keymap.set("n", "<leader>F", function() | ||||
| 					vim.lsp.buf.format({ async = true }) | ||||
| 				end, bufopts) | ||||
| 			end | ||||
| 
 | ||||
| 			local capabilities = require("blink.cmp").get_lsp_capabilities() | ||||
| 			local lsp_flags = { debounce_text_changes = 150 } | ||||
| 			local vue_plugin_location = vim.fn.expand("$HOME/.bun/install/global/node_modules/@vue/typescript-plugin") | ||||
| 
 | ||||
| 			vim.lsp.config("ts_ls", { | ||||
| 				on_attach = on_attach, | ||||
| 				capabilities = capabilities, | ||||
| 				flags = lsp_flags, | ||||
| 				filetypes = { "javascript", "typescript", "javascriptreact", "typescriptreact", "vue" }, | ||||
| 				init_options = { | ||||
| 					plugins = { | ||||
| 						{ | ||||
| 							name = "@vue/typescript-plugin", | ||||
| 							location = vue_plugin_location, | ||||
| 							languages = { "javascript", "typescript", "vue" }, | ||||
| 						}, | ||||
| 					}, | ||||
| 				}, | ||||
| 			}) | ||||
| 
 | ||||
| 			vim.lsp.enable("ts_ls") | ||||
| 
 | ||||
| 			require("lspconfig").volar.setup({ | ||||
| 				on_attach = on_attach, | ||||
| 				capabilities = capabilities, | ||||
| 			}) | ||||
| 
 | ||||
| 			local servers = { "elixirls", "gopls", "pylsp", "svelte" } | ||||
| 			for _, server_name in ipairs(servers) do | ||||
| 				vim.lsp.config(server_name, { | ||||
| 					on_attach = on_attach, | ||||
| 					capabilities = capabilities, | ||||
| 					flags = lsp_flags, | ||||
| 				}) | ||||
| 				vim.lsp.enable(server_name) | ||||
| 			end | ||||
| 		end, | ||||
| 	}, | ||||
| } | ||||
							
								
								
									
										111
									
								
								.config/nvim/lua/plugins/navigation.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										111
									
								
								.config/nvim/lua/plugins/navigation.lua
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,111 @@ | |||
| -- lua/plugins/navigation.lua | ||||
| 
 | ||||
| return { | ||||
| 	{ | ||||
| 		"nvim-neo-tree/neo-tree.nvim", | ||||
| 		branch = "v3.x", | ||||
| 		dependencies = { | ||||
| 			"nvim-lua/plenary.nvim", | ||||
| 			"nvim-tree/nvim-web-devicons", | ||||
| 			"MunifTanjim/nui.nvim", | ||||
| 		}, | ||||
| 		lazy = false, | ||||
| 		opts = {}, | ||||
| 		keys = { | ||||
| 			{ | ||||
| 				"<leader>nn", | ||||
| 				"<cmd>Neotree left reveal_force_cwd<cr>", | ||||
| 				desc = "Neo-tree Toggle Sidebar", | ||||
| 				silent = true, | ||||
| 			}, | ||||
| 			{ | ||||
| 				"<leader>nf", | ||||
| 				"<cmd>Neotree float reveal_force_cwd<cr>", | ||||
| 				desc = "Neo-tree Float", | ||||
| 				silent = true, | ||||
| 			}, | ||||
| 		}, | ||||
| 	}, | ||||
| 	{ | ||||
| 		"nvim-telescope/telescope.nvim", | ||||
| 		dependencies = { | ||||
| 			"nvim-lua/plenary.nvim", | ||||
| 			"nvim-tree/nvim-web-devicons", | ||||
| 		}, | ||||
| 		opts = {}, | ||||
| 		keys = { | ||||
| 			{ "<leader>t", "<cmd>Telescope<cr>", desc = "Telescope", silent = true }, | ||||
| 			{ "<leader>p", "<cmd>Telescope git_files<cr>", desc = "Telescope Git Files", silent = true }, | ||||
| 			{ "<C-p>", "<cmd>Telescope find_files<cr>", desc = "Telescope Find Files", silent = true }, | ||||
| 			{ "<leader>s", "<cmd>Telescope treesitter<cr>", desc = "Telescope Treesitter", silent = true }, | ||||
| 			{ "<leader>gs", "<cmd>Telescope grep_string<cr>", desc = "Telescope Grep String", silent = true }, | ||||
| 			{ "<leader>gl", "<cmd>Telescope live_grep<cr>", desc = "Telescope Grep String", silent = true }, | ||||
| 			{ "<leader>gg", "<cmd>Telescope lsp_definitions<cr>", desc = "LSP Definitions", silent = true }, | ||||
| 			{ "<leader>gr", "<cmd>Telescope lsp_references<cr>", desc = "LSP References", silent = true }, | ||||
| 			{ "<leader>gi", "<cmd>Telescope lsp_implementations<cr>", desc = "LSP Implementations", silent = true }, | ||||
| 			{ | ||||
| 				"<leader>gd", | ||||
| 				"<cmd>Telescope lsp_type_definitions<cr>", | ||||
| 				desc = "LSP Type Definitions", | ||||
| 				silent = true, | ||||
| 			}, | ||||
| 		}, | ||||
| 	}, | ||||
| 	{ | ||||
| 		"nvim-telescope/telescope-fzf-native.nvim", | ||||
| 		build = "make", | ||||
| 		dependencies = { | ||||
| 			"nvim-telescope/telescope.nvim", | ||||
| 		}, | ||||
| 		config = function() | ||||
| 			require("telescope").load_extension("fzf") | ||||
| 		end, | ||||
| 	}, | ||||
| 	{ | ||||
| 		"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", | ||||
| 			}, | ||||
| 		}, | ||||
| 	}, | ||||
| } | ||||
							
								
								
									
										69
									
								
								.config/nvim/lua/plugins/tools.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										69
									
								
								.config/nvim/lua/plugins/tools.lua
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,69 @@ | |||
| -- lua/plugins/tools.lua | ||||
| 
 | ||||
| return { | ||||
| 	{ | ||||
| 		"olimorris/codecompanion.nvim", | ||||
| 		dependencies = { | ||||
| 			"nvim-lua/plenary.nvim", | ||||
| 			"nvim-treesitter/nvim-treesitter", | ||||
| 			"echasnovski/mini.diff", | ||||
| 		}, | ||||
| 		opts = { | ||||
| 			display = { | ||||
| 				diff = { provider = "mini_diff" }, | ||||
| 				chat = { | ||||
| 					show_settings = false, | ||||
| 					window = { position = "right", opts = { number = false } }, | ||||
| 				}, | ||||
| 			}, | ||||
| 			strategies = { | ||||
| 				chat = { adapter = "gemini" }, | ||||
| 				inline = { adapter = "openai_mini" }, | ||||
| 				cmd = { adapter = "openai_mini" }, | ||||
| 			}, | ||||
| 			adapters = { | ||||
| 				anthropic = function() | ||||
| 					return require("codecompanion.adapters").extend("anthropic", { | ||||
| 						schema = { | ||||
| 							max_tokens = { default = 20000 }, | ||||
| 						}, | ||||
| 					}) | ||||
| 				end, | ||||
| 				gemini = function() | ||||
| 					return require("codecompanion.adapters").extend("gemini", { | ||||
| 						schema = { | ||||
| 							model = { default = "gemini-2.5-pro-preview-05-06" }, | ||||
| 						}, | ||||
| 					}) | ||||
| 				end, | ||||
| 				openai = function() | ||||
| 					return require("codecompanion.adapters").extend("openai", { | ||||
| 						schema = { | ||||
| 							model = { default = "o4-mini-2025-04-16" }, | ||||
| 							reasoning_effort = { default = "high" }, | ||||
| 						}, | ||||
| 					}) | ||||
| 				end, | ||||
| 				openai_mini = function() | ||||
| 					return require("codecompanion.adapters").extend("openai", { | ||||
| 						schema = { | ||||
| 							model = { default = "gpt-4.1-mini" }, | ||||
| 							temperature = { default = 0 }, | ||||
| 						}, | ||||
| 					}) | ||||
| 				end, | ||||
| 			}, | ||||
| 		}, | ||||
| 		keys = { | ||||
| 			{ "<leader>cc", "<cmd>CodeCompanionChat<cr>", desc = "CodeCompanion Chat", silent = true }, | ||||
| 			{ | ||||
| 				"<leader>cf", | ||||
| 				"<cmd>CodeCompanionChat openai_mini<cr>", | ||||
| 				desc = "CodeCompanion Chat (Fast)", | ||||
| 				silent = true, | ||||
| 			}, | ||||
| 			{ "<leader>ca", "<cmd>CodeCompanionActions<cr>", desc = "CodeCompanion Actions", silent = true }, | ||||
| 			{ "<leader>ci", ":CodeCompanion<space>", mode = { "n", "v" }, desc = "CodeCompanion Inline" }, | ||||
| 		}, | ||||
| 	}, | ||||
| } | ||||
							
								
								
									
										61
									
								
								.config/nvim/lua/plugins/treesitter.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								.config/nvim/lua/plugins/treesitter.lua
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,61 @@ | |||
| -- lua/plugins/treesitter.lua | ||||
| 
 | ||||
| return { | ||||
| 	{ | ||||
| 		"nvim-treesitter/nvim-treesitter", | ||||
| 		build = ":TSUpdate", | ||||
| 		opts = { | ||||
| 			ensure_installed = { | ||||
| 				"c", | ||||
| 				"cpp", | ||||
| 				"lua", | ||||
| 				"vim", | ||||
| 				"regex", | ||||
| 				"bash", | ||||
| 				"fish", | ||||
| 				"typescript", | ||||
| 				"javascript", | ||||
| 				"tsx", | ||||
| 				"svelte", | ||||
| 				"go", | ||||
| 				"elixir", | ||||
| 				"vue", | ||||
| 				"groovy", | ||||
| 				"java", | ||||
| 				"objc", | ||||
| 				"swift", | ||||
| 				"hcl", | ||||
| 				"terraform", | ||||
| 				"yaml", | ||||
| 				"json", | ||||
| 				"markdown", | ||||
| 				"markdown_inline", | ||||
| 			}, | ||||
| 			auto_install = false, | ||||
| 			highlight = { | ||||
| 				enable = true, | ||||
| 				additional_vim_regex_highlighting = false, | ||||
| 			}, | ||||
| 			incremental_selection = { | ||||
| 				enable = true, | ||||
| 				keymaps = { | ||||
| 					init_selection = "gnn", | ||||
| 					node_incremental = "grn", | ||||
| 					scope_incremental = "grc", | ||||
| 					node_decremental = "grm", | ||||
| 				}, | ||||
| 			}, | ||||
| 			indent = { | ||||
| 				enable = true, | ||||
| 			}, | ||||
| 		}, | ||||
| 		init = function() | ||||
| 			vim.opt.foldmethod = "expr" | ||||
| 			vim.opt.foldexpr = "nvim_treesitter#foldexpr()" | ||||
| 			vim.opt.foldenable = false | ||||
| 		end, | ||||
| 		config = function(plugin, opts) | ||||
| 			require("nvim-treesitter.configs").setup(opts) | ||||
| 		end, | ||||
| 	}, | ||||
| } | ||||
							
								
								
									
										90
									
								
								.config/nvim/lua/plugins/ui.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										90
									
								
								.config/nvim/lua/plugins/ui.lua
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,90 @@ | |||
| -- lua/plugins/ui.lua | ||||
| 
 | ||||
| return { | ||||
| 	"edkolev/tmuxline.vim", | ||||
| 	{ | ||||
| 		"rebelot/kanagawa.nvim", | ||||
| 		lazy = false, | ||||
| 		priority = 1000, | ||||
| 		opts = { transparent = not vim.g.neovide }, | ||||
| 		init = function() | ||||
| 			vim.cmd([[colorscheme kanagawa]]) | ||||
| 		end, | ||||
| 	}, | ||||
| 	{ | ||||
| 		"akinsho/bufferline.nvim", | ||||
| 		event = "VeryLazy", | ||||
| 		version = "*", | ||||
| 		dependencies = { "nvim-tree/nvim-web-devicons" }, | ||||
| 		opts = { | ||||
| 			options = { | ||||
| 				separator_style = "slope", | ||||
| 				offsets = { | ||||
| 					{ | ||||
| 						filetype = "neo-tree", | ||||
| 						text = "explorer", | ||||
| 						highlight = "Directory", | ||||
| 						separator = true, | ||||
| 					}, | ||||
| 				}, | ||||
| 			}, | ||||
| 		}, | ||||
| 		keys = { | ||||
| 			{ "<leader>j", "<cmd>BufferLinePick<cr>", desc = "BufferLinePick", silent = true }, | ||||
| 			{ "<leader>J", "<cmd>BufferLinePickClose<cr>", desc = "BufferLinePickClose", silent = true }, | ||||
| 		}, | ||||
| 	}, | ||||
| 	{ | ||||
| 		"nvim-lualine/lualine.nvim", | ||||
| 		dependencies = { "nvim-tree/nvim-web-devicons" }, | ||||
| 		opts = { | ||||
| 			extensions = { | ||||
| 				"neo-tree", | ||||
| 				"symbols-outline", | ||||
| 			}, | ||||
| 		}, | ||||
| 	}, | ||||
| 	{ | ||||
| 		"rcarriga/nvim-notify", | ||||
| 		opts = { | ||||
| 			background_colour = "#000000", | ||||
| 		}, | ||||
| 	}, | ||||
| 	{ | ||||
| 		"folke/noice.nvim", | ||||
| 		event = "VeryLazy", | ||||
| 		dependencies = { "MunifTanjim/nui.nvim", "rcarriga/nvim-notify" }, | ||||
| 		opts = { | ||||
| 			lsp = { | ||||
| 				override = { | ||||
| 					["vim.lsp.util.convert_input_to_markdown_lines"] = true, | ||||
| 					["vim.lsp.util.stylize_markdown"] = true, | ||||
| 					["cmp.entry.get_documentation"] = true, | ||||
| 				}, | ||||
| 			}, | ||||
| 			presets = { | ||||
| 				bottom_search = true, | ||||
| 				command_palette = true, | ||||
| 				long_message_to_split = true, | ||||
| 			}, | ||||
| 			views = { | ||||
| 				notify = { | ||||
| 					replace = true, | ||||
| 					merge = true, | ||||
| 				}, | ||||
| 			}, | ||||
| 		}, | ||||
| 	}, | ||||
| 	{ | ||||
| 		"OXY2DEV/markview.nvim", | ||||
| 		lazy = false, | ||||
| 		dependencies = { "saghen/blink.cmp" }, | ||||
| 		opts = { | ||||
| 			preview = { | ||||
| 				icon_provider = "devicons", | ||||
| 				filetypes = { "markdown", "codecompanion" }, | ||||
| 				ignore_buftypes = {}, | ||||
| 			}, | ||||
| 		}, | ||||
| 	}, | ||||
| } | ||||
							
								
								
									
										13
									
								
								.gitconfig
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								.gitconfig
									
									
									
									
									
								
							|  | @ -22,6 +22,7 @@ | |||
|   merff = merge --ff-only | ||||
|   fa = fetch --all | ||||
|   ap = add --patch | ||||
|   aa = add --all | ||||
| 
 | ||||
| [core] | ||||
|   editor = nvim | ||||
|  | @ -43,10 +44,10 @@ | |||
|   diffFilter = delta --color-only | ||||
| 
 | ||||
| [delta] | ||||
|   features = side-by-side line-numbers decorations | ||||
|   whitespace-error-style = 22 reverse | ||||
|   navigate = true | ||||
|   dark = true | ||||
|   side-by-side = true | ||||
|   line-numbers = true | ||||
| 
 | ||||
| [delta "decorations"] | ||||
|   commit-decoration-style = bold yellow box ul | ||||
|   file-style = bold yellow ul | ||||
|   file-decoration-style = none | ||||
| [merge] | ||||
|   conflictstyle = zdiff3 | ||||
|  |  | |||
							
								
								
									
										77
									
								
								install_utils
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										77
									
								
								install_utils
									
									
									
									
									
										Executable file
									
								
							|  | @ -0,0 +1,77 @@ | |||
| #!/usr/bin/env fish | ||||
| 
 | ||||
| test -e /etc/os-release; and source /etc/os-release | ||||
| 
 | ||||
| set -l uname (uname) | ||||
| 
 | ||||
| if test $uname = Darwin | ||||
|     set -l distro mac | ||||
| else | ||||
|     set -l distro $ID | ||||
| end | ||||
| 
 | ||||
| set -l base_pkgs \ | ||||
|     fish \ | ||||
|     git \ | ||||
|     neovim \ | ||||
|     tmux \ | ||||
|     rsync \ | ||||
|     curl \ | ||||
|     fzf \ | ||||
|     mosh \ | ||||
|     lsd \ | ||||
|     ripgrep \ | ||||
|     bat | ||||
| 
 | ||||
| set -l mac_pkgs \ | ||||
|     $base_pkgs \ | ||||
|     fd \ | ||||
|     yazi \ | ||||
|     git-delta \ | ||||
|     starship | ||||
| 
 | ||||
| set -l arch_pkgs \ | ||||
|     $base_pkgs \ | ||||
|     fd \ | ||||
|     yazi \ | ||||
|     git-delta \ | ||||
|     starship | ||||
| 
 | ||||
| set -l debian_pkgs \ | ||||
|     $base_pkgs \ | ||||
|     fd-find | ||||
| 
 | ||||
| switch $distro | ||||
|     case mac | ||||
|         log 'Installing packages with Homebrew' | ||||
|         brew install $mac_pkgs | ||||
|     case arch | ||||
|         log 'Installing Pikaur' | ||||
| 
 | ||||
|         install_pkgs --needed base-devel | ||||
|         or return $status | ||||
| 
 | ||||
|         set -l cwd (pwd) | ||||
|         and set -l tmp_dir (mktemp --directory) | ||||
|         or return $status | ||||
| 
 | ||||
|         git clone https://aur.archlinux.org/pikaur.git $tmp_dir | ||||
|         and cd $tmp_dir | ||||
|         and makepkg --clean --install --rmdeps --syncdeps --noconfirm | ||||
|         and cd $cwd | ||||
|         or return $status | ||||
| 
 | ||||
|         log 'Installing packages with Pikaur ' | ||||
| 
 | ||||
|         pikaur --sync --refresh --sysupgrade --noconfirm | ||||
|         and pikaur --sync --noconfirm $arch_pkgs | ||||
|     case debian | ||||
|         log 'Installing packages with APT' | ||||
|         sudo apt-get --quiet --yes update | ||||
|         and sudo apt-get --quiet --yes upgrade | ||||
|         and sudo apt-get --quiet --yes install $debian_pkgs | ||||
| end | ||||
| 
 | ||||
| function log -a message | ||||
|     echo \n"--- $message ---"\n | ||||
| end | ||||
		Loading…
	
		Reference in a new issue