You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.0 KiB
35 lines
1.0 KiB
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)
|
|
|