From 6986e8fddafb7c5fb8f0474cd3a527348e3d6596 Mon Sep 17 00:00:00 2001 From: Norm Rasmussen Date: Tue, 8 Mar 2022 16:14:59 -0500 Subject: [PATCH] Plugin Changes --- lua/keymaps.lua | 10 ++- lua/plugins/alpha-nvim.lua | 21 ++++--- lua/plugins/cheatsheet.lua | 30 +++++++++ lua/plugins/gitsigns.lua | 123 +++++++++++++------------------------ lua/plugins/neoscroll.lua | 14 +++++ lua/plugins/plugins.lua | 9 +++ plugin/packer_compiled.lua | 18 ++++-- 7 files changed, 129 insertions(+), 96 deletions(-) create mode 100644 lua/plugins/cheatsheet.lua create mode 100644 lua/plugins/neoscroll.lua diff --git a/lua/keymaps.lua b/lua/keymaps.lua index e68e21c..57f4516 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -16,14 +16,20 @@ map('n', '', 'k', default_opts) map('n', '', 'l', default_opts) -- Close all windows and exit from Neovim with and q -map('n', 'q', ':qa!', default_opts) +-- map('n', 'q', ':qa!', default_opts) + +-- Neovim Tab Navigation +map('n', 't', ':tabnew', default_opts) +map('n', 'w', ':-tabnext', default_opts) +map('n', 'e', ':+tabnext', default_opts) +map('n', 'q', ':tabclose', default_opts) ----------------------------------------------------------- -- Applications and Plugins shortcuts ----------------------------------------------------------- -- Open terminal -map('n', '', ':Term', { noremap = true }) +-- map('n', '', ':Term', { noremap = true }) -- nvim-tree map('n', '', ':NvimTreeToggle', default_opts) -- open/close diff --git a/lua/plugins/alpha-nvim.lua b/lua/plugins/alpha-nvim.lua index 11c0386..81986cf 100644 --- a/lua/plugins/alpha-nvim.lua +++ b/lua/plugins/alpha-nvim.lua @@ -22,16 +22,21 @@ end -- Banner local banner = { - " ", - " ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ", - " ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ", - " ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ", - " ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ", - " ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ", - " ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ", - " ", +" ", +" █████ █████ ██████ █████ ███ ", +"░░███ ░░███ ░░██████ ░░███ ░███ ", +" ░███ ░███ ██████ █████ ████ ░███░███ ░███ ██████ ████████ █████████████ ░███ ", +" ░███████████ ███░░███░░███ ░███ ░███░░███░███ ███░░███░░███░░███░░███░░███░░███░███ ", +" ░███░░░░░███ ░███████ ░███ ░███ ░███ ░░██████ ░███ ░███ ░███ ░░░ ░███ ░███ ░███░███ ", +" ░███ ░███ ░███░░░ ░███ ░███ ░███ ░░█████ ░███ ░███ ░███ ░███ ░███ ░███░░░ ", +" █████ █████░░██████ ░░███████ █████ ░░█████░░██████ █████ █████░███ ████████ ", +"░░░░░ ░░░░░ ░░░░░░ ░░░░░███ ░░░░░ ░░░░░ ░░░░░░ ░░░░░ ░░░░░ ░░░ ░░░░░░░░ ", +" ███ ░███ ", +" ░░██████ ", +" ░░░░░░ ", } + dashboard.section.header.val = banner -- Menu diff --git a/lua/plugins/cheatsheet.lua b/lua/plugins/cheatsheet.lua new file mode 100644 index 0000000..24d2a61 --- /dev/null +++ b/lua/plugins/cheatsheet.lua @@ -0,0 +1,30 @@ +require("cheatsheet").setup({ + -- Whether to show bundled cheatsheets + + -- For generic cheatsheets like default, unicode, nerd-fonts, etc + -- bundled_cheatsheets = { + -- enabled = {}, + -- disabled = {}, + -- }, + bundled_cheatsheets = true, + + -- For plugin specific cheatsheets + -- bundled_plugin_cheatsheets = { + -- enabled = {}, + -- disabled = {}, + -- } + bundled_plugin_cheatsheets = true, + + -- For bundled plugin cheatsheets, do not show a sheet if you + -- don't have the plugin installed (searches runtimepath for + -- same directory name) + include_only_installed_plugins = true, + + -- Key mappings bound inside the telescope window + telescope_mappings = { + [''] = require('cheatsheet.telescope.actions').select_or_fill_commandline, + [''] = require('cheatsheet.telescope.actions').select_or_execute, + [''] = require('cheatsheet.telescope.actions').copy_cheat_value, + [''] = require('cheatsheet.telescope.actions').edit_user_cheatsheet, + } +}) diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua index 9d77d60..0a17bdf 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -1,83 +1,42 @@ -local M = {} +require('gitsigns').setup { + signs = { + add = {hl = 'GitSignsAdd' , text = '│', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'}, + change = {hl = 'GitSignsChange', text = '│', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'}, + delete = {hl = 'GitSignsDelete', text = '_', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'}, + topdelete = {hl = 'GitSignsDelete', text = '‾', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'}, + changedelete = {hl = 'GitSignsChange', text = '~', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'}, + }, + signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` + numhl = false, -- Toggle with `:Gitsigns toggle_numhl` + linehl = false, -- Toggle with `:Gitsigns toggle_linehl` + word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` + watch_gitdir = { + interval = 1000, + follow_files = true + }, + attach_to_untracked = true, + current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame` + current_line_blame_opts = { + virt_text = true, + virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' + delay = 1000, + ignore_whitespace = false, + }, + current_line_blame_formatter = ', - ', + sign_priority = 6, + update_debounce = 100, + status_formatter = nil, -- Use default + max_file_length = 40000, + preview_config = { + -- Options passed to nvim_open_win + border = 'single', + style = 'minimal', + relative = 'cursor', + row = 0, + col = 1 + }, + yadm = { + enable = false + }, +} -local opts = { - set = { - signs = { - add = { - hl = "GitSignsAdd", - text = "▎", - numhl = "GitSignsAddNr", - linehl = "GitSignsAddLn", - }, - change = { - hl = "GitSignsChange", - text = "▎", - numhl = "GitSignsChangeNr", - linehl = "GitSignsChangeLn", - }, - delete = { - hl = "GitSignsDelete", - text = "契", - numhl = "GitSignsDeleteNr", - linehl = "GitSignsDeleteLn", - }, - topdelete = { - hl = "GitSignsDelete", - text = "契", - numhl = "GitSignsDeleteNr", - linehl = "GitSignsDeleteLn", - }, - changedelete = { - hl = "GitSignsChange", - text = "▎", - numhl = "GitSignsChangeNr", - linehl = "GitSignsChangeLn", - }, - }, - numhl = false, - linehl = false, - keymaps = { - -- Default keymap options - noremap = true, - buffer = true, - }, - signcolumn = true, - word_diff = false, - attach_to_untracked = true, - current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame` - current_line_blame_opts = { - virt_text = true, - virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align' - delay = 1000, - ignore_whitespace = false, - }, - current_line_blame_formatter_opts = { - relative_time = false, - }, - max_file_length = 40000, - preview_config = { - -- Options passed to nvim_open_win - border = "rounded", - style = "minimal", - relative = "cursor", - row = 0, - col = 1, - }, - watch_gitdir = { - interval = 1000, - follow_files = true, - }, - sign_priority = 6, - update_debounce = 200, - status_formatter = nil, -- Use default - }, - } - -M.setup = function() - local gitsigns = require "gitsigns" - - gitsigns.setup(opts.set) - -end - -return M diff --git a/lua/plugins/neoscroll.lua b/lua/plugins/neoscroll.lua new file mode 100644 index 0000000..da5e293 --- /dev/null +++ b/lua/plugins/neoscroll.lua @@ -0,0 +1,14 @@ +require('neoscroll').setup({ + -- All these keys will be mapped to their corresponding default scrolling animation + mappings = {'', '', '', '', + '', '', 'zt', 'zz', 'zb'}, + hide_cursor = true, -- Hide cursor while scrolling + stop_eof = true, -- Stop at when scrolling downwards + use_local_scrolloff = false, -- Use the local scope of scrolloff instead of the global scope + respect_scrolloff = false, -- Stop scrolling when the cursor reaches the scrolloff margin of the file + cursor_scrolls_alone = true, -- The cursor will keep on scrolling even if the window cannot scroll further + easing_function = nil, -- Default easing function + pre_hook = nil, -- Function to run before the scrolling animation starts + post_hook = nil, -- Function to run after the scrolling animation ends + performance_mode = false, -- Disable "Performance Mode" on all buffers. + }) diff --git a/lua/plugins/plugins.lua b/lua/plugins/plugins.lua index 53a981e..09a3d21 100755 --- a/lua/plugins/plugins.lua +++ b/lua/plugins/plugins.lua @@ -14,6 +14,7 @@ return require'packer'.startup(function() use 'simrat39/symbols-outline.nvim' use 'kyazdani42/nvim-web-devicons' use 'liuchengxu/vista.vim' + use 'karb94/neoscroll.nvim' use 'nvim-lua/plenary.nvim' use 'nvim-lua/popup.nvim' use 'tanvirtin/monokai.nvim' @@ -23,6 +24,14 @@ return require'packer'.startup(function() use 'folke/tokyonight.nvim' use 'williamboman/nvim-lsp-installer' use 'neovim/nvim-lspconfig' + use { + 'sudormrfbin/cheatsheet.nvim', + requires = { + {'nvim-telescope/telescope.nvim'}, + {'nvim-lua/popup.nvim'}, + {'nvim-lua/plenary.nvim'}, + } +} use { 'famiu/feline.nvim', requires = { 'kyazdani42/nvim-web-devicons' }, diff --git a/plugin/packer_compiled.lua b/plugin/packer_compiled.lua index ee14d2a..8138e11 100644 --- a/plugin/packer_compiled.lua +++ b/plugin/packer_compiled.lua @@ -79,6 +79,11 @@ _G.packer_plugins = { path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/alpha-nvim", url = "https://github.com/goolord/alpha-nvim" }, + ["cheatsheet.nvim"] = { + loaded = true, + path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/cheatsheet.nvim", + url = "https://github.com/sudormrfbin/cheatsheet.nvim" + }, ["cmp-buffer"] = { loaded = true, path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/cmp-buffer", @@ -135,6 +140,11 @@ _G.packer_plugins = { path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/monokai.nvim", url = "https://github.com/tanvirtin/monokai.nvim" }, + ["neoscroll.nvim"] = { + loaded = true, + path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/neoscroll.nvim", + url = "https://github.com/karb94/neoscroll.nvim" + }, ["nvim-autopairs"] = { config = { "\27LJ\2\n<\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\19nvim-autopairs\frequire\0" }, loaded = true, @@ -235,6 +245,10 @@ _G.packer_plugins = { } time([[Defining packer_plugins]], false) +-- Config for: nvim-autopairs +time([[Config for nvim-autopairs]], true) +try_loadstring("\27LJ\2\n<\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\19nvim-autopairs\frequire\0", "config", "nvim-autopairs") +time([[Config for nvim-autopairs]], false) -- Config for: telescope.nvim time([[Config for telescope.nvim]], true) try_loadstring("\27LJ\2\n1\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\22plugins/telescope\frequire\0", "config", "telescope.nvim") @@ -243,10 +257,6 @@ time([[Config for telescope.nvim]], false) time([[Config for gitsigns.nvim]], true) try_loadstring("\27LJ\2\n6\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\rgitsigns\frequire\0", "config", "gitsigns.nvim") time([[Config for gitsigns.nvim]], false) --- Config for: nvim-autopairs -time([[Config for nvim-autopairs]], true) -try_loadstring("\27LJ\2\n<\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\19nvim-autopairs\frequire\0", "config", "nvim-autopairs") -time([[Config for nvim-autopairs]], false) if should_profile then save_profiles() end end)