This commit is contained in:
Jaroslaw Konik 2023-07-29 23:08:10 +02:00
parent 67df419445
commit 902aee1bda

View file

@ -11,8 +11,15 @@ if not vim.loop.fs_stat(lazypath) then
end end
vim.opt.rtp:prepend(lazypath) vim.opt.rtp:prepend(lazypath)
-- https://github.com/nvim-neotest/neotest
-- https://github.com/nvim-neorg/neorg
-- https://github.com/ggandor/leap.nvim
-- https://github.com/michaelb/sniprun
-- https://github.com/iamcco/markdown-preview.nvim
-- https://github.com/mrjones2014/legendary.nvim
require("lazy").setup({ require("lazy").setup({
{ "NeogitOrg/neogit", dependencies = "nvim-lua/plenary.nvim" }, { "NeogitOrg/neogit", dependencies = "nvim-lua/plenary.nvim" },
"lewis6991/fileline.nvim", "lewis6991/fileline.nvim",
"mfussenegger/nvim-dap", "mfussenegger/nvim-dap",
{ {
@ -121,9 +128,9 @@ require("lazy").setup({
-- refer to the configuration section below -- refer to the configuration section below
}, },
}, },
{ "ellisonleao/glow.nvim", config = true, cmd = "Glow" }, { "ellisonleao/glow.nvim", config = true, cmd = "Glow" },
"nvim-pack/nvim-spectre", "nvim-pack/nvim-spectre",
{ "rcarriga/nvim-dap-ui", requires = { "mfussenegger/nvim-dap" } }, { "rcarriga/nvim-dap-ui", requires = { "mfussenegger/nvim-dap" } },
}) })
require("dapui").setup() require("dapui").setup()
@ -198,14 +205,14 @@ end, { TablineFileNameBlock })
local function get_terminal_bufs() local function get_terminal_bufs()
return vim.tbl_filter(function(bufnr) return vim.tbl_filter(function(bufnr)
return vim.api.nvim_buf_get_option(bufnr, "buftype") == "terminal" return vim.api.nvim_buf_get_option(bufnr, "buftype") == "terminal"
and vim.api.nvim_buf_get_option(bufnr, "buflisted") and vim.api.nvim_buf_get_option(bufnr, "buflisted")
end, vim.api.nvim_list_bufs()) end, vim.api.nvim_list_bufs())
end end
local function get_non_terminal_bufs() local function get_non_terminal_bufs()
return vim.tbl_filter(function(bufnr) return vim.tbl_filter(function(bufnr)
return vim.api.nvim_buf_get_option(bufnr, "buftype") ~= "terminal" return vim.api.nvim_buf_get_option(bufnr, "buftype") ~= "terminal"
and vim.api.nvim_buf_get_option(bufnr, "buflisted") and vim.api.nvim_buf_get_option(bufnr, "buflisted")
end, vim.api.nvim_list_bufs()) end, vim.api.nvim_list_bufs())
end end
@ -446,8 +453,27 @@ wk.register({
o = { neogit.open, "Open Git" }, o = { neogit.open, "Open Git" },
}, },
r = { r = {
name = "Run",
j = {
"<cmd>OverseerRun<cr>",
"Job",
},
t = {
"<cmd>TestNearest<cr>",
"Test",
},
f = {
"<cmd>TestFile<cr>",
"Test File",
},
s = {
"<cmd>TestSuite<cr>",
"Test Suite",
},
},
p = {
name = "Refresh", name = "Refresh",
d = { vim.diagnostic.reset, "Refresh diagnostic" }, d = { vim.diagnostic.reset, "Diagnostic" },
}, },
e = { e = {
name = "Eval", name = "Eval",
@ -464,8 +490,8 @@ wk.register({
local current_buf_nr = vim.fn.bufnr() local current_buf_nr = vim.fn.bufnr()
local all = vim.tbl_filter(function(bufnr) local all = vim.tbl_filter(function(bufnr)
return current_buf_nr ~= bufnr return current_buf_nr ~= bufnr
and vim.api.nvim_buf_get_option(bufnr, "buftype") ~= "terminal" and vim.api.nvim_buf_get_option(bufnr, "buftype") ~= "terminal"
and vim.api.nvim_buf_get_option(bufnr, "buflisted") and vim.api.nvim_buf_get_option(bufnr, "buflisted")
end, vim.api.nvim_list_bufs()) end, vim.api.nvim_list_bufs())
for _, bufnr in ipairs(all) do for _, bufnr in ipairs(all) do
require("bufdelete").bufdelete(bufnr, false) require("bufdelete").bufdelete(bufnr, false)