diff options
| author | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2022-06-22 08:37:16 +0200 |
|---|---|---|
| committer | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2022-06-22 08:37:16 +0200 |
| commit | e02e3aec70d82a536d662c4c34e638bd9e1e6786 (patch) | |
| tree | d332357d06b990f65672679d7a79cf646adf0b6a | |
| parent | 3df9682eaf9adde3a8e8f7ef03328df37303178a (diff) | |
| download | nvim-conf-e02e3aec70d82a536d662c4c34e638bd9e1e6786.tar.gz nvim-conf-e02e3aec70d82a536d662c4c34e638bd9e1e6786.zip | |
Add neotest
| -rw-r--r-- | after/plugin/neotest.lua | 25 | ||||
| -rw-r--r-- | lua/alpha/plugins.lua | 14 | ||||
| -rw-r--r-- | plugin/test.vim | 16 |
3 files changed, 44 insertions, 11 deletions
diff --git a/after/plugin/neotest.lua b/after/plugin/neotest.lua new file mode 100644 index 0000000..d70d5cd --- /dev/null +++ b/after/plugin/neotest.lua @@ -0,0 +1,25 @@ +local ok, neotest = pcall(require, "neotest") +if not ok then + return +end + +neotest.setup({ + adapters = { + require("neotest-go"), + require("neotest-vim-test")({ + ignore_file_types = { "go" }, + }), + }, +}) + +vim.keymap.set("n", "t<C-n>", function() + neotest.run.run() +end, { silent = true, noremap = true }) + +vim.keymap.set("n", "t<C-f>", function() + neotest.run.run(vim.fn.expand("%")) +end, { silent = true, noremap = true }) + +vim.keymap.set("n", "t<C-s>", function() + neotest.summary.toggle() +end, { silent = true, noremap = true }) diff --git a/lua/alpha/plugins.lua b/lua/alpha/plugins.lua index dc2b150..5062e5b 100644 --- a/lua/alpha/plugins.lua +++ b/lua/alpha/plugins.lua @@ -46,8 +46,6 @@ return require("packer").startup(function(use) }, }) - use({ "kevinhwang91/nvim-bqf", ft = "qf" }) - -- optional use({ "junegunn/fzf.vim" }) use({ @@ -142,8 +140,18 @@ return require("packer").startup(function(use) requires = "kyazdani42/nvim-web-devicons", }) - use("szw/vim-maximizer") use("vim-test/vim-test") + use { + "nvim-neotest/neotest", + requires = { + "nvim-lua/plenary.nvim", + "nvim-treesitter/nvim-treesitter", + "antoinemadec/FixCursorHold.nvim", + "nvim-neotest/neotest-go", + "nvim-neotest/neotest-vim-test", + } + } + use("rcarriga/nvim-notify") -- use("dracula/vim") diff --git a/plugin/test.vim b/plugin/test.vim index ebcf9b5..b51a9e1 100644 --- a/plugin/test.vim +++ b/plugin/test.vim @@ -1,9 +1,9 @@ -nmap <silent> t<C-n> :TestNearest<CR> -nmap <silent> t<C-f> :TestFile<CR> -nmap <silent> t<C-s> :TestSuite<CR> -nmap <silent> t<C-l> :TestLast<CR> -nmap <silent> t<C-g> :TestVisit<CR> +" nmap <silent> t<C-n> :TestNearest<CR> +" nmap <silent> t<C-f> :TestFile<CR> +" nmap <silent> t<C-s> :TestSuite<CR> +" nmap <silent> t<C-l> :TestLast<CR> +" nmap <silent> t<C-g> :TestVisit<CR> -let test#php#pest#executable = 'sail test' -let test#strategy = 'neovim' -let g:test#preserve_screen = 1 +" let test#php#pest#executable = 'sail test' +" let test#strategy = 'neovim' +" let g:test#preserve_screen = 1 |