Browse Source

Update colorscheme, add harpoon and undotree

master
parent
commit
6826ae4fa6
11 changed files with 287 additions and 222 deletions
  1. +6
    -0
      .config/nvim/lua/.luarc.json
  2. +6
    -4
      .config/nvim/lua/config/dashboard.lua
  3. +1
    -0
      .config/nvim/lua/config/general/init.lua
  4. +2
    -0
      .config/nvim/lua/config/general/options.lua
  5. +49
    -66
      .config/nvim/lua/config/general/remaps.lua
  6. +84
    -84
      .config/nvim/lua/config/go.lua
  7. +15
    -0
      .config/nvim/lua/config/harpoon.lua
  8. +21
    -2
      .config/nvim/lua/config/lsp.lua
  9. +25
    -6
      .config/nvim/lua/config/telescope.lua
  10. +1
    -0
      .config/nvim/lua/config/undotree.lua
  11. +77
    -60
      .config/nvim/lua/packer-plugins.lua

+ 6
- 0
.config/nvim/lua/.luarc.json View File

@ -0,0 +1,6 @@
{
"diagnostics.globals": [
"vim",
"use"
]
}

+ 6
- 4
.config/nvim/lua/config/dashboard.lua View File

@ -6,31 +6,33 @@ require('dashboard').setup({
}, },
shortcut = { shortcut = {
{ {
icon = '',
desc = 'New', desc = 'New',
action = 'enew', action = 'enew',
key = 'e', key = 'e',
}, },
{ {
icon = '',
desc = 'Update', desc = 'Update',
action = 'PackerSync', action = 'PackerSync',
key = 'u', key = 'u',
}, },
{ {
icon = '🗍 ',
icon_hl = '@variable', icon_hl = '@variable',
desc = 'Files', desc = 'Files',
action = 'Telescope find_files', action = 'Telescope find_files',
key = 'f', key = 'f',
}, },
{ {
icon = '',
icon_hl = '@variable', icon_hl = '@variable',
desc = 'Git Files', desc = 'Git Files',
action = 'Telescope git_files', action = 'Telescope git_files',
key = 'g', key = 'g',
}, },
{
icon_hl = '@variable',
desc = 'Quit',
action = 'quit',
key = 'q',
},
}, },
}, },
}) })

+ 1
- 0
.config/nvim/lua/config/general/init.lua View File

@ -1,3 +1,4 @@
require('config.general.options') require('config.general.options')
require('config.general.remaps') require('config.general.remaps')
require('config.general.autocmd') require('config.general.autocmd')

+ 2
- 0
.config/nvim/lua/config/general/options.lua View File

@ -41,3 +41,5 @@ vim.cmd[[let g:pdv_cfg_autoEndFunction = 0]]
vim.opt.splitbelow = true vim.opt.splitbelow = true
vim.opt.splitright = true vim.opt.splitright = true
vim.opt.termguicolors = true

+ 49
- 66
.config/nvim/lua/config/general/remaps.lua View File

