This a plugin.nvim version of my previous lua/custom/journal.lua.
Note
This is the main stable branch. Use this.
I will do changes first on the the branch dev
First add install it manually or with your favorite plugin-manager
-- Together with other files -- if standalone file, just remove on set fo `{}`
return {
-- ... other plugins
{
'LibereCode/journal.nvim',
opts = function()
-- example (the same as default)
vim.keymap.set("n", "<leader>oj", function()
require('journal').toggle_jrnl({ x = 0.9})
end, { desc = "[j]ournal" })
end
},
-- ... other plugins
}[!ATTENTION] This plugin only loads when called with
require('toggleTerm')...So DO NOT lazy-load !!
-- This is the builtin package manager for nvim. see `:h vim.pack`
vim.pack.add({
-- ... other plugins
'https://github.com/LibereCode/journal.nvim',
-- ... other plugins
})
vim.keymap.set("n", "<leader>oj", function()
require('journal').toggle_jrnl({ y = 0.9, border = "double" })
end, { desc = "[j]ournal" })
-- No `require('journal').setup()` is needed... yet
-- (because this plugin is in its infantcy, and hasen't come to that yet...)Possible values for opts in toggle_term(opts):
x = number(0 <= number <= 1) # the widthy = number(0 <= number <= 1) # the heightborder = string(string mentioned in:help winborder)