feat: add neotest
This commit is contained in:
+1
-1
@@ -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"}}
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
require("neotest").setup({
|
||||
adapters = {
|
||||
require("neotest-go")({
|
||||
experimental = {
|
||||
test_table = true,
|
||||
},
|
||||
args = { "-gcflags=all=-l", "-count=1", "-timeout=60s" }
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -225,7 +225,7 @@ local mappings = {
|
||||
t = {
|
||||
name = "+Test",
|
||||
a = { "<cmd>TestSuite -v -cover<cr>", "TestSuite" },
|
||||
t = {"<cmd>TestNearest -v -cover<cr>", "TestNearest"},
|
||||
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" },
|
||||
|
||||
+22
-4
@@ -112,14 +112,32 @@ return require("packer").startup(function(use)
|
||||
--require_plugin("vimspector")
|
||||
|
||||
-- vim test
|
||||
use {
|
||||
use({
|
||||
"nvim-neotest/neotest",
|
||||
requires = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"antoinemadec/FixCursorHold.nvim"
|
||||
}
|
||||
}
|
||||
"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" } }
|
||||
|
||||
Reference in New Issue
Block a user