@ -1,80 +1,63 @@
local options = { noremap = true } local options = { noremap = true }
-- Source init.lua
vim.api.nvim_set_keymap('n',
'<leader>so',
'<cmd>source ~/.config/nvim/init.lua<CR>',
options
)
-- Don't copy "c" changes to primary register -- 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 -- Easily open splits
vim.api.nvim_set_keymap('n', '<leader>hs', '<cmd>split<cr>', options)
vim.api.nvim_set_keymap('n', '<leader>vs', '<cmd>vsplit<cr>', options)
vim.keymap.set('n', '<leader>hs', '<cmd>split<cr>', options)
vim.keymap.set('n', '<leader>vs', '<cmd>vsplit<cr>', options)
-- Copy the entire file -- Copy the entire file
vim.api.nvim_set_keymap('n', '<leader>y', 'ggyG<C-o>', options)
vim.keymap.set('n', '<leader>y', 'ggyG<C-o>', options)
-- Manually store session
vim.api.nvim_set_keymap(
'n',
'<F5>',
'<cmd>mksession! ~/.cache//nvim/session/manual_session.vim<CR>',
options
)
-- Restore manually stored session
vim.api.nvim_set_keymap('n',
'<F6>',
'<cmd>source ~/.cache/nvim/session/manual_session.vim<CR>',
options
)
-- Restore auto saved session created on exit
vim.api.nvim_set_keymap('n',
'<F7>',
'<cmd>source ~/.cache/nvim/session/shutdown_session.vim<CR>',
options
)
vim.keymap.set('n', '<F5>', function() vim.cmd('mksession! ~/.cache//nvim/session/manual_session.vim') end, options)
vim.keymap.set('n', '<F6>', function() vim.cmd('source ~/.cache/nvim/session/manual_session.vim') end, options)
vim.keymap.set('n', '<F7>', function() vim.cmd('source ~/.cache/nvim/session/shutdown_session.vim') end, options)
-- Navigating with guides -- Navigating with guides
vim.api.nvim_set_keymap('n',
'<leader><leader>',
'<Esc>/<++><Enter>"_c4l',
options
)
vim.api.nvim_set_keymap('v',
'<leader><leader>',
'<Esc>/<++><Enter>"_c4l',
options)
vim.keymap.set('n', '<leader><leader>', '<Esc>/<++><Enter>"_c4l', options)
vim.keymap.set('v', '<leader><leader>', '<Esc>/<++><Enter>"_c4l', options)
-- Spell-check -- Spell-check
vim.api.nvim_set_keymap('n',
'<leader>o',
'<cmd>setlocal spell! spelllang=en_au<cr>',
options)
vim.keymap.set('n', '<leader>o', '<cmd>setlocal spell! spelllang=en_au<cr>', options)
-- Keep highlight when indenting -- Keep highlight when indenting
vim.api.nvim_set_keymap('v', '<', '<gv', options)
vim.api.nvim_set_keymap('v', '>', '>gv', options)
vim.api.nvim_set_keymap('n', '<A-1>', '1gt', options)
vim.api.nvim_set_keymap('n', '<A-2>', '2gt', options)
vim.api.nvim_set_keymap('n', '<A-3>', '3gt', options)
vim.api.nvim_set_keymap('n', '<A-4>', '4gt', options)
vim.api.nvim_set_keymap('n', '<A-5>', '5gt', options)
vim.api.nvim_set_keymap('n', '<A-6>', '6gt', options)
vim.api.nvim_set_keymap('n', '<A-7>', '7gt', options)
vim.api.nvim_set_keymap('n', '<A-8>', '8gt', options)
vim.api.nvim_set_keymap('n', '<A-9>', '9gt', options)
vim.api.nvim_set_keymap('n', '<leader>gp', '<cmd>Git push<CR>', options)
vim.api.nvim_set_keymap('n', '<leader>gP', '<cmd>Git pull<CR>', options)
vim.api.nvim_set_keymap('n', '<leader>ga', '<cmd>Git add .<CR>', options)
vim.api.nvim_set_keymap('n', '<leader>gA', '<cmd>Git add<CR>', options)
vim.api.nvim_set_keymap('n', '<leader>gc', '<cmd>Git commit<CR>', options)
vim.api.nvim_set_keymap('n', '<leader>gC', '<cmd>Git commit -a<CR>', options)
vim.api.nvim_set_keymap("x", "<leader>p", "\"_dP", options)
vim.api.nvim_set_keymap("n", "<leader>d", "\"_d", options)
vim.api.nvim_set_keymap("v", "<leader>d", "\"_d", options)
vim.keymap.set('v', '<', '<gv', options)
vim.keymap.set('v', '>', '>gv', options)
vim.keymap.set('n', '<A-1>', '1gt', options)
vim.keymap.set('n', '<A-2>', '2gt', options)
vim.keymap.set('n', '<A-3>', '3gt', options)
vim.keymap.set('n', '<A-4>', '4gt', options)
vim.keymap.set('n', '<A-5>', '5gt', options)
vim.keymap.set('n', '<A-6>', '6gt', options)
vim.keymap.set('n', '<A-7>', '7gt', options)
vim.keymap.set('n', '<A-8>', '8gt', options)
vim.keymap.set('n', '<A-9>', '9gt', options)
vim.keymap.set('n', '<leader>gp', '<cmd>Git push<CR>', options)
vim.keymap.set('n', '<leader>gP', '<cmd>Git pull<CR>', options)
vim.keymap.set('n', '<leader>ga', '<cmd>Git add .<CR>', options)
vim.keymap.set('n', '<leader>gA', '<cmd>Git add<CR>', options)
vim.keymap.set('n', '<leader>gc', '<cmd>Git commit<CR>', options)
vim.keymap.set('n', '<leader>gC', '<cmd>Git commit -a<CR>', options)
vim.keymap.set("x", "<leader>p", "\"_dP", options)
vim.keymap.set("n", "<leader>d", "\"_d", options)
vim.keymap.set("v", "<leader>d", "\"_d", options)
vim.keymap.set('v', 'J', ":m '>+1<CR>gv=gv")
vim.keymap.set('v', 'K', ":m '<-2<CR>gv=gv")
vim.keymap.set('n', '<C-d>', '<C-d>zz')
vim.keymap.set('n', '<C-u>', '<C-u>zz')
vim.keymap.set('n', 'n', 'nzzzv')
vim.keymap.set('n', 'N', 'Nzzzv')
vim.keymap.set('n', '<C-k>', '<cmd>cnext<CR>zz')
vim.keymap.set('n', '<C-j>', '<cmd>cprev<CR>zz')
vim.keymap.set('n', '<leader>k', '<cmd>lnext<CR>zz')
vim.keymap.set('n', '<leader>j', '<cmd>cprev<CR>zz')
vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])

