Many lua changes I guess
This commit is contained in:
parent
aeefede352
commit
73e033c904
10 changed files with 87 additions and 23 deletions
dotfiles/neovim/lua/my/plugins
|
@ -42,12 +42,7 @@ function M.setup()
|
|||
|
||||
require("my.plugins.hydra").setup()
|
||||
require("my.plugins.clipboard-image").setup()
|
||||
require("mind").setup({
|
||||
persistence = {
|
||||
state_path = "~/Mind/mind.json",
|
||||
data_dir = "~/Mind/data"
|
||||
}
|
||||
})
|
||||
require("my.plugins.mind").setup()
|
||||
|
||||
-- require("my.plugins.slam").setup()
|
||||
end
|
||||
|
|
32
dotfiles/neovim/lua/my/plugins/mind.lua
Normal file
32
dotfiles/neovim/lua/my/plugins/mind.lua
Normal file
|
@ -0,0 +1,32 @@
|
|||
local mind = require("mind")
|
||||
local M = {}
|
||||
|
||||
function M.setup()
|
||||
mind.setup({
|
||||
persistence = {
|
||||
state_path = "~/Mind/mind.json",
|
||||
data_dir = "~/Mind/data"
|
||||
},
|
||||
ui = {
|
||||
width = 50
|
||||
}
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>m", function()
|
||||
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
|
||||
end, { desc = "Toggle mind panel" })
|
||||
end
|
||||
|
||||
return M
|
|
@ -16,6 +16,7 @@ local keybinds = {
|
|||
{ "<C-P>", "find_files", "Find files" },
|
||||
{ "<Leader>ft", find_files_by_extension("tex"), "Find tex files" },
|
||||
{ "<Leader>fl", find_files_by_extension("lua"), "Find lua files" },
|
||||
{ "<Leader>fp", find_files_by_extension("purs"), "Find purescript files" },
|
||||
{ "<Leader>d", "diagnostics", "Diagnostics" },
|
||||
{ "<C-F>", "live_grep", "Search in project" },
|
||||
{ "<Leader>t", "builtin", "Show builtin pickers" },
|
||||
|
|
|
@ -1,9 +1,17 @@
|
|||
local wk = require("which-key")
|
||||
|
||||
local M = {}
|
||||
|
||||
function M.setup()
|
||||
require("which-key").setup({
|
||||
wk.setup({
|
||||
triggers = { "<leader>", "d", "y", "q", "z", "g", "c" }
|
||||
})
|
||||
|
||||
wk.register({
|
||||
["<leader>l"] = {
|
||||
name = "Local commands"
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue