all repos

init.lua @ 8092b77

my nvim config
3 files changed, 46 insertions(+), 1 deletions(-)
feat(plugins): add neotest
Author: Smirnov Oleksandr ss2316544@gmail.com
Committed at: 2022-07-16 23:30:57 +0300
Parent: fe25c59
M lua/configs/lsp/init.lua

@@ -16,4 +16,9 @@ for name, conf in pairs(require "configs.lsp.servers") do

lspconfig[name].setup(vim.tbl_extend("force", options, conf)) end -lspconfig.sumneko_lua.setup(require("lua-dev").setup { lspconfig = options }) +lspconfig.sumneko_lua.setup( + require("lua-dev").setup { + lspconfig = options, + library = { plugins = { "neotest" }, types = true }, + } +)
A lua/configs/neotest.lua

@@ -0,0 +1,31 @@

+local neotest = require "neotest" +local map = require("core.utils").map + +neotest.setup { + + adapters = { + require "neotest-go", + }, + icons = { + expanded = "", + child_prefix = "", + child_indent = "", + final_child_prefix = "", + non_collapsible = "", + collapsed = "", + passed = "", + running = "", + failed = "", + unknown = "", + }, +} + +map("n", "<leader>tn", neotest.run.run) +map("n", "<leader>ts", neotest.summary.toggle) +map("n", "<leader>tS", neotest.run.stop) +map("n", "<leader>to", neotest.output.open) +map("n", "]t", neotest.jump.next) +map("n", "[t", neotest.jump.prev) +map("n", "<leader>tt", function() + neotest.run.run(vim.fn.expand "%") +end)
M lua/plugins.lua

@@ -85,6 +85,15 @@ { "RRethy/nvim-treesitter-endwise", after = "nvim-treesitter" },

}, } + use { -- test runner + "nvim-neotest/neotest", + config = u.get.config "neotest", + keys = { "<leader>t", "[t", "]t" }, + requires = { + { "nvim-neotest/neotest-go", module = "neotest-go" }, + }, + } + use { -- notes "nvim-neorg/neorg", requires = "nvim-treesitter/nvim-treesitter",