+ 84
- 84
.config/nvim/lua/config/go.lua View File

@ -1,88 +1,88 @@
require('go').setup({ 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", "<space>F", "<cmd>lua vim.lsp.buf.formatting()<CR>", {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", "<space>F", "<cmd>lua vim.lsp.buf.formatting()<CR>", {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
}) })

+ 15
- 0
.config/nvim/lua/config/harpoon.lua View File

@ -0,0 +1,15 @@
local mark = require("harpoon.mark")
local ui = require("harpoon.ui")
vim.keymap.set('n', '<leader>a', mark.add_file)
vim.keymap.set('n', '<leader>th', mark.toggle_file)
vim.keymap.set('n', '<C-e>', ui.toggle_quick_menu)
vim.keymap.set('n', '<C-h>', function () ui.nav_file(1) end)
vim.keymap.set('n', '<C-t>', function () ui.nav_file(2) end)
vim.keymap.set('n', '<C-n>', function () ui.nav_file(3) end)
vim.keymap.set('n', '<C-s>', function () ui.nav_file(4) end)
vim.keymap.set('n', '<C-,>', function () ui.nav_prev() end)
vim.keymap.set('n', '<C-.>', function () ui.nav_next() end)

+ 21
- 2
.config/nvim/lua/config/lsp.lua View File

