From 8595f2c047147d94f2503f83df550e3f9dd3d0a5 Mon Sep 17 00:00:00 2001 From: MShock5150 Date: Fri, 1 Aug 2025 00:45:10 -0500 Subject: [PATCH] Finalizing 5150.nvim with Kickstart --- init.lua | 20 ++++++++--- lazy-lock.json | 36 +++++++++++++++++++ lua/kickstart/plugins/copilot.lua | 13 +++++++ lua/kickstart/plugins/fugitive.lua | 7 ++++ lua/kickstart/plugins/harpoon.lua | 58 ++++++++++++++++++++++++++++++ lua/kickstart/plugins/trouble.lua | 28 +++++++++++++++ 6 files changed, 157 insertions(+), 5 deletions(-) create mode 100644 lazy-lock.json create mode 100644 lua/kickstart/plugins/copilot.lua create mode 100644 lua/kickstart/plugins/fugitive.lua create mode 100644 lua/kickstart/plugins/harpoon.lua create mode 100644 lua/kickstart/plugins/trouble.lua diff --git a/init.lua b/init.lua index 7aa44af2..0283e645 100644 --- a/init.lua +++ b/init.lua @@ -18,6 +18,9 @@ vim.o.number = true -- Experiment for yourself to see if you like it! vim.o.relativenumber = true +vim.o.wrap = true +vim.o.linebreak = true + -- Enable mouse mode, can be useful for resizing splits for example! vim.o.mouse = 'a' @@ -121,9 +124,11 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the upper win -- [[ Additional Remaps ]] vim.keymap.set('n', 'pv', ':Ex') -vim.keymap.set('n', 'x', ':so') vim.keymap.set('n', 'fc', ':fc') -vim.keymap.set('n', 'cr', ':%s/\r//g') +vim.keymap.set('n', 'cr', ':%s/\r//g') +vim.keymap.set('n', 'xx', function() + require('trouble').toggle() +end, { desc = 'Toggle Trouble' }) -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` @@ -464,7 +469,9 @@ require('lazy').setup({ map('gra', vim.lsp.buf.code_action, '[G]oto Code [A]ction', { 'n', 'x' }) -- Find references for the word under your cursor. - map('grr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences') + map('grr', function() + require('trouble').toggle 'lsp_references' + end, '[G]oto [R]eferences (Trouble)') -- Jump to the implementation of the word under your cursor. -- Useful when your language has ways of declaring types without an actual implementation. @@ -594,7 +601,6 @@ require('lazy').setup({ gopls = {}, pyright = {}, -- rust_analyzer = {}, - elixir_ls = {}, lexical = {}, ruff = {}, sqls = {}, @@ -900,11 +906,15 @@ require('lazy').setup({ -- Uncomment any of the lines below to enable them (you will need to restart nvim). -- require 'kickstart.plugins.debug', - -- require 'kickstart.plugins.indent_line', + require 'kickstart.plugins.indent_line', require 'kickstart.plugins.lint', require 'kickstart.plugins.autopairs', -- require 'kickstart.plugins.neo-tree', require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps + require 'kickstart.plugins.copilot', + require 'kickstart.plugins.harpoon', + require 'kickstart.plugins.fugitive', + require 'kickstart.plugins.trouble', -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- This is the easiest way to modularize your config. diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 00000000..3760a675 --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,36 @@ +{ + "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" }, + "blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" }, + "conform.nvim": { "branch": "master", "commit": "973f3cb73887d510321653044791d7937c7ec0fa" }, + "copilot.vim": { "branch": "release", "commit": "51f80c0ed4f70d1c7e8c0ff11a792a9d84502c03" }, + "fidget.nvim": { "branch": "main", "commit": "4ec7bed6c86b671ddde03ca1b227343cfa3e65fa" }, + "gitsigns.nvim": { "branch": "main", "commit": "cc2e664c7e3cd8a31af34df040d16a75cfcadced" }, + "guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" }, + "harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" }, + "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, + "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, + "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "844d247d998c2f9a6a3baad8bb9748edc55ce69f" }, + "mason-nvim-dap.nvim": { "branch": "main", "commit": "86389a3dd687cfaa647b6f44731e492970034baa" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, + "mason.nvim": { "branch": "main", "commit": "3671ab0d40aa5bd24b1686562bd0a23391ecf76a" }, + "mini.nvim": { "branch": "main", "commit": "c122e852517adaf7257688e435369c050da113b1" }, + "nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" }, + "nvim-dap": { "branch": "master", "commit": "5dd4d50f2e6a2eaf9e57fad023d294ef371bda35" }, + "nvim-dap-go": { "branch": "main", "commit": "b4421153ead5d726603b02743ea40cf26a51ed5f" }, + "nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" }, + "nvim-lint": { "branch": "master", "commit": "7ef127aaede2a4d5ad8df8321e2eb4e567f29594" }, + "nvim-lspconfig": { "branch": "master", "commit": "d0dbf489a8810672fa9a61f4a86e5cf89214b772" }, + "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, + "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, + "nvim-web-devicons": { "branch": "master", "commit": "4a8369f4c78ef6f6f895f0cec349e48f74330574" }, + "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, + "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, + "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, + "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, + "tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" }, + "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, + "vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" }, + "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } +} diff --git a/lua/kickstart/plugins/copilot.lua b/lua/kickstart/plugins/copilot.lua new file mode 100644 index 00000000..9e779075 --- /dev/null +++ b/lua/kickstart/plugins/copilot.lua @@ -0,0 +1,13 @@ +return { + 'github/copilot.vim', + event = 'InsertEnter', + config = function() + vim.g.copilot_no_tab_map = true + + local keymap = vim.keymap.set + keymap('i', '', 'copilot#Accept("")', { expr = true, silent = true }) + keymap('i', '', 'copilot#Next()', { expr = true, silent = true }) + keymap('i', '', 'copilot#Previous()', { expr = true, silent = true }) + keymap('i', '', 'copilot#Dismiss()', { expr = true, silent = true }) + end, +} diff --git a/lua/kickstart/plugins/fugitive.lua b/lua/kickstart/plugins/fugitive.lua new file mode 100644 index 00000000..a5d8720b --- /dev/null +++ b/lua/kickstart/plugins/fugitive.lua @@ -0,0 +1,7 @@ +return { + 'tpope/vim-fugitive', + cmd = { 'Git', 'G' }, + keys = { + { 'gg', 'Git', desc = 'Git Status' }, + }, +} diff --git a/lua/kickstart/plugins/harpoon.lua b/lua/kickstart/plugins/harpoon.lua new file mode 100644 index 00000000..15dcca83 --- /dev/null +++ b/lua/kickstart/plugins/harpoon.lua @@ -0,0 +1,58 @@ +return { + 'ThePrimeagen/harpoon', + dependencies = { 'nvim-lua/plenary.nvim' }, + config = function() + require('harpoon').setup {} + end, + keys = { + { + 'ha', + function() + require('harpoon.mark').add_file() + end, + desc = 'Harpoon: Add File', + }, + { + 'hr', + function() + require('harpoon.mark').rm_file() + end, + desc = 'Harpoon: Remove File', + }, + { + 'hm', + function() + require('harpoon.ui').toggle_quick_menu() + end, + desc = 'Harpoon: Open Menu', + }, + { + '1', + function() + require('harpoon.ui').nav_file(1) + end, + desc = 'Harpoon to file 1', + }, + { + '2', + function() + require('harpoon.ui').nav_file(2) + end, + desc = 'Harpoon to file 2', + }, + { + '3', + function() + require('harpoon.ui').nav_file(3) + end, + desc = 'Harpoon to file 3', + }, + { + '4', + function() + require('harpoon.ui').nav_file(4) + end, + desc = 'Harpoon to file 4', + }, + }, +} diff --git a/lua/kickstart/plugins/trouble.lua b/lua/kickstart/plugins/trouble.lua new file mode 100644 index 00000000..499a8cd0 --- /dev/null +++ b/lua/kickstart/plugins/trouble.lua @@ -0,0 +1,28 @@ +return { + 'folke/trouble.nvim', + dependencies = { 'nvim-tree/nvim-web-devicons' }, + opts = {}, + keys = { + { + 'xx', + function() + require('trouble').toggle() + end, + desc = 'Toggle Trouble', + }, + { + 'xw', + function() + require('trouble').toggle 'workspace_diagnostics' + end, + desc = 'Workspace Diagnostics', + }, + { + 'xd', + function() + require('trouble').toggle 'document_diagnostics' + end, + desc = 'Document Diagnostics', + }, + }, +}