From 6826ae4fa6d1572fac4c91a39da515b40714c19f Mon Sep 17 00:00:00 2001 From: Tovi Jaeschke-Rogers Date: Tue, 19 Sep 2023 20:11:18 +0930 Subject: [PATCH] Update colorscheme, add harpoon and undotree --- .config/nvim/lua/.luarc.json | 6 + .config/nvim/lua/config/dashboard.lua | 10 +- .config/nvim/lua/config/general/init.lua | 1 + .config/nvim/lua/config/general/options.lua | 2 + .config/nvim/lua/config/general/remaps.lua | 115 ++++++-------- .config/nvim/lua/config/go.lua | 168 ++++++++++---------- .config/nvim/lua/config/harpoon.lua | 15 ++ .config/nvim/lua/config/lsp.lua | 23 ++- .config/nvim/lua/config/telescope.lua | 31 +++- .config/nvim/lua/config/undotree.lua | 1 + .config/nvim/lua/packer-plugins.lua | 137 +++++++++------- 11 files changed, 287 insertions(+), 222 deletions(-) create mode 100644 .config/nvim/lua/.luarc.json create mode 100644 .config/nvim/lua/config/harpoon.lua create mode 100644 .config/nvim/lua/config/undotree.lua diff --git a/.config/nvim/lua/.luarc.json b/.config/nvim/lua/.luarc.json new file mode 100644 index 0000000..6afb79e --- /dev/null +++ b/.config/nvim/lua/.luarc.json @@ -0,0 +1,6 @@ +{ + "diagnostics.globals": [ + "vim", + "use" + ] +} \ No newline at end of file diff --git a/.config/nvim/lua/config/dashboard.lua b/.config/nvim/lua/config/dashboard.lua index 6ddc13f..32e0663 100644 --- a/.config/nvim/lua/config/dashboard.lua +++ b/.config/nvim/lua/config/dashboard.lua @@ -6,31 +6,33 @@ require('dashboard').setup({ }, shortcut = { { - icon = '➔ ', desc = 'New', action = 'enew', key = 'e', }, { - icon = '⟳ ', desc = 'Update', action = 'PackerSync', key = 'u', }, { - icon = '🗍 ', icon_hl = '@variable', desc = 'Files', action = 'Telescope find_files', key = 'f', }, { - icon = '☊ ', icon_hl = '@variable', desc = 'Git Files', action = 'Telescope git_files', key = 'g', }, + { + icon_hl = '@variable', + desc = 'Quit', + action = 'quit', + key = 'q', + }, }, }, }) diff --git a/.config/nvim/lua/config/general/init.lua b/.config/nvim/lua/config/general/init.lua index 7a87ec3..495f387 100644 --- a/.config/nvim/lua/config/general/init.lua +++ b/.config/nvim/lua/config/general/init.lua @@ -1,3 +1,4 @@ + require('config.general.options') require('config.general.remaps') require('config.general.autocmd') diff --git a/.config/nvim/lua/config/general/options.lua b/.config/nvim/lua/config/general/options.lua index 326f293..fed6e33 100644 --- a/.config/nvim/lua/config/general/options.lua +++ b/.config/nvim/lua/config/general/options.lua @@ -41,3 +41,5 @@ vim.cmd[[let g:pdv_cfg_autoEndFunction = 0]] vim.opt.splitbelow = true vim.opt.splitright = true + +vim.opt.termguicolors = true diff --git a/.config/nvim/lua/config/general/remaps.lua b/.config/nvim/lua/config/general/remaps.lua index 270fd6f..20d54ea 100644 --- a/.config/nvim/lua/config/general/remaps.lua +++ b/.config/nvim/lua/config/general/remaps.lua @@ -1,80 +1,63 @@ local options = { noremap = true } --- Source init.lua -vim.api.nvim_set_keymap('n', - 'so', - 'source ~/.config/nvim/init.lua', - options -) - -- Don't copy "c" changes to primary register -vim.api.nvim_set_keymap('n', 'c', '"_c', options) +vim.keymap.set('n', 'c', '"_c', options) -- Easily open splits -vim.api.nvim_set_keymap('n', 'hs', 'split', options) -vim.api.nvim_set_keymap('n', 'vs', 'vsplit', options) +vim.keymap.set('n', 'hs', 'split', options) +vim.keymap.set('n', 'vs', 'vsplit', options) -- Copy the entire file -vim.api.nvim_set_keymap('n', 'y', 'ggyG', options) +vim.keymap.set('n', 'y', 'ggyG', options) --- Manually store session -vim.api.nvim_set_keymap( - 'n', - '', - 'mksession! ~/.cache//nvim/session/manual_session.vim', - options -) --- Restore manually stored session -vim.api.nvim_set_keymap('n', - '', - 'source ~/.cache/nvim/session/manual_session.vim', - options -) --- Restore auto saved session created on exit -vim.api.nvim_set_keymap('n', - '', - 'source ~/.cache/nvim/session/shutdown_session.vim', - options - ) +vim.keymap.set('n', '', function() vim.cmd('mksession! ~/.cache//nvim/session/manual_session.vim') end, options) +vim.keymap.set('n', '', function() vim.cmd('source ~/.cache/nvim/session/manual_session.vim') end, options) +vim.keymap.set('n', '', function() vim.cmd('source ~/.cache/nvim/session/shutdown_session.vim') end, options) -- Navigating with guides -vim.api.nvim_set_keymap('n', - '', - '/<++>"_c4l', - options -) -vim.api.nvim_set_keymap('v', - '', - '/<++>"_c4l', - options) +vim.keymap.set('n', '', '/<++>"_c4l', options) +vim.keymap.set('v', '', '/<++>"_c4l', options) -- Spell-check -vim.api.nvim_set_keymap('n', - 'o', - 'setlocal spell! spelllang=en_au', - options) +vim.keymap.set('n', 'o', 'setlocal spell! spelllang=en_au', options) -- Keep highlight when indenting -vim.api.nvim_set_keymap('v', '<', '', '>gv', options) - -vim.api.nvim_set_keymap('n', '', '1gt', options) -vim.api.nvim_set_keymap('n', '', '2gt', options) -vim.api.nvim_set_keymap('n', '', '3gt', options) -vim.api.nvim_set_keymap('n', '', '4gt', options) -vim.api.nvim_set_keymap('n', '', '5gt', options) -vim.api.nvim_set_keymap('n', '', '6gt', options) -vim.api.nvim_set_keymap('n', '', '7gt', options) -vim.api.nvim_set_keymap('n', '', '8gt', options) -vim.api.nvim_set_keymap('n', '', '9gt', options) - -vim.api.nvim_set_keymap('n', 'gp', 'Git push', options) -vim.api.nvim_set_keymap('n', 'gP', 'Git pull', options) -vim.api.nvim_set_keymap('n', 'ga', 'Git add .', options) -vim.api.nvim_set_keymap('n', 'gA', 'Git add', options) -vim.api.nvim_set_keymap('n', 'gc', 'Git commit', options) -vim.api.nvim_set_keymap('n', 'gC', 'Git commit -a', options) - -vim.api.nvim_set_keymap("x", "p", "\"_dP", options) -vim.api.nvim_set_keymap("n", "d", "\"_d", options) -vim.api.nvim_set_keymap("v", "d", "\"_d", options) +vim.keymap.set('v', '<', '', '>gv', options) + +vim.keymap.set('n', '', '1gt', options) +vim.keymap.set('n', '', '2gt', options) +vim.keymap.set('n', '', '3gt', options) +vim.keymap.set('n', '', '4gt', options) +vim.keymap.set('n', '', '5gt', options) +vim.keymap.set('n', '', '6gt', options) +vim.keymap.set('n', '', '7gt', options) +vim.keymap.set('n', '', '8gt', options) +vim.keymap.set('n', '', '9gt', options) + +vim.keymap.set('n', 'gp', 'Git push', options) +vim.keymap.set('n', 'gP', 'Git pull', options) +vim.keymap.set('n', 'ga', 'Git add .', options) +vim.keymap.set('n', 'gA', 'Git add', options) +vim.keymap.set('n', 'gc', 'Git commit', options) +vim.keymap.set('n', 'gC', 'Git commit -a', options) + +vim.keymap.set("x", "p", "\"_dP", options) +vim.keymap.set("n", "d", "\"_d", options) +vim.keymap.set("v", "d", "\"_d", options) + +vim.keymap.set('v', 'J', ":m '>+1gv=gv") +vim.keymap.set('v', 'K', ":m '<-2gv=gv") + +vim.keymap.set('n', '', 'zz') +vim.keymap.set('n', '', 'zz') + +vim.keymap.set('n', 'n', 'nzzzv') +vim.keymap.set('n', 'N', 'Nzzzv') + +vim.keymap.set('n', '', 'cnextzz') +vim.keymap.set('n', '', 'cprevzz') +vim.keymap.set('n', 'k', 'lnextzz') +vim.keymap.set('n', 'j', 'cprevzz') + +vim.keymap.set("n", "s", [[:%s/\<\>//gI]]) diff --git a/.config/nvim/lua/config/go.lua b/.config/nvim/lua/config/go.lua index bd41a3b..97f427d 100644 --- a/.config/nvim/lua/config/go.lua +++ b/.config/nvim/lua/config/go.lua @@ -1,88 +1,88 @@ require('go').setup({ - disable_defaults = false, -- true|false when true set false to all boolean settings and replace all table - -- settings with {} - go='go', -- go command, can be go[default] or go1.18beta1 - goimport='gopls', -- goimport command, can be gopls[default] or goimport - fillstruct = 'gopls', -- can be nil (use fillstruct, slower) and gopls - gofmt = 'gofumpt', --gofmt cmd, - max_line_len = 128, -- max line length in golines format, Target maximum line length for golines - tag_transform = false, -- can be transform option("snakecase", "camelcase", etc) check gomodifytags for details and more options - gotests_template = "", -- sets gotests -template parameter (check gotests for details) - gotests_template_dir = "", -- sets gotests -template_dir parameter (check gotests for details) - comment_placeholder = '' , -- comment_placeholder your cool placeholder e.g. ﳑ     - icons = {breakpoint = '🧘', currentpos = '🏃'}, -- setup to `false` to disable icons setup - verbose = false, -- output loginf in messages - lsp_cfg = false, -- true: use non-default gopls setup specified in go/lsp.lua - -- false: do nothing - -- if lsp_cfg is a table, merge table with with non-default gopls setup in go/lsp.lua, e.g. - -- lsp_cfg = {settings={gopls={matcher='CaseInsensitive', ['local'] = 'your_local_module_path', gofumpt = true }}} - lsp_gofumpt = false, -- true: set default gofmt in gopls format to gofumpt - lsp_on_attach = nil, -- nil: use on_attach function defined in go/lsp.lua, - -- when lsp_cfg is true - -- if lsp_on_attach is a function: use this function as on_attach function for gopls - lsp_keymaps = true, -- set to false to disable gopls/lsp keymap - lsp_codelens = true, -- set to false to disable codelens, true by default, you can use a function - -- function(bufnr) - -- vim.api.nvim_buf_set_keymap(bufnr, "n", "F", "lua vim.lsp.buf.formatting()", {noremap=true, silent=true}) - -- end - -- to setup a table of codelens - lsp_diag_hdlr = true, -- hook lsp diag handler - -- virtual text setup - lsp_diag_virtual_text = { space = 0, prefix = "" }, - lsp_diag_signs = true, - lsp_diag_update_in_insert = false, - lsp_document_formatting = true, - -- set to true: use gopls to format - -- false if you want to use other formatter tool(e.g. efm, nulls) - lsp_inlay_hints = { - enable = true, - -- Only show inlay hints for the current line - only_current_line = false, - -- Event which triggers a refersh of the inlay hints. - -- You can make this "CursorMoved" or "CursorMoved,CursorMovedI" but - -- not that this may cause higher CPU usage. - -- This option is only respected when only_current_line and - -- autoSetHints both are true. - only_current_line_autocmd = "CursorHold", - -- whether to show variable name before type hints with the inlay hints or not - -- default: false - show_variable_name = true, - -- prefix for parameter hints - parameter_hints_prefix = " ", - show_parameter_hints = true, - -- prefix for all the other hints (type, chaining) - other_hints_prefix = "=> ", - -- whether to align to the lenght of the longest line in the file - max_len_align = false, - -- padding from the left if max_len_align is true - max_len_align_padding = 1, - -- whether to align to the extreme right or not - right_align = false, - -- padding from the right if right_align is true - right_align_padding = 6, - -- The color of the hints - highlight = "Comment", - }, - gopls_cmd = nil, -- if you need to specify gopls path and cmd, e.g {"/home/user/lsp/gopls", "-logfile","/var/log/gopls.log" } - gopls_remote_auto = true, -- add -remote=auto to gopls - gocoverage_sign = "█", - sign_priority = 5, -- change to a higher number to override other signs - dap_debug = true, -- set to false to disable dap - dap_debug_keymap = true, -- true: use keymap for debugger defined in go/dap.lua - -- false: do not use keymap in go/dap.lua. you must define your own. - -- windows: use visual studio keymap - dap_debug_gui = true, -- set to true to enable dap gui, highly recommand - dap_debug_vt = true, -- set to true to enable dap virtual text - -- build_tags = "tag1,tag2", -- set default build tags - textobjects = true, -- enable default text jobects through treesittter-text-objects - test_runner = 'go', -- one of {`go`, `richgo`, `dlv`, `ginkgo`} - verbose_tests = true, -- set to add verbose flag to tests - run_in_floaterm = false, -- set to true to run in float window. :GoTermClose closes the floatterm - -- float term recommand if you use richgo/ginkgo with terminal color + disable_defaults = false, -- true|false when true set false to all boolean settings and replace all table + -- settings with {} + go = 'go', -- go command, can be go[default] or go1.18beta1 + goimport = 'gopls', -- goimport command, can be gopls[default] or goimport + fillstruct = 'gopls', -- can be nil (use fillstruct, slower) and gopls + gofmt = 'gofumpt', --gofmt cmd, + max_line_len = 128, -- max line length in golines format, Target maximum line length for golines + tag_transform = false, -- can be transform option("snakecase", "camelcase", etc) check gomodifytags for details and more options + gotests_template = "", -- sets gotests -template parameter (check gotests for details) + gotests_template_dir = "", -- sets gotests -template_dir parameter (check gotests for details) + comment_placeholder = '' , -- comment_placeholder your cool placeholder e.g. ﳑ     + icons = {breakpoint = '🧘', currentpos = '🏃'}, -- setup to `false` to disable icons setup + verbose = false, -- output loginf in messages + lsp_cfg = false, -- true: use non-default gopls setup specified in go/lsp.lua + -- false: do nothing + -- if lsp_cfg is a table, merge table with with non-default gopls setup in go/lsp.lua, e.g. + -- lsp_cfg = {settings={gopls={matcher='CaseInsensitive', ['local'] = 'your_local_module_path', gofumpt = true }}} + lsp_gofumpt = false, -- true: set default gofmt in gopls format to gofumpt + lsp_on_attach = nil, -- nil: use on_attach function defined in go/lsp.lua, + -- when lsp_cfg is true + -- if lsp_on_attach is a function: use this function as on_attach function for gopls + lsp_keymaps = true, -- set to false to disable gopls/lsp keymap + lsp_codelens = true, -- set to false to disable codelens, true by default, you can use a function + -- function(bufnr) + -- vim.api.nvim_buf_set_keymap(bufnr, "n", "F", "lua vim.lsp.buf.formatting()", {noremap=true, silent=true}) + -- end + -- to setup a table of codelens + lsp_diag_hdlr = true, -- hook lsp diag handler + -- virtual text setup + lsp_diag_virtual_text = { space = 0, prefix = "" }, + lsp_diag_signs = true, + lsp_diag_update_in_insert = false, + lsp_document_formatting = true, + -- set to true: use gopls to format + -- false if you want to use other formatter tool(e.g. efm, nulls) + lsp_inlay_hints = { + enable = true, + -- Only show inlay hints for the current line + only_current_line = false, + -- Event which triggers a refersh of the inlay hints. + -- You can make this "CursorMoved" or "CursorMoved,CursorMovedI" but + -- not that this may cause higher CPU usage. + -- This option is only respected when only_current_line and + -- autoSetHints both are true. + only_current_line_autocmd = "CursorHold", + -- whether to show variable name before type hints with the inlay hints or not + -- default: false + show_variable_name = true, + -- prefix for parameter hints + parameter_hints_prefix = " ", + show_parameter_hints = true, + -- prefix for all the other hints (type, chaining) + other_hints_prefix = "=> ", + -- whether to align to the lenght of the longest line in the file + max_len_align = false, + -- padding from the left if max_len_align is true + max_len_align_padding = 1, + -- whether to align to the extreme right or not + right_align = false, + -- padding from the right if right_align is true + right_align_padding = 6, + -- The color of the hints + highlight = "Comment", + }, + gopls_cmd = nil, -- if you need to specify gopls path and cmd, e.g {"/home/user/lsp/gopls", "-logfile","/var/log/gopls.log" } + gopls_remote_auto = true, -- add -remote=auto to gopls + gocoverage_sign = "█", + sign_priority = 5, -- change to a higher number to override other signs + dap_debug = true, -- set to false to disable dap + dap_debug_keymap = true, -- true: use keymap for debugger defined in go/dap.lua + -- false: do not use keymap in go/dap.lua. you must define your own. + -- windows: use visual studio keymap + dap_debug_gui = true, -- set to true to enable dap gui, highly recommand + dap_debug_vt = true, -- set to true to enable dap virtual text + -- build_tags = "tag1,tag2", -- set default build tags + textobjects = true, -- enable default text jobects through treesittter-text-objects + test_runner = 'go', -- one of {`go`, `richgo`, `dlv`, `ginkgo`} + verbose_tests = true, -- set to add verbose flag to tests + run_in_floaterm = false, -- set to true to run in float window. :GoTermClose closes the floatterm + -- float term recommand if you use richgo/ginkgo with terminal color - trouble = false, -- true: use trouble to open quickfix - test_efm = false, -- errorfomat for quickfix, default mix mode, set to true will be efm only - luasnip = false, -- enable included luasnip snippets. you can also disable while add lua/snips folder to luasnip load - -- Do not enable this if you already added the path, that will duplicate the entries + trouble = false, -- true: use trouble to open quickfix + test_efm = false, -- errorfomat for quickfix, default mix mode, set to true will be efm only + luasnip = false, -- enable included luasnip snippets. you can also disable while add lua/snips folder to luasnip load + -- Do not enable this if you already added the path, that will duplicate the entries }) diff --git a/.config/nvim/lua/config/harpoon.lua b/.config/nvim/lua/config/harpoon.lua new file mode 100644 index 0000000..15fe3df --- /dev/null +++ b/.config/nvim/lua/config/harpoon.lua @@ -0,0 +1,15 @@ +local mark = require("harpoon.mark") +local ui = require("harpoon.ui") + +vim.keymap.set('n', 'a', mark.add_file) +vim.keymap.set('n', 'th', mark.toggle_file) +vim.keymap.set('n', '', ui.toggle_quick_menu) + +vim.keymap.set('n', '', function () ui.nav_file(1) end) +vim.keymap.set('n', '', function () ui.nav_file(2) end) +vim.keymap.set('n', '', function () ui.nav_file(3) end) +vim.keymap.set('n', '', function () ui.nav_file(4) end) + + +vim.keymap.set('n', '', function () ui.nav_prev() end) +vim.keymap.set('n', '', function () ui.nav_next() end) diff --git a/.config/nvim/lua/config/lsp.lua b/.config/nvim/lua/config/lsp.lua index 89997ad..7b86798 100644 --- a/.config/nvim/lua/config/lsp.lua +++ b/.config/nvim/lua/config/lsp.lua @@ -1,7 +1,8 @@ local lsp = require('lsp-zero') -lsp.preset('recommended') local luasnip = require("luasnip") +lsp.preset('recommended') + lsp.ensure_installed({ 'lua_ls', 'tsserver', @@ -80,11 +81,24 @@ local cmp_mappings = lsp.defaults.cmp_mappings({ lsp.setup_nvim_cmp({ mapping = cmp_mappings, + completion = { + completeopt = "menu,menuone", + }, window = { + completion = { + side_padding = 1, + winhighlight = "NormalFloat:NormalFloat,FloatBorder:TelescopeBorder", + scrollbar = false, + }, documentation = { border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" }, winhighlight = "NormalFloat:NormalFloat,FloatBorder:TelescopeBorder", }, + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, }, }) @@ -99,8 +113,13 @@ lsp.on_attach(function(client, bufnr) vim.keymap.set("n", "[e", function () vim.diagnostic.goto_prev({severity = vim.diagnostic.severity.ERROR}) end, opts) vim.keymap.set("n", "]e", function () vim.diagnostic.goto_next({severity = vim.diagnostic.severity.ERROR}) end, opts) + vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts) + + vim.keymap.set("n", "vws", function() vim.lsp.buf.workspace_symbol() end, opts) + vim.keymap.set("n", "vd", function() vim.diagnostic.open_float() end, opts) + vim.keymap.set("n", "rn", vim.lsp.buf.rename, opts) - vim.keymap.set("n", "ka", vim.lsp.buf.code_action, opts) + vim.keymap.set("n", "K", vim.lsp.buf.code_action, opts) vim.keymap.set("n", "of", vim.diagnostic.open_float, opts) vim.keymap.set("n", "gh", vim.lsp.buf.signature_help, opts) diff --git a/.config/nvim/lua/config/telescope.lua b/.config/nvim/lua/config/telescope.lua index f60177d..b160909 100644 --- a/.config/nvim/lua/config/telescope.lua +++ b/.config/nvim/lua/config/telescope.lua @@ -17,6 +17,28 @@ require('telescope').setup({ grep_previewer = previewers.vim_buffer_vimgrep.new, qflist_previewer = previewers.vim_buffer_qflist.new, + initial_mode = "insert", + selection_strategy = "reset", + sorting_strategy = "ascending", + layout_strategy = "horizontal", + layout_config = { + horizontal = { + prompt_position = "top", + preview_width = 0.55, + results_width = 0.8, + }, + vertical = { + mirror = false, + }, + width = 0.87, + height = 0.80, + preview_cutoff = 120, + }, + path_display = { "truncate" }, + winblend = 0, + border = {}, + borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, + mappings = { i = { [''] = false, @@ -26,8 +48,6 @@ require('telescope').setup({ }, }) -local M = {} - function git_branches () builtin.git_branches({ attach_mappings = function(_, map) @@ -64,10 +84,9 @@ end, options) vim.keymap.set('n', 'fb', builtin.buffers, options) vim.keymap.set('n', 'fo', builtin.oldfiles, options) -vim.keymap.set('n', 'gr', builtin.lsp_references, options) -vim.keymap.set("n", 'gd', builtin.lsp_definitions, options) -vim.keymap.set("n", 'gi', builtin.lsp_implementations, options) -vim.keymap.set("n", 'gT', builtin.lsp_type_definitions, options) +vim.keymap.set('n', 'gr', builtin.lsp_references, options) +vim.keymap.set("n", 'gi', builtin.lsp_implementations, options) +vim.keymap.set("n", 'gT', builtin.lsp_type_definitions, options) vim.keymap.set('n', 'm', builtin.marks, options) vim.keymap.set('n', 'ch', builtin.command_history, options) diff --git a/.config/nvim/lua/config/undotree.lua b/.config/nvim/lua/config/undotree.lua new file mode 100644 index 0000000..a346462 --- /dev/null +++ b/.config/nvim/lua/config/undotree.lua @@ -0,0 +1 @@ +vim.keymap.set('n', 'u', vim.cmd.UndotreeToggle) diff --git a/.config/nvim/lua/packer-plugins.lua b/.config/nvim/lua/packer-plugins.lua index 9bd2074..5f9ff47 100644 --- a/.config/nvim/lua/packer-plugins.lua +++ b/.config/nvim/lua/packer-plugins.lua @@ -2,16 +2,6 @@ return require('packer').startup(function() -- Packer can manage itself use { 'wbthomason/packer.nvim' } - -- colorschemes - use { - 'gruvbox-community/gruvbox', - config = function () - vim.cmd [[colorscheme gruvbox]] - end - - } - use { 'bluz71/vim-moonfly-colors' } - use { 'github/copilot.vim', config = function() @@ -19,15 +9,6 @@ return require('packer').startup(function() end } - use { - 'ojroques/nvim-osc52', - config = function() - require('config.osc52') - end - } - - use { 'SirVer/ultisnips' } - use { 'VonHeikemen/lsp-zero.nvim', requires = { @@ -63,18 +44,6 @@ return require('packer').startup(function() use { 'shumphrey/fugitive-gitlab.vim' } - use { - "AckslD/nvim-neoclip.lua", - requires = { - {'kkharji/sqlite.lua', module = 'sqlite'}, - {'nvim-telescope/telescope.nvim'}, - }, - config = function() - require('config.neoclip') - end, - } - - use { 'nvim-lua/popup.nvim' } use { 'nvim-lua/plenary.nvim' } use { @@ -86,16 +55,21 @@ return require('packer').startup(function() use { 'nvim-telescope/telescope-fzy-native.nvim'} - use { - 'Rican7/php-doc-modded', - config = function() - require('config.php-doc') + use { 'nvim-treesitter/nvim-treesitter' } + + use { + 'theprimeagen/harpoon', + config = function () + require('config.harpoon') end } - use { 'dart-lang/dart-vim-plugin' } - - use { 'nvim-treesitter/nvim-treesitter' } + use { + 'mbbill/undotree', + config = function () + require('config.undotree') + end + } use { 'lewis6991/gitsigns.nvim', @@ -116,14 +90,6 @@ return require('packer').startup(function() end } - use { 'ray-x/guihua.lua' } - use { - 'ray-x/go.nvim', - config = function() - require('config.go') - end - } - use { 'aserowy/tmux.nvim', config = function () @@ -132,12 +98,12 @@ return require('packer').startup(function() } use { - "nvim-neo-tree/neo-tree.nvim", - branch = "v2.x", + 'nvim-neo-tree/neo-tree.nvim', + branch = 'v2.x', requires = { - "nvim-lua/plenary.nvim", - "kyazdani42/nvim-web-devicons", - "MunifTanjim/nui.nvim", + 'nvim-lua/plenary.nvim', + 'kyazdani42/nvim-web-devicons', + 'MunifTanjim/nui.nvim', }, config = function () require('config.nvim-neo-tree') @@ -154,14 +120,14 @@ return require('packer').startup(function() } use { - "nvim-neotest/neotest", + 'nvim-neotest/neotest', requires = { - "nvim-lua/plenary.nvim", - "nvim-treesitter/nvim-treesitter", - "antoinemadec/FixCursorHold.nvim", + 'nvim-lua/plenary.nvim', + 'nvim-treesitter/nvim-treesitter', + 'antoinemadec/FixCursorHold.nvim', -- Adapters - "olimorris/neotest-phpunit", - "nvim-neotest/neotest-go", + 'olimorris/neotest-phpunit', + 'nvim-neotest/neotest-go', }, config = function() require('config.neotest') @@ -181,18 +147,28 @@ return require('packer').startup(function() end } + -- CMD and search at the top use { 'folke/noice.nvim', requires = { - -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries - "MunifTanjim/nui.nvim", - "rcarriga/nvim-notify", + 'MunifTanjim/nui.nvim', + 'rcarriga/nvim-notify', }, config = function () require('config.noice') end } + use { + 'rcarriga/nvim-notify', + config = function () + require('notify').setup({ + background_color = '#000000' + }) + end + } + + -- DB manager use { 'kristijanhusak/vim-dadbod-ui', requires = { @@ -202,4 +178,45 @@ return require('packer').startup(function() require('config.dadbod') end } + + -- Copy to clipboard over ssh + use { + 'ojroques/nvim-osc52', + config = function() + require('config.osc52') + end + } + + -- Programming language specifics + use { 'dart-lang/dart-vim-plugin' } + use { 'ray-x/guihua.lua' } + use { + 'ray-x/go.nvim', + config = function() + require('config.go') + end + } + + -- Colorschemes + use { + 'gruvbox-community/gruvbox', + -- config = function () + -- vim.cmd('colorscheme gruvbox') + -- end + } + + use { + 'folke/tokyonight.nvim', + -- config = function () + -- vim.cmd('colorscheme tokyonight-night') + -- end + } + + use { + 'catppuccin/nvim', + as = 'catppuccin', + config = function () + vim.cmd('colorscheme catppuccin-mocha') + end + } end)