1
Fork 0
satellite/dotfiles/neovim/lua/my/plugins/mind.lua

41 lines
767 B
Lua
Raw Normal View History

2022-12-27 20:45:43 +01:00
local M = {
"phaazon/mind.nvim", -- Organize shit as trees
keys = "<leader>m",
}
2022-10-14 13:44:47 +02:00
2022-12-27 20:45:43 +01:00
function M.init()
2022-10-14 13:44:47 +02:00
vim.keymap.set("n", "<leader>m", function()
2022-12-27 20:45:43 +01:00
local mind = require("mind")
2022-10-14 13:44:47 +02:00
local buffers = vim.api.nvim_list_bufs()
local should_open = true
for _, buf in pairs(buffers) do
if vim.api.nvim_buf_is_loaded(buf) and vim.bo[buf].filetype == "mind" then
should_open = false
vim.cmd("bd " .. buf)
end
end
if should_open then
mind.open_main()
end
2022-12-27 20:45:43 +01:00
end, { desc = "[M]ind panel" })
end
function M.config()
local mind = require("mind")
mind.setup({
persistence = {
state_path = "~/Mind/mind.json",
data_dir = "~/Mind/data",
},
ui = {
width = 50,
},
})
2022-10-14 13:44:47 +02:00
end
return M