nix-config/home/neovim/lua/plugins/telekasten.lua

58 lines
2.7 KiB
Lua

return {
'renerocksai/telekasten.nvim',
dependencies = {
'nvim-telescope/telescope.nvim',
'renerocksai/calendar-vim',
{
'nvim-telescope/telescope-media-files.nvim',
dependencies = {
'nvim-lua/popup.nvim',
'nvim-lua/plenary.nvim',
'nvim-telescope/telescope.nvim',
'nvim-telescope/telescope-media-files.nvim',
},
},
},
config = function()
require('telekasten').setup {
home = vim.fn.expand("~/notes"),
daily = vim.fn.expand("~/notes/daily"),
weeklies = vim.fn.expand("~/notes/weeklies"),
templates = vim.fn.expand("~/notes/templates"),
auto_set_filetype = false,
install_syntax = true,
media_previewer = "telescope-media-files",
}
vim.cmd("hi tklink ctermfg=72 guifg=#689d6a cterm=bold,underline gui=bold,underline")
vim.cmd("hi tkBrackets ctermfg=gray guifg=gray")
end,
keys = {
{ "<leader>z", '<cmd>Telekasten panel<cr>' },
{ "<leader>zf", '<cmd>Telekasten find_notes<cr>' },
{ "<leader>zd", '<cmd>Telekasten find_daily_notes<cr>' },
{ "<leader>zg", '<cmd>Telekasten search_notes<cr>' },
{ "<leader>zz", '<cmd>Telekasten follow_link<cr>' },
{ "<leader>zT", '<cmd>Telekasten goto_today<cr>' },
{ "<leader>zW", '<cmd>Telekasten goto_thisweek<cr>' },
{ "<leader>zw", '<cmd>Telekasten find_weekly_notes<cr>' },
{ "<leader>zn", '<cmd>Telekasten new_note<cr>' },
{ "<leader>zN", '<cmd>Telekasten new_templated_note<cr>' },
{ "<leader>zy", '<cmd>Telekasten yank_notelink<cr>' },
{ "<leader>zc", '<cmd>Telekasten show_calendar<cr>' },
{ "<leader>zi", '<cmd>Telekasten paste_img_and_link<cr>' },
{ "<leader>zt", '<cmd>Telekasten toggle_todo<cr>' },
{ "<leader>zb", '<cmd>Telekasten show_backlinks<cr>' },
{ "<leader>zF", '<cmd>Telekasten find_friends<cr>' },
{ "<leader>zp", '<cmd>Telekasten preview_img<cr>' },
{ "<leader>zm", '<cmd>Telekasten browse_media<cr>' },
{ "<leader>#", '<cmd>Telekasten show_tags<cr>' },
{ "<leader>zI", function() require('telekasten').insert_img_link({ i = true }) end },
{ "<leader>zt", function() require('telekasten').toggle_todo({ v = true }) end, "v" },
{ "<leader>zt", function() require('telekasten').toggle_todo({ i = true }) end, "i" },
{ "<leader>#", function() require('telekasten').show_tags({ i = true }) end, "i" },
-- { "[[", function() require('telekasten').insert_link({ i = true }) end, "i" },
{ "<leader>zC", "<cmd>CalendarT<cr>" },
},
}