Add flote.nvim and disable oil.nvim keybind
This commit is contained in:
parent
b7e772df19
commit
6a560b4086
2 changed files with 30 additions and 1 deletions
29
lua/custom/plugins/flote.lua
Normal file
29
lua/custom/plugins/flote.lua
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
local M = {
|
||||
'JellyApple102/flote.nvim',
|
||||
}
|
||||
|
||||
function M.config()
|
||||
require('flote').setup({
|
||||
q_to_quit = true,
|
||||
window_style = 'minimal',
|
||||
window_border = 'solid',
|
||||
window_title = true,
|
||||
notes_dir = vim.fn.stdpath('cache') .. '/flote',
|
||||
files = {
|
||||
global = 'flote-global.md',
|
||||
cwd = function()
|
||||
return vim.fn.getcwd()
|
||||
end,
|
||||
file_name = function(cwd)
|
||||
local base_name = vim.fs.basename(cwd)
|
||||
local parent_base_name = vim.fs.basename(vim.fs.dirname(cwd))
|
||||
return parent_base_name .. '_' .. base_name .. '.md'
|
||||
end,
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
vim.keymap.set('n', '<leader>n', '<CMD>Flote<CR>', { desc = 'Open project notes' })
|
||||
vim.keymap.set('n', '<leader>N', '<CMD>Flote global<CR>', { desc = 'Open global notes' })
|
||||
|
||||
return M
|
||||
Loading…
Add table
Add a link
Reference in a new issue