@ -1,7 +1,8 @@
local lsp = require('lsp-zero') local lsp = require('lsp-zero')
lsp.preset('recommended')
local luasnip = require("luasnip") local luasnip = require("luasnip")
lsp.preset('recommended')
lsp.ensure_installed({ lsp.ensure_installed({
'lua_ls', 'lua_ls',
'tsserver', 'tsserver',
@ -80,11 +81,24 @@ local cmp_mappings = lsp.defaults.cmp_mappings({
lsp.setup_nvim_cmp({ lsp.setup_nvim_cmp({
mapping = cmp_mappings, mapping = cmp_mappings,
completion = {
completeopt = "menu,menuone",
},
window = { window = {
completion = {
side_padding = 1,
winhighlight = "NormalFloat:NormalFloat,FloatBorder:TelescopeBorder",
scrollbar = false,
},
documentation = { documentation = {
border = { "", "", "", "", "", "", "", "" }, border = { "", "", "", "", "", "", "", "" },
winhighlight = "NormalFloat:NormalFloat,FloatBorder:TelescopeBorder", 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_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", "]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", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts)
vim.keymap.set("n", "<leader>vd", function() vim.diagnostic.open_float() end, opts)
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts) vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts)
vim.keymap.set("n", "<leader>ka", vim.lsp.buf.code_action, opts)
vim.keymap.set("n", "<leader>K", vim.lsp.buf.code_action, opts)
vim.keymap.set("n", "<leader>of", vim.diagnostic.open_float, opts) vim.keymap.set("n", "<leader>of", vim.diagnostic.open_float, opts)
vim.keymap.set("n", "gh", vim.lsp.buf.signature_help, opts) vim.keymap.set("n", "gh", vim.lsp.buf.signature_help, opts)


+ 25
- 6
.config/nvim/lua/config/telescope.lua View File

@ -17,6 +17,28 @@ require('telescope').setup({
grep_previewer = previewers.vim_buffer_vimgrep.new, grep_previewer = previewers.vim_buffer_vimgrep.new,
qflist_previewer = previewers.vim_buffer_qflist.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 = { mappings = {
i = { i = {
['<C-x>'] = false, ['<C-x>'] = false,
@ -26,8 +48,6 @@ require('telescope').setup({
}, },
}) })
local M = {}
function git_branches () function git_branches ()
builtin.git_branches({ builtin.git_branches({
attach_mappings = function(_, map) attach_mappings = function(_, map)
@ -64,10 +84,9 @@ end, options)
vim.keymap.set('n', '<leader>fb', builtin.buffers, options) vim.keymap.set('n', '<leader>fb', builtin.buffers, options)
vim.keymap.set('n', '<leader>fo', builtin.oldfiles, options) vim.keymap.set('n', '<leader>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', '<leader>gr', builtin.lsp_references, options)
vim.keymap.set("n", '<leader>gi', builtin.lsp_implementations, options)
vim.keymap.set("n", '<leader>gT', builtin.lsp_type_definitions, options)
vim.keymap.set('n', '<leader>m', builtin.marks, options) vim.keymap.set('n', '<leader>m', builtin.marks, options)
vim.keymap.set('n', '<leader>ch', builtin.command_history, options) vim.keymap.set('n', '<leader>ch', builtin.command_history, options)


+ 1
- 0
.config/nvim/lua/config/undotree.lua View File

@ -0,0 +1 @@
vim.keymap.set('n', '<leader>u', vim.cmd.UndotreeToggle)

+ 77
- 60
.config/nvim/lua/packer-plugins.lua View File

@ -2,16 +2,6 @@ return require('packer').startup(function()
-- Packer can manage itself -- Packer can manage itself
use { 'wbthomason/packer.nvim' } use { 'wbthomason/packer.nvim' }
-- colorschemes
use {
'gruvbox-community/gruvbox',
config = function ()
vim.cmd [[colorscheme gruvbox]]
end
}
use { 'bluz71/vim-moonfly-colors' }
use { use {
'github/copilot.vim', 'github/copilot.vim',
config = function() config = function()
@ -19,15 +9,6 @@ return require('packer').startup(function()
end end
} }
use {
'ojroques/nvim-osc52',
config = function()
require('config.osc52')
end
}
use { 'SirVer/ultisnips' }
use { use {
'VonHeikemen/lsp-zero.nvim', 'VonHeikemen/lsp-zero.nvim',
requires = { requires = {
@ -63,18 +44,6 @@ return require('packer').startup(function()
use { 'shumphrey/fugitive-gitlab.vim' } 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 { 'nvim-lua/plenary.nvim' }
use { use {
@ -86,16 +55,21 @@ return require('packer').startup(function()
use { 'nvim-telescope/telescope-fzy-native.nvim'} 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 end
} }
use { 'dart-lang/dart-vim-plugin' }
use { 'nvim-treesitter/nvim-treesitter' }
use {
'mbbill/undotree',
config = function ()
require('config.undotree')
end
}
use { use {
'lewis6991/gitsigns.nvim', 'lewis6991/gitsigns.nvim',
@ -116,14 +90,6 @@ return require('packer').startup(function()
end end
} }
use { 'ray-x/guihua.lua' }
use {
'ray-x/go.nvim',
config = function()
require('config.go')
end
}
use { use {
'aserowy/tmux.nvim', 'aserowy/tmux.nvim',
config = function () config = function ()
@ -132,12 +98,12 @@ return require('packer').startup(function()
} }
use { use {
"nvim-neo-tree/neo-tree.nvim",
branch = "v2.x",
'nvim-neo-tree/neo-tree.nvim',
branch = 'v2.x',
requires = { 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 () config = function ()
require('config.nvim-neo-tree') require('config.nvim-neo-tree')
@ -154,14 +120,14 @@ return require('packer').startup(function()
} }
use { use {
"nvim-neotest/neotest",
'nvim-neotest/neotest',
requires = { requires = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
"antoinemadec/FixCursorHold.nvim",
'nvim-lua/plenary.nvim',
'nvim-treesitter/nvim-treesitter',
'antoinemadec/FixCursorHold.nvim',
-- Adapters -- Adapters
"olimorris/neotest-phpunit",
"nvim-neotest/neotest-go",
'olimorris/neotest-phpunit',
'nvim-neotest/neotest-go',
}, },
config = function() config = function()
require('config.neotest') require('config.neotest')
@ -181,18 +147,28 @@ return require('packer').startup(function()
end end
} }
-- CMD and search at the top
use { use {
'folke/noice.nvim', 'folke/noice.nvim',
requires = { 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 () config = function ()
require('config.noice') require('config.noice')
end end
} }
use {
'rcarriga/nvim-notify',
config = function ()
require('notify').setup({
background_color = '#000000'
})
end
}
-- DB manager
use { use {
'kristijanhusak/vim-dadbod-ui', 'kristijanhusak/vim-dadbod-ui',
requires = { requires = {
@ -202,4 +178,45 @@ return require('packer').startup(function()
require('config.dadbod') require('config.dadbod')
end 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) end)

Loading…
Cancel
Save