Browse Source

Starting to use Telecasten as I was using Org-Journal

master
Julio Biason 2 years ago
parent
commit
2ebe0a5d04
  1. 35
      nvim/after/plugin/telecasten.lua
  2. 3
      nvim/lua/packager.lua

35
nvim/after/plugin/telecasten.lua

@ -0,0 +1,35 @@
local home = vim.fn.expand("~/Documents/Telecasten")
local tele = require('telekasten')
local options = { noremap = true, silent = true }
tele.setup({
home = home,
take_over_my_home = true,
auto_set_filetype = true,
dailies = home .. "/journal",
dalies_create_nonexisting = true,
template_new_daily = home .. "/templates/daily.md",
extension = ".md",
image_link_style = "markdown",
plug_into_calendar = true,
})
vim.keymap.set('n', '<leader>zn', tele.new_note, options)
vim.keymap.set('n', '<leader>zT', tele.goto_today, options)
vim.keymap.set('n', '<leader>zt', function()
local line = vim.api.nvim_get_current_line()
local nline = os.date("## %H:%M ")
vim.api.nvim_command(":normal Go")
vim.api.nvim_set_current_line(nline)
vim.api.nvim_command(":normal o")
end)
vim.keymap.set('n', '<leader>zs', tele.search_notes, options)
vim.keymap.set('n', '<leader>zg', tele.follow_link, options)
vim.keymap.set('n', '<leader>zp', tele.panel, options)
vim.keymap.set('n', '<leader>zc', tele.show_calendar, options)

3
nvim/lua/packager.lua

@ -21,4 +21,7 @@ return require("packer").startup(function(use)
use("windwp/nvim-autopairs") use("windwp/nvim-autopairs")
use("tpope/vim-commentary") use("tpope/vim-commentary")
use("renerocksai/telekasten.nvim")
use("renerocksai/calendar-vim")
end) end)

Loading…
Cancel
Save