diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md old mode 100644 new mode 100755 diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md old mode 100644 new mode 100755 diff --git a/.github/workflows/stylua.yml b/.github/workflows/stylua.yml old mode 100644 new mode 100755 diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/.stylua.toml b/.stylua.toml old mode 100644 new mode 100755 diff --git a/LICENSE.md b/LICENSE.md old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/doc/kickstart.txt b/doc/kickstart.txt old mode 100644 new mode 100755 diff --git a/doc/tags b/doc/tags old mode 100644 new mode 100755 diff --git a/init.lua b/init.lua old mode 100644 new mode 100755 index 88658ef3..0b06234d --- a/init.lua +++ b/init.lua @@ -87,11 +87,11 @@ P.S. You can delete this when you're done too. It's your config now! :) -- Set as the leader key -- See `:help mapleader` -- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used) -vim.g.mapleader = ' ' -vim.g.maplocalleader = ' ' +vim.g.mapleader = '' +vim.g.maplocalleader = '' -- Set to true if you have a Nerd Font installed and selected in the terminal -vim.g.have_nerd_font = false +vim.g.have_nerd_font = true -- [[ Setting options ]] -- See `:help vim.opt` @@ -102,7 +102,7 @@ vim.g.have_nerd_font = false vim.opt.number = true -- You can also add relative line numbers, to help with jumping. -- Experiment for yourself to see if you like it! --- vim.opt.relativenumber = true +vim.opt.relativenumber = true -- Enable mouse mode, can be useful for resizing splits for example! vim.opt.mouse = 'a' @@ -113,7 +113,7 @@ vim.opt.showmode = false -- Sync clipboard between OS and Neovim. -- Remove this option if you want your OS clipboard to remain independent. -- See `:help 'clipboard'` -vim.opt.clipboard = 'unnamedplus' +-- vim.opt.clipboard = 'unnamedplus' -- Enable break indent vim.opt.breakindent = true @@ -176,10 +176,10 @@ vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagn vim.keymap.set('t', '', '', { desc = 'Exit terminal mode' }) -- TIP: Disable arrow keys in normal mode --- vim.keymap.set('n', '', 'echo "Use h to move!!"') --- vim.keymap.set('n', '', 'echo "Use l to move!!"') --- vim.keymap.set('n', '', 'echo "Use k to move!!"') --- vim.keymap.set('n', '', 'echo "Use j to move!!"') +vim.keymap.set('n', '', 'echo "Use h to move!!"') +vim.keymap.set('n', '', 'echo "Use l to move!!"') +vim.keymap.set('n', '', 'echo "Use k to move!!"') +vim.keymap.set('n', '', 'echo "Use j to move!!"') -- Keybinds to make split navigation easier. -- Use CTRL+ to switch between windows @@ -272,31 +272,29 @@ require('lazy').setup({ -- Then, because we use the `config` key, the configuration only runs -- after the plugin has been loaded: -- config = function() ... end - - { -- Useful plugin to show you pending keybinds. - 'folke/which-key.nvim', - event = 'VimEnter', -- Sets the loading event to 'VimEnter' - config = function() -- This is the function that runs, AFTER loading - require('which-key').setup() - - -- Document existing key chains - require('which-key').register { - ['c'] = { name = '[C]ode', _ = 'which_key_ignore' }, - ['d'] = { name = '[D]ocument', _ = 'which_key_ignore' }, - ['r'] = { name = '[R]ename', _ = 'which_key_ignore' }, - ['s'] = { name = '[S]earch', _ = 'which_key_ignore' }, - ['w'] = { name = '[W]orkspace', _ = 'which_key_ignore' }, - ['t'] = { name = '[T]oggle', _ = 'which_key_ignore' }, - ['h'] = { name = 'Git [H]unk', _ = 'which_key_ignore' }, - } - -- visual mode - require('which-key').register({ - ['h'] = { 'Git [H]unk' }, - }, { mode = 'v' }) - end, - }, - - -- NOTE: Plugins can specify dependencies. + -- + -- { -- Useful plugin to show you pending keybinds. + -- 'folke/which-key.nvim', + -- event = 'VimEnter', -- Sets the loading event to 'VimEnter' + -- config = function() -- This is the function that runs, AFTER loading + -- require('which-key').setup() + -- + -- -- Document existing key chains + -- require('which-key').register { + -- -- ['c'] = { name = '[C]ode', _ = 'which_key_ignore' }, + -- -- ['d'] = { name = '[D]ocument', _ = 'which_key_ignore' }, + -- -- ['r'] = { name = '[R]ename', _ = 'which_key_ignore' }, + -- -- ['s'] = { name = '[S]earch', _ = 'which_key_ignore' }, + -- -- ['w'] = { name = '[W]orkspace', _ = 'which_key_ignore' }, + -- -- ['t'] = { name = '[T]oggle', _ = 'which_key_ignore' }, + -- -- ['h'] = { name = 'Git [H]unk', _ = 'which_key_ignore' }, + -- } + -- + -- -- visual mode + -- -- require('which-key').register({ ['h'] = { 'Git [H]unk' } }, { mode = 'v' }) + -- end, + -- }, + -- -- NOTE: Plugins can specify dependencies. -- -- The dependencies are proper plugin specifications as well - anything -- you do for a plugin at the top level, you can do for a dependency. @@ -353,11 +351,11 @@ require('lazy').setup({ -- You can put your default mappings / updates / etc. in here -- All the info you're looking for is in `:help telescope.setup()` -- - -- defaults = { - -- mappings = { - -- i = { [''] = 'to_fuzzy_refine' }, - -- }, - -- }, + defaults = { + mappings = { + i = { [''] = 'to_fuzzy_refine' }, + }, + }, -- pickers = {} extensions = { ['ui-select'] = { @@ -566,8 +564,8 @@ require('lazy').setup({ -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ local servers = { -- clangd = {}, - -- gopls = {}, - -- pyright = {}, + gopls = {}, + pyright = {}, -- rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- @@ -653,11 +651,11 @@ require('lazy').setup({ formatters_by_ft = { lua = { 'stylua' }, -- Conform can also run multiple formatters sequentially - -- python = { "isort", "black" }, + python = { 'isort', 'black' }, -- -- You can use a sub-list to tell conform to run *until* a formatter -- is found. - -- javascript = { { "prettierd", "prettier" } }, + javascript = { { 'prettierd', 'prettier' } }, }, }, }, @@ -873,19 +871,19 @@ require('lazy').setup({ -- Here are some example plugins that I've included in the Kickstart repository. -- 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.lint', - -- require 'kickstart.plugins.autopairs', - -- require 'kickstart.plugins.neo-tree', - -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps + require 'kickstart.plugins.debug', + 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 -- 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. -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. -- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins` - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, }, { ui = { -- If you are using a Nerd Font: set icons to an empty table which will use the diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua old mode 100644 new mode 100755 index be0eb9d8..ee07671d --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -2,4 +2,57 @@ -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information -return {} +return { + { + 'ThePrimeagen/harpoon', + branch = 'harpoon2', + dependencies = { 'nvim-lua/plenary.nvim' }, + }, + { + 'ThePrimeagen/vim-be-good', + }, + { + 'mbbill/undotree', + + config = function() + vim.keymap.set('n', 'u', vim.cmd.UndotreeToggle) + end, + }, + { + 'tpope/vim-fugitive', + config = function() + vim.keymap.set('n', 'gs', vim.cmd.Git) + + local ThePrimeagen_Fugitive = vim.api.nvim_create_augroup('ThePrimeagen_Fugitive', {}) + + local autocmd = vim.api.nvim_create_autocmd + autocmd('BufWinEnter', { + group = ThePrimeagen_Fugitive, + pattern = '*', + callback = function() + if vim.bo.ft ~= 'fugitive' then + return + end + + local bufnr = vim.api.nvim_get_current_buf() + local opts = { buffer = bufnr, remap = false } + vim.keymap.set('n', 'p', function() + vim.cmd.Git 'push' + end, opts) + + -- rebase always + vim.keymap.set('n', 'P', function() + vim.cmd.Git { 'pull', '--rebase' } + end, opts) + + -- NOTE: It allows me to easily set the branch i am pushing and any tracking + -- needed if i did not set the branch up correctly + vim.keymap.set('n', 't', ':Git push -u origin ', opts) + end, + }) + + vim.keymap.set('n', 'gu', 'diffget //2') + vim.keymap.set('n', 'gh', 'diffget //3') + end, + }, +} diff --git a/lua/kickstart/health.lua b/lua/kickstart/health.lua old mode 100644 new mode 100755 diff --git a/lua/kickstart/plugins/autopairs.lua b/lua/kickstart/plugins/autopairs.lua old mode 100644 new mode 100755 diff --git a/lua/kickstart/plugins/debug.lua b/lua/kickstart/plugins/debug.lua old mode 100644 new mode 100755 diff --git a/lua/kickstart/plugins/gitsigns.lua b/lua/kickstart/plugins/gitsigns.lua old mode 100644 new mode 100755 diff --git a/lua/kickstart/plugins/indent_line.lua b/lua/kickstart/plugins/indent_line.lua old mode 100644 new mode 100755 diff --git a/lua/kickstart/plugins/lint.lua b/lua/kickstart/plugins/lint.lua old mode 100644 new mode 100755 diff --git a/lua/kickstart/plugins/neo-tree.lua b/lua/kickstart/plugins/neo-tree.lua old mode 100644 new mode 100755