diff --git a/.config/nvim/lua/plugins/disabled.lua b/.config/nvim/lua/plugins/disabled.lua index 75e4f4b..03ef96a 100644 --- a/.config/nvim/lua/plugins/disabled.lua +++ b/.config/nvim/lua/plugins/disabled.lua @@ -38,69 +38,6 @@ return { disable_legacy_commands = true, }, }, - { - -- TODO: decide between this, obsidian, and mkdnflow - 'renerocksai/telekasten.nvim', - enabled = true, - dependencies = { 'nvim-telescope/telescope.nvim', 'nvim-telekasten/calendar-vim' }, - event = 'VeryLazy', - cmd = 'Telekasten', - opts = { - -- main notes locations - home = os.getenv('HOME') .. '/notes', - dailies = 'dailies/', - weeklies = 'weeklies/', - templates = 'templates/', - - -- specific note templates - template_new_note = nil, - template_new_daily = os.getenv('HOME') .. '/notes/templates/dailytemplate.md', - template_new_weekly = os.getenv('HOME') .. '/notes/templates/weeklytemplate.md', - - -- enter any additional vaults here - --[[ vaults = { - personal = { - home = '~/notes/personal/', - }, - writing = { - home = 'writing/', - }, - }, ]] - - image_subdir = 'img', - extension = '.md', - new_note_filename = 'uuid-title', - uuid_type = '%Y%m%d%H%M', - uuid_sep = '-', - - follow_creates_nonexisting = true, - dailies_create_nonexisting = true, - weeklies_create_nonexisting = true, - - sort = 'modified', - - command_palette_theme = 'dropdown', - show_tags_theme = 'get_cursor', - - media_previewer = 'telescope-media-files', - - plug_into_calendar = true, - calendar_opts = { - weeknm = 5, - calendar_monday = 1, - }, - }, - vim.keymap.set('n', 'z', 'Telekasten panel', { desc = 'Open Zettlekasten command palette' }), - vim.keymap.set('n', 'zf', 'Telekasten find_notes', { desc = 'Find notes' }), - vim.keymap.set('n', 'zs', 'Telekasten search_notes', { desc = 'Search in notes' }), - vim.keymap.set('n', 'zd', 'Telekasten goto_today', { desc = "Open today's daily note" }), - vim.keymap.set('n', 'zz', 'Telekasten follow_link', { desc = 'Follow this link' }), - vim.keymap.set('n', 'zn', 'Telekasten new_note', { desc = 'Create a note in selected vault' }), - vim.keymap.set('n', 'zc', 'Telekasten show_calendar', { desc = 'Show the calendar' }), - vim.keymap.set('n', 'zb', 'Telekasten show_backlinks', { desc = 'Show backlinks to this note' }), - vim.keymap.set('n', 'zI', 'Telekasten insert_img_link', { desc = 'Insert an image link' }), - -- vim.keymap.set('i', '[[', 'Telekasten insert_link', { desc = 'Insert a link' }), - }, { 'epwalsh/obsidian.nvim', enabled = false, diff --git a/.config/nvim/lua/plugins/telekasten.lua b/.config/nvim/lua/plugins/telekasten.lua new file mode 100644 index 0000000..accce81 --- /dev/null +++ b/.config/nvim/lua/plugins/telekasten.lua @@ -0,0 +1,136 @@ +return { + 'renerocksai/telekasten.nvim', + enabled = true, + dependencies = { 'nvim-telescope/telescope.nvim', 'nvim-telekasten/calendar-vim' }, + event = 'VeryLazy', + cmd = 'Telekasten', + opts = { + -- default vault (notebook) + home = os.getenv('HOME') .. '/notes', + dailies = 'dailies/', + weeklies = 'weeklies/', + templates = 'templates/', + + -- default templates + template_new_note = nil, + template_new_daily = os.getenv('HOME') .. '/notes/templates/dailytemplate.md', + template_new_weekly = os.getenv('HOME') .. '/notes/templates/weeklytemplate.md', + + image_subdir = '_resources', + image_link_style = 'wiki', + + media_previewer = 'telescope-media-files', + journal_auto_open = true, -- skips telescope prompt for goto_today and goto_thisweek + install_syntax = true, + tag_notation = '#tag', -- '#tag', '@tag', ':tag:', 'yaml-bare' + subdirs_in_links = false, + + extension = '.md', + auto_set_filetype = true, + new_note_filename = 'uuid-title', -- possible choices 'title', 'uuid', 'uuid-title', 'title-uuid' + uuid_type = '%Y%m%d%H%M%S', + uuid_sep = ' ', + filename_small_case = true, + sort = 'modified', -- or 'filename' + command_palette_theme = 'dropdown', + show_tags_theme = 'get_cursor', + rename_update_links = true, + + follow_creates_nonexisting = true, + dailies_create_nonexisting = true, + weeklies_create_nonexisting = true, + + -- enter any additional vaults here + vaults = { + blog = { + home = os.getenv('HOME') .. '/blog/content/posts', + dailies = nil, + weeklies = nil, + templates = vim.fn.expand('~/Templates/blog/'), + template_new_note = vim.fn.expand('~/Templates/blog/blog-post.md'), + new_note_filename = 'title', + filename_small_case = true, + filename_space_subst = '-', + sort = 'filename', + show_tags_theme = 'ivy', + tag_notation = 'yaml-bare', + auto_set_filetype = false, + install_syntax = false, + }, + testing = { + home = os.getenv('HOME') .. '/Evernote Export.2/notes', + }, + }, + + media_extensions = { + '.svg', + '.png', + '.jpg', + '.bmp', + '.gif', + '.pdf', + '.mp4', + '.webm', + '.webp', + }, + + plug_into_calendar = true, + calendar_opts = { + weeknm = 1, + calendar_monday = 1, + calendar_mark = 'left-fit', + }, + }, + + vim.keymap.set('n', 'zP', 'Telekasten panel', { desc = 'Open Zettlekasten command palette' }), + vim.keymap.set('n', 'zV', 'Telekasten switch_vault', { desc = 'Vault picker' }), + + vim.keymap.set('n', 'zf', 'Telekasten find_notes', { desc = 'Find notes by title' }), + vim.keymap.set('n', 'zD', 'Telekasten find_daily_notes', { desc = 'Find daily notes' }), + vim.keymap.set('n', 'zw', 'Telekasten find_weekly_notes', { desc = 'Find weekly notes' }), + vim.keymap.set( + 'n', + 'zF', + 'Telekasten find_friends', + { desc = 'Find notes linking to note under the cursor' } + ), + vim.keymap.set('n', 'zs', 'Telekasten search_notes', { desc = 'Search in notes' }), + vim.keymap.set('n', 'zT', 'Telekasten goto_today', { desc = "Open today's daily note" }), + vim.keymap.set( + 'n', + 'zW', + 'Telekasten goto_thisweek', + { desc = 'Open weekly note for the current week' } + ), + vim.keymap.set('n', 'zg', 'Telekasten follow_link', { desc = 'Follow the link under cursor' }), + vim.keymap.set('n', 'zy', 'Telekasten yank_notelink', { desc = 'Yank link to current note' }), + vim.keymap.set('n', 'zn', 'Telekasten new_note', { desc = 'Create a new note' }), + vim.keymap.set( + 'n', + 'zr', + 'Telekasten rename_note', + { desc = 'Rename note and links pointing to it' } + ), + vim.keymap.set('n', '#', 'Telekasten show_tags', { desc = 'Show tag list' }), + vim.keymap.set( + 'n', + 'zN', + 'Telekasten new_templated_note', + { desc = 'Create a note using a template' } + ), + vim.keymap.set('n', 'zc', 'Telekasten show_calendar', { desc = 'Show the calendar' }), + vim.keymap.set('n', 'zC', 'CalendarT', { desc = 'Show the calendar (fill window)' }), + vim.keymap.set('n', 'zb', 'Telekasten show_backlinks', { desc = 'Show backlinks to this note' }), + vim.keymap.set('n', 'zI', 'Telekasten insert_img_link', { desc = 'Insert link to selected image' }), + vim.keymap.set('n', 'zp', 'Telekasten preview_img', { desc = 'Preview image' }), + vim.keymap.set('n', 'zm', 'Telekasten browse_media', { desc = 'Media browser' }), + vim.keymap.set( + 'n', + 'zi', + 'Telekasten paste_img_and_link', + { desc = 'Paste an image from clipboard and link to it' } + ), + vim.keymap.set({ 'n', 'v' }, 'zt', 'Telekasten toggle_todo', { desc = 'Toggle todo' }), + + -- vim.keymap.set('i', '[[', 'Telekasten insert_link', { desc = 'Link to a note' }), +} \ No newline at end of file