feat: add neotest

This commit is contained in:
2022-09-11 22:46:37 +08:00
parent 2e62b1bd66
commit 6ddfdc45c5
5 changed files with 136 additions and 107 deletions
+1 -1
View File
@@ -1 +1 @@
{"nvim-toggleterm.lua": {"commit": "d2ceb2c"}, "nvim-dap": {"commit": "d9b315a"}, "FixCursorHold.nvim": {"commit": "5aa5ff1"}, "nvcode-color-schemes.vim": {"commit": "3a0e624"}, "telescope-fzf-native.nvim": {"commit": "65c0ee3"}, "glow.nvim": {"commit": "8dca358"}, "packer.nvim": {"commit": "6afb674"}, "nvim-lspconfig": {"commit": "8e65dbb"}, "nvim-spectre": {"commit": "345e5dd"}, "numb.nvim": {"commit": "453c50a"}, "nvim-treesitter": {"commit": "965a74f"}, "which-key.nvim": {"commit": "d1872f1"}, "telescope-file-browser.nvim": {"commit": "00a814a"}, "aerial.nvim": {"commit": "9ffdff2"}, "nvim-autopairs": {"commit": "5fe2441"}, "friendly-snippets": {"commit": "22a9975"}, "vim-vsnip": {"commit": "fd13f3f"}, "nvim-colorizer.lua": {"commit": "36c610a"}, "tabular": {"commit": "339091a"}, "rnvimr": {"commit": "4ced809"}, "gitsigns.nvim": {"commit": "4d8a6e0"}, "codi.vim": {"commit": "2898369"}, "nvim-ts-autotag": {"commit": "fdefe46"}, "telescope.nvim": {"commit": "2584ff3"}, "nvim-compe": {"commit": "d186d73"}, "telescope-project.nvim": {"commit": "b991a2a"}, "trouble.nvim": {"commit": "929315e"}, "nvim-ts-context-commentstring": {"commit": "4d3a68c"}, "lsp_signature.nvim": {"commit": "e65a638"}, "one-monokai-vim": {"commit": "4fdfd93"}, "gruvbox.nvim": {"commit": "c7aaa3e"}, "hop.nvim": {"commit": "75f73d3"}, "lush.nvim": {"commit": "6b9f399"}, "playground": {"commit": "bcfab84"}, "vim-go-coverage": {"commit": "d9b0c9f"}, "nvim-dap-ui": {"commit": "ebebd42"}, "popup.nvim": {"commit": "b7404d3"}, "nvim-web-devicons": {"commit": "2d02a56"}, "nvim-bqf": {"commit": "aac1ff9"}, "lua-dev.nvim": {"commit": "f3c72f2"}, "nvim-dap-virtual-text": {"commit": "2971ce3"}, "neotest": {"commit": "d20507c"}, "vim-matchup": {"commit": "9aa08cd"}, "barbar.nvim": {"commit": "c41ad6e"}, "monokai.nvim": {"commit": "4fc970e"}, "lspsaga.nvim": {"commit": "9ec569a"}, "vim-markdown": {"commit": "3a96439"}, "dashboard-nvim": {"commit": "d82ddae"}, "nvim-luapad": {"commit": "9815e26"}, "nvim-tree.lua": {"commit": "fb8735e"}, "bracey.vim": {"commit": "4e1a22a"}, "nvim-lsp-installer": {"commit": "ae913cb"}, "fzf-lua": {"commit": "f42fbf0"}, "lsp-rooter.nvim": {"commit": "7c83364"}, "nvim-comment": {"commit": "e9ac16a"}, "plenary.nvim": {"commit": "4b66054"}, "telescope-dap.nvim": {"commit": "b4134ff"}, "markdown-preview.nvim": {"commit": "02cc387"}, "DAPInstall.nvim": {"commit": "bbda2b0"}, "FTerm.nvim": {"commit": "efd1065"}, "galaxyline.nvim": {"commit": "eb81be0"}}
{"vim-go-coverage": {"commit": "d9b0c9f"}, "nvim-toggleterm.lua": {"commit": "d2ceb2c"}, "nvim-dap": {"commit": "d9b315a"}, "FixCursorHold.nvim": {"commit": "5aa5ff1"}, "nvcode-color-schemes.vim": {"commit": "3a0e624"}, "telescope-fzf-native.nvim": {"commit": "65c0ee3"}, "codi.vim": {"commit": "2898369"}, "packer.nvim": {"commit": "6afb674"}, "nvim-lspconfig": {"commit": "8e65dbb"}, "nvim-spectre": {"commit": "345e5dd"}, "numb.nvim": {"commit": "453c50a"}, "nvim-treesitter": {"commit": "965a74f"}, "which-key.nvim": {"commit": "d1872f1"}, "telescope-file-browser.nvim": {"commit": "00a814a"}, "aerial.nvim": {"commit": "9ffdff2"}, "nvim-autopairs": {"commit": "5fe2441"}, "friendly-snippets": {"commit": "22a9975"}, "neotest-go": {"commit": "d506f83"}, "nvim-colorizer.lua": {"commit": "36c610a"}, "tabular": {"commit": "339091a"}, "rnvimr": {"commit": "4ced809"}, "gitsigns.nvim": {"commit": "4d8a6e0"}, "glow.nvim": {"commit": "8dca358"}, "nvim-ts-autotag": {"commit": "fdefe46"}, "telescope.nvim": {"commit": "2584ff3"}, "nvim-compe": {"commit": "d186d73"}, "telescope-project.nvim": {"commit": "b991a2a"}, "trouble.nvim": {"commit": "929315e"}, "nvim-ts-context-commentstring": {"commit": "4d3a68c"}, "lsp_signature.nvim": {"commit": "e65a638"}, "one-monokai-vim": {"commit": "4fdfd93"}, "gruvbox.nvim": {"commit": "c7aaa3e"}, "dashboard-nvim": {"commit": "d82ddae"}, "lush.nvim": {"commit": "6b9f399"}, "playground": {"commit": "bcfab84"}, "nvim-bqf": {"commit": "aac1ff9"}, "nvim-dap-ui": {"commit": "ebebd42"}, "popup.nvim": {"commit": "b7404d3"}, "nvim-web-devicons": {"commit": "2d02a56"}, "FTerm.nvim": {"commit": "efd1065"}, "lua-dev.nvim": {"commit": "f3c72f2"}, "nvim-dap-virtual-text": {"commit": "2971ce3"}, "vim-vsnip": {"commit": "fd13f3f"}, "neotest": {"commit": "e682e44"}, "vim-matchup": {"commit": "9aa08cd"}, "fzf-lua": {"commit": "f42fbf0"}, "barbar.nvim": {"commit": "c41ad6e"}, "monokai.nvim": {"commit": "4fc970e"}, "lspsaga.nvim": {"commit": "9ec569a"}, "vim-markdown": {"commit": "3a96439"}, "hop.nvim": {"commit": "75f73d3"}, "nvim-luapad": {"commit": "9815e26"}, "nvim-tree.lua": {"commit": "fb8735e"}, "bracey.vim": {"commit": "4e1a22a"}, "nvim-lsp-installer": {"commit": "ae913cb"}, "lsp-rooter.nvim": {"commit": "7c83364"}, "nvim-comment": {"commit": "e9ac16a"}, "plenary.nvim": {"commit": "4b66054"}, "telescope-dap.nvim": {"commit": "b4134ff"}, "markdown-preview.nvim": {"commit": "02cc387"}, "DAPInstall.nvim": {"commit": "bbda2b0"}, "galaxyline.nvim": {"commit": "eb81be0"}}
+1
View File
@@ -7,6 +7,7 @@ require('pluginconfig/gitsigns')
require('pluginconfig/hop')
require('pluginconfig/lspinstall')
require('pluginconfig/mkdx')
require('pluginconfig/neotest')
require('pluginconfig/numb')
require('pluginconfig/nvim-autopairs')
require('pluginconfig/nvim-colorizer')
+10
View File
@@ -0,0 +1,10 @@
require("neotest").setup({
adapters = {
require("neotest-go")({
experimental = {
test_table = true,
},
args = { "-gcflags=all=-l", "-count=1", "-timeout=60s" }
})
}
})
+97 -97
View File
@@ -22,15 +22,15 @@ require("which-key").setup {
window = {
border = "single", -- none, single, double, shadow
position = "bottom", -- bottom, top
margin = {1, 0, 1, 0}, -- extra window margin [top, right, bottom, left]
padding = {2, 2, 2, 2} -- extra window padding [top, right, bottom, left]
margin = { 1, 0, 1, 0 }, -- extra window margin [top, right, bottom, left]
padding = { 2, 2, 2, 2 } -- extra window padding [top, right, bottom, left]
},
layout = {
height = {min = 4, max = 25}, -- min and max height of the columns
width = {min = 20, max = 50}, -- min and max width of the columns
height = { min = 4, max = 25 }, -- min and max height of the columns
width = { min = 20, max = 50 }, -- min and max width of the columns
spacing = 3 -- spacing between columns
},
hidden = {"<silent>", "<cmd>", "<Cmd>", "<CR>", "call", "lua", "^:", "^ "}, -- hide mapping boilerplate
hidden = { "<silent>", "<cmd>", "<Cmd>", "<CR>", "call", "lua", "^:", "^ " }, -- hide mapping boilerplate
show_help = true -- show help message on the command line when the popup is visible
}
@@ -44,29 +44,29 @@ local opts = {
}
-- Set leader
vim.api.nvim_set_keymap('n', '<Space>', '<NOP>', {noremap = true, silent = true})
vim.api.nvim_set_keymap('n', '<Space>', '<NOP>', { noremap = true, silent = true })
vim.g.mapleader = ' '
-- no hl
vim.api.nvim_set_keymap('n', '<Leader>h', ':set hlsearch!<CR>', {noremap = true, silent = true})
vim.api.nvim_set_keymap('n', '<Leader>h', ':set hlsearch!<CR>', { noremap = true, silent = true })
-- explorer
vim.api.nvim_set_keymap('n', '<Leader>e', ':NvimTreeToggle<CR>', {noremap = true, silent = true})
vim.api.nvim_set_keymap('n', '<Leader>e', ':NvimTreeToggle<CR>', { noremap = true, silent = true })
-- telescope
--vim.api.nvim_set_keymap('n', '<C-p>', ":lua require 'telescope'.extensions.file_browser.file_browser()<CR>", {noremap = true, silent = true})
-- vim.api.nvim_set_keymap('n', '<C-p>', ":lua require'telescope.builtin'.find_files()<CR>", {noremap = true, silent = true})
vim.api.nvim_set_keymap('n', '<C-p>', ":FzfLua files<CR>", {noremap = true, silent = true})
vim.api.nvim_set_keymap('n', '<C-p>', ":FzfLua files<CR>", { noremap = true, silent = true })
-- dashboard
vim.api.nvim_set_keymap('n', '<Leader>;', ':Dashboard<CR>', {noremap = true, silent = true})
vim.api.nvim_set_keymap('n', '<Leader>;', ':Dashboard<CR>', { noremap = true, silent = true })
-- Comments
vim.api.nvim_set_keymap("n", "<Leader>b/", ":CommentToggle<CR>", {noremap = true, silent = true})
vim.api.nvim_set_keymap("v", "<Leader>b/", ":CommentToggle<CR>", {noremap = true, silent = true})
vim.api.nvim_set_keymap("n", "<Leader>b/", ":CommentToggle<CR>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("v", "<Leader>b/", ":CommentToggle<CR>", { noremap = true, silent = true })
-- close buffer
vim.api.nvim_set_keymap("n", "<leader>c", ":BufferClose<CR>", {noremap = true, silent = true})
vim.api.nvim_set_keymap("n", "<leader>c", ":BufferClose<CR>", { noremap = true, silent = true })
-- open projects
--vim.api.nvim_set_keymap('n', '<leader>p', ":lua require'telescope'.extensions.project.project{}<CR>", {noremap = true, silent = true})
@@ -81,26 +81,26 @@ local mappings = {
["h"] = "No Highlight",
a = {
name = "+Action",
a = {"<cmd>@:<cr>","execute last command again"}
a = { "<cmd>@:<cr>", "execute last command again" }
},
b = {
name = "+Buffer",
n = {"<cmd>BufferNext<cr>", "next buffer"},
p = {"<cmd>BufferPrevious<cr>", "previous buffer"},
q = {"<cmd>q<cr>", "quit"},
s = {"<cmd>w<cr>", "save"},
r = {"<cmd>e!<cr>", "reload"},
d = {"<cmd>BufferClose<cr>", "close buffer"},
z = {"<cmd>CommentToggle<CR>", "toggle comment"},
n = { "<cmd>BufferNext<cr>", "next buffer" },
p = { "<cmd>BufferPrevious<cr>", "previous buffer" },
q = { "<cmd>q<cr>", "quit" },
s = { "<cmd>w<cr>", "save" },
r = { "<cmd>e!<cr>", "reload" },
d = { "<cmd>BufferClose<cr>", "close buffer" },
z = { "<cmd>CommentToggle<CR>", "toggle comment" },
},
D = {
name = "+Diagnostics",
t = {"<cmd>TroubleToggle<cr>", "trouble"},
w = {"<cmd>TroubleToggle lsp_workspace_diagnostics<cr>", "workspace"},
d = {"<cmd>TroubleToggle lsp_document_diagnostics<cr>", "document"},
q = {"<cmd>TroubleToggle quickfix<cr>", "quickfix"},
l = {"<cmd>TroubleToggle loclist<cr>", "loclist"},
r = {"<cmd>TroubleToggle lsp_references<cr>", "references"},
t = { "<cmd>TroubleToggle<cr>", "trouble" },
w = { "<cmd>TroubleToggle lsp_workspace_diagnostics<cr>", "workspace" },
d = { "<cmd>TroubleToggle lsp_document_diagnostics<cr>", "document" },
q = { "<cmd>TroubleToggle quickfix<cr>", "quickfix" },
l = { "<cmd>TroubleToggle loclist<cr>", "loclist" },
r = { "<cmd>TroubleToggle lsp_references<cr>", "references" },
},
d = {
name = "+Debug",
@@ -110,33 +110,33 @@ local mappings = {
-- o = {"<cmd>DebugStepOver<cr>", "Step Over"},
-- r = {"<cmd>DebugToggleRepl<cr>", "Toggle Repl"},
-- s = {"<cmd>DebugStart<cr>", "Start"}
d = {"<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<cr>", "show diagnostics"},
d = { "<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<cr>", "show diagnostics" },
c = {"<cmd>lua require'dap'.continue()<cr>", "continue"},
b = {':lua require"dap".toggle_breakpoint()<CR>', "Toggle Breadpoint"},
j = {':lua require"dap".step_over()<CR>', "step over"},
k = {':lua require"dap".step_out()<CR>', "step out"},
l = {':lua require"dap".step_into()<CR>',"step into"},
c = { "<cmd>lua require'dap'.continue()<cr>", "continue" },
b = { ':lua require"dap".toggle_breakpoint()<CR>', "Toggle Breadpoint" },
j = { ':lua require"dap".step_over()<CR>', "step over" },
k = { ':lua require"dap".step_out()<CR>', "step out" },
l = { ':lua require"dap".step_into()<CR>', "step into" },
--<c-h>', ':lua require"dap".continue()<CR>')
u = {':lua require"dap".up()<CR>', "up"},
u = { ':lua require"dap".up()<CR>', "up" },
-- d = {':lua require"dap".down()<CR>', "down"},
_ = {':lua require"dap".disconnect();require"dap".stop();require"dap".run_last()<CR>', "disconnect"},
_ = { ':lua require"dap".disconnect();require"dap".stop();require"dap".run_last()<CR>', "disconnect" },
--r = {':lua require"dap".repl.open({}, "vsplit")<CR><C-w>l', "repl open"},
i = {':lua require"dap.ui.variables".visual_hover()<CR>',"visual_hover"},
i = { ':lua require"dap.ui.variables".visual_hover()<CR>', "visual_hover" },
--? = {':lua require"dap.ui.variables".scopes()<CR>',"scopes"},
-- e = {':lua require"dap".set_exception_breakpoints({"all"})<CR>',"esception bp"},
-- a = {':lua require"debugHelper".attach()<CR>',"attach"},
-- A = {':lua require"debugHelper".attachToRemote()<CR>',"attach to remote"},
s = {':lua local widgets=require"dap.ui.widgets";widgets.centered_float(widgets.scopes)<CR>',"centered_float"},
s = { ':lua local widgets=require"dap.ui.widgets";widgets.centered_float(widgets.scopes)<CR>', "centered_float" },
},
f = {
name = "+File",
m = {"<cmd>lua require'utils'.open_md()<cr>", "open a markdown file in vscode"},
s = {"<cmd>w<cr>", "save file"},
t = {"<cmd>NvimTreeToggle<cr>", "toggle nvim tree"},
r = {"<cmd>RnvimrToggle<cr>", "toggle rnvimr"},
y = {"<cmd>lua require'utils'.yank_filepath()<cr>", "copy the file path"},
l = {"<cmd>NvimTreeFindFile<CR>", "find file"},
m = { "<cmd>lua require'utils'.open_md()<cr>", "open a markdown file in vscode" },
s = { "<cmd>w<cr>", "save file" },
t = { "<cmd>NvimTreeToggle<cr>", "toggle nvim tree" },
r = { "<cmd>RnvimrToggle<cr>", "toggle rnvimr" },
y = { "<cmd>lua require'utils'.yank_filepath()<cr>", "copy the file path" },
l = { "<cmd>NvimTreeFindFile<CR>", "find file" },
-- T = {"<cmd>let @+ = 'go test -v -run='+expand('<cword>')<cr>", "get current word in go test"},
},
g = {
@@ -149,46 +149,46 @@ local mappings = {
R = { "<cmd>lua require 'gitsigns'.reset_buffer()<cr>", "Reset Buffer" },
s = { "<cmd>lua require 'gitsigns'.stage_hunk()<cr>", "Stage Hunk" },
u = {
"<cmd>lua require 'gitsigns'.undo_stage_hunk()<cr>",
"Undo Stage Hunk",
"<cmd>lua require 'gitsigns'.undo_stage_hunk()<cr>",
"Undo Stage Hunk",
},
o = { "<cmd>Telescope git_status<cr>", "Open changed file" },
b = { "<cmd>Telescope git_branches<cr>", "Checkout branch" },
c = { "<cmd>Telescope git_commits<cr>", "Checkout commit" },
C = {
"<cmd>Telescope git_bcommits<cr>",
"Checkout commit(for current file)",
"<cmd>Telescope git_bcommits<cr>",
"Checkout commit(for current file)",
},
d = {
"<cmd>Gitsigns diffthis HEAD<cr>",
"Git Diff",
"<cmd>Gitsigns diffthis HEAD<cr>",
"Git Diff",
},
},
l = {
name = "+Language",
a = {"<cmd>Lspsaga code_action<cr>", "Code Action"},
A = {"<cmd>Lspsaga range_code_action<cr>", "Selected Action"},
d = {"<cmd>Telescope lsp_document_diagnostics<cr>", "Document Diagnostics"},
D = {"<cmd>Telescope lsp_workspace_diagnostics<cr>", "Workspace Diagnostics"},
f = {"<cmd>LspFormatting<cr>", "Format"},
F = {"<cmd>Lspsaga lsp_finder<cr>", "LSP Finder"},
a = { "<cmd>Lspsaga code_action<cr>", "Code Action" },
A = { "<cmd>Lspsaga range_code_action<cr>", "Selected Action" },
d = { "<cmd>Telescope lsp_document_diagnostics<cr>", "Document Diagnostics" },
D = { "<cmd>Telescope lsp_workspace_diagnostics<cr>", "Workspace Diagnostics" },
f = { "<cmd>LspFormatting<cr>", "Format" },
F = { "<cmd>Lspsaga lsp_finder<cr>", "LSP Finder" },
-- i = {"<cmd>Telescope lsp_implementations<cr>", "implement"},
i = {"<cmd>lua vim.lsp.buf.implementation()<cr>", "implement"},
l = {"<cmd>lua vim.lsp.buf.hover()<cr>", "hover"},
L = {"<cmd>Lspsaga show_line_diagnostics<cr>", "Line Diagnostics"},
k = {"<cmd>: LspRestart<cr>", "restart lsp server"},
n = {"<cmd>lua vim.lsp.diagnostic.goto_next()<cr>", "next diagnostic"},
p = {"<cmd>lua vim.lsp.diagnostic.goto_prev()<cr>", "prev diagnostic"},
P = {"<cmd>Lspsaga preview_definition<cr>", "Preview Definition"},
q = {"<cmd>Telescope quickfix<cr>", "Quickfix"},
r = {"<cmd>lua vim.lsp.buf.references()<cr>", "references"},
R = {"<cmd>Lspsaga rename<cr>", "Rename"},
t = {"<cmd>LspTypeDefinition<cr>", "Type Definition"},
x = {"<cmd>cclose<cr>", "Close Quickfix"},
s = {"<cmd>Telescope lsp_document_symbols<cr>", "Document Symbols"},
S = {"<cmd>Telescope lsp_dynamic_workspace_symbols<cr>", "Workspace Symbols"},
z = {"<cmd>LspInfo<cr>", "Info"},
[","]= {"<cmd>LspInstallInfo<cr>","LSP servers"}
i = { "<cmd>lua vim.lsp.buf.implementation()<cr>", "implement" },
l = { "<cmd>lua vim.lsp.buf.hover()<cr>", "hover" },
L = { "<cmd>Lspsaga show_line_diagnostics<cr>", "Line Diagnostics" },
k = { "<cmd>: LspRestart<cr>", "restart lsp server" },
n = { "<cmd>lua vim.lsp.diagnostic.goto_next()<cr>", "next diagnostic" },
p = { "<cmd>lua vim.lsp.diagnostic.goto_prev()<cr>", "prev diagnostic" },
P = { "<cmd>Lspsaga preview_definition<cr>", "Preview Definition" },
q = { "<cmd>Telescope quickfix<cr>", "Quickfix" },
r = { "<cmd>lua vim.lsp.buf.references()<cr>", "references" },
R = { "<cmd>Lspsaga rename<cr>", "Rename" },
t = { "<cmd>LspTypeDefinition<cr>", "Type Definition" },
x = { "<cmd>cclose<cr>", "Close Quickfix" },
s = { "<cmd>Telescope lsp_document_symbols<cr>", "Document Symbols" },
S = { "<cmd>Telescope lsp_dynamic_workspace_symbols<cr>", "Workspace Symbols" },
z = { "<cmd>LspInfo<cr>", "Info" },
[","] = { "<cmd>LspInstallInfo<cr>", "LSP servers" }
},
p = {
name = "Packer",
@@ -197,48 +197,48 @@ local mappings = {
s = { "<cmd>PackerSync<cr>", "Sync" },
S = { "<cmd>PackerStatus<cr>", "Status" },
u = { "<cmd>PackerUpdate<cr>", "Update" },
},
},
q = {
name = "quit",
q = {"<cmd>qall<cr>", "quit"},
q = { "<cmd>qall<cr>", "quit" },
},
s = {
name = "+Search",
b = {"<cmd>Telescope git_branches<cr>", "Checkout branch"},
b = { "<cmd>Telescope git_branches<cr>", "Checkout branch" },
-- c = {"<cmd>Telescope colorscheme<cr>", "Colorscheme"},
c = {"<cmd>:nohl<cr>", "no highlight"},
d = {"<cmd>Telescope lsp_document_diagnostics<cr>", "Document Diagnostics"},
D = {"<cmd>Telescope lsp_workspace_diagnostics<cr>", "Workspace Diagnostics"},
f = {"<cmd>Fzflua files<cr>", "Find File"},
m = {"<cmd>Telescope marks<cr>", "Marks"},
M = {"<cmd>Telescope man_pages<cr>", "Man Pages"},
r = {"<cmd>FzfLua oldfiles<cr>", "Open Recent File"},
R = {"<cmd>Telescope registers<cr>", "Registers"},
t = {"<cmd>FzfLua live_grep<cr>", "Text"},
["#"] = {"<cmd>FzfLua grep_cword<cr>", "Search word under cursor"},
c = { "<cmd>:nohl<cr>", "no highlight" },
d = { "<cmd>Telescope lsp_document_diagnostics<cr>", "Document Diagnostics" },
D = { "<cmd>Telescope lsp_workspace_diagnostics<cr>", "Workspace Diagnostics" },
f = { "<cmd>Fzflua files<cr>", "Find File" },
m = { "<cmd>Telescope marks<cr>", "Marks" },
M = { "<cmd>Telescope man_pages<cr>", "Man Pages" },
r = { "<cmd>FzfLua oldfiles<cr>", "Open Recent File" },
R = { "<cmd>Telescope registers<cr>", "Registers" },
t = { "<cmd>FzfLua live_grep<cr>", "Text" },
["#"] = { "<cmd>FzfLua grep_cword<cr>", "Search word under cursor" },
},
S = {
name = "+Session",
s = {"<cmd>SessionSave<cr>", "Save Session"},
l = {"<cmd>SessionLoad<cr>", "Load Session"},
name = "+Session",
s = { "<cmd>SessionSave<cr>", "Save Session" },
l = { "<cmd>SessionLoad<cr>", "Load Session" },
},
t = {
name = "+Test",
a = {"<cmd>TestSuite -v -cover<cr>", "TestSuite"},
t = {"<cmd>TestNearest -v -cover<cr>", "TestNearest"},
f = {"<cmd>TestFile -v -cover<cr>", "TestFile"},
c = {"<cmd>GoCover<cr>", "go coverage"},
C = {"<cmd>GoCoverClear<cr>", "go coverage clear"},
b = {"<cmd>lua require'dap'.toggle_breakpoint()<cr>", "set break point"},
r = {"<cmd>lua require'dap'.continue()<cr>", "continue"},
a = { "<cmd>TestSuite -v -cover<cr>", "TestSuite" },
t = { "<cmd>lua require('neotest').run.run() <cr>", "TestNearest" },
f = { "<cmd>TestFile -v -cover<cr>", "TestFile" },
c = { "<cmd>GoCover<cr>", "go coverage" },
C = { "<cmd>GoCoverClear<cr>", "go coverage clear" },
b = { "<cmd>lua require'dap'.toggle_breakpoint()<cr>", "set break point" },
r = { "<cmd>lua require'dap'.continue()<cr>", "continue" },
},
-- extras
z = {
name = "+Zen",
s = {"<cmd>TZBottom<cr>", "toggle status line"},
t = {"<cmd>TZTop<cr>", "toggle tab bar"},
z = {"<cmd>TZAtaraxis<cr>", "toggle zen"},
s = { "<cmd>TZBottom<cr>", "toggle status line" },
t = { "<cmd>TZTop<cr>", "toggle tab bar" },
z = { "<cmd>TZAtaraxis<cr>", "toggle zen" },
}
}
+27 -9
View File
@@ -82,7 +82,7 @@ return require("packer").startup(function(use)
use "kevinhwang91/rnvimr"
-- use {'lukas-reineke/indent-blankline.nvim', opt=true, branch = 'lua'}
use { 'lewis6991/gitsigns.nvim',tag = 'release', opt = true, requires = { 'nvim-lua/plenary.nvim' } }
use { 'lewis6991/gitsigns.nvim', tag = 'release', opt = true, requires = { 'nvim-lua/plenary.nvim' } }
use { "folke/which-key.nvim", opt = true }
use { "ChristianChiarulli/dashboard-nvim", opt = true }
use { "windwp/nvim-autopairs", opt = true }
@@ -112,14 +112,32 @@ return require("packer").startup(function(use)
--require_plugin("vimspector")
-- vim test
use {
"nvim-neotest/neotest",
requires = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
"antoinemadec/FixCursorHold.nvim"
}
}
use({
"nvim-neotest/neotest",
requires = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
"antoinemadec/FixCursorHold.nvim",
"nvim-neotest/neotest-go",
},
config = function()
-- get neotest namespace (api call creates or returns namespace)
local neotest_ns = vim.api.nvim_create_namespace("neotest")
vim.diagnostic.config({
virtual_text = {
format = function(diagnostic)
local message = diagnostic.message
:gsub("\n", " ")
:gsub("\t", " ")
:gsub("%s+", " ")
:gsub("^%s+", "")
return message
end,
},
}, neotest_ns)
end
})
use { "kyoh86/vim-go-coverage", opt = true, ft = "go" }
require_plugin("vim-go-coverage")
use { "rcarriga/nvim-dap-ui", requires = { "mfussenegger/nvim-dap" } }