Create new files or unnamed buffers using a simple floating window.
{
"dpi0/nee.nvim",
dependencies = { "MunifTanjim/nui.nvim" }, -- Used to create the floating window.
opts = {
directory_path = vim.fn.expand("~/notes"), -- Defaults to CWD, otherwise add your path to save file in.
},
keys = {
{
"<leader>n", -- Your keybind.
function()
require("nee").new_file()
end,
desc = "Create New File",
},
},
}- Press the keybind (
<leader>nby default) to trigger the prompt. - Hit
enterwith no filename and you'll get an unnamed buffer. - Type some filename and it creates a new buffer with the specified path (but does not save it to disk until you manually save).
- Hit
qin normal mode to hide window.
