Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "telekasten" #372

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
165 changes: 165 additions & 0 deletions versioned_docs/version-1.2/plugins/extra-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,171 @@ table.insert(lvim.builtin.cmp.sources, 1, { name = "copilot" })
{"oberblastmeister/neuron.nvim"},
```

### [Telekasten](https://github.com/renerocksai/telekasten.nvim)

**A Neovim (lua) plugin for working with a markdown zettelkasten / wiki and mixing it with a journal, based on telescope.nvim**

```lua
{ 'renerocksai/telekasten.nvim' },
```

```lua
lvim.builtin.which_key.mappings.z = {
name = "+Telekasten",
t = { "<cmd>lua require('telekasten').toggle_todo()<CR>", "Toggle todo" },
f = { "<cmd>lua require('telekasten').find_notes()<CR>", "Find notes" },
d = { "<cmd>lua require('telekasten').find_daily_notes()<CR>", "Find daily notes" },
g = { "<cmd>lua require('telekasten').search_notes()<CR>", "Search notes" },
z = { "<cmd>lua require('telekasten').follow_link()<CR>", "Follow link" },
T = { "<cmd>lua require('telekasten').goto_today()<CR>", "Goto today" },
W = { "<cmd>lua require('telekasten').goto_thisweek()<CR>", "Goto thisweek" },
w = { "<cmd>lua require('telekasten').find_weekly_notes()<CR>", "Find weekly notes" },
n = { "<cmd>lua require('telekasten').new_note()<CR>", "New note" },
N = { "<cmd>lua require('telekasten').new_templated_note()<CR>", "New templated note" },
y = { "<cmd>lua require('telekasten').yank_notelink()<CR>", "Yank notelink" },
c = { "<cmd>lua require('telekasten').show_calendar()<CR>", "Show calendar" },
C = { "<cmd>CalendarT<CR>", "CalendarT" },
i = { "<cmd>lua require('telekasten').paste_img_and_link()<CR>", "Paste img and link" },
b = { "<cmd>lua require('telekasten').show_backlinks()<CR>", "Show backlinks" },
F = { "<cmd>lua require('telekasten').find_friends()<CR>", "Find friends" },
I = { "<cmd>lua require('telekasten').insert_img_link({ i=true })<CR>", "Insert img link" },
p = { "<cmd>lua require('telekasten').preview_img()<CR>", "Preview img" },
m = { "<cmd>lua require('telekasten').browse_media()<CR>", "Browse media" },
['#'] = { "<cmd>lua require('telekasten').show_tags()<CR>", "Show tags" },
r = { "<cmd>lua require('telekasten').rename_note()<CR>", "Rename note" },
["."] = { "<cmd>lua require('telekasten').panel()<CR>", "Show Panel" }
}

vim.keymap.set("i", ";[]", "<cmd>:lua require('telekasten').insert_link({ i=true })<CR>")
vim.keymap.set("i", ";zt", "<cmd>:lua require('telekasten').toggle_todo({ i=false })<CR>")
vim.keymap.set("i", ";#", "<cmd>lua require('telekasten').show_tags({i = true})<cr>")

local home = vim.fn.expand("~/zettelkasten")
require('telekasten').setup({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you actually need the configuration inside require('telekasten').setup ? How much of that setup is customized vs just a copy of the default setup?

home = home,
-- if true, telekasten will be enabled when opening a note within the configured home
take_over_my_home = true,
-- auto-set telekasten filetype: if false, the telekasten filetype will not be used
-- and thus the telekasten syntax will not be loaded either
auto_set_filetype = true,
-- dir names for special notes (absolute path or subdir name)
dailies = home .. '/' .. 'daily',
weeklies = home .. '/' .. 'weekly',
templates = home .. '/' .. 'templates',
-- image (sub)dir for pasting
-- dir name (absolute path or subdir name)
-- or nil if pasted images shouldn't go into a special subdir
image_subdir = "img",
-- markdown file extension
extension = ".md",
-- Generate note filenames. One of:
-- "title" (default) - Use title if supplied, uuid otherwise
-- "uuid" - Use uuid
-- "uuid-title" - Prefix title by uuid
-- "title-uuid" - Suffix title with uuid
new_note_filename = "title",
--[[ file UUID type
- "rand"
- string input for os.date()
- or custom lua function that returns a string
--]]
uuid_type = "%Y%m%d%H%M",
-- UUID separator
uuid_sep = "-",
-- if not nil, this string replaces spaces in the title when generating filenames
filename_space_subst = nil,
-- following a link to a non-existing note will create it
follow_creates_nonexisting = true,
dailies_create_nonexisting = true,
weeklies_create_nonexisting = true,
-- skip telescope prompt for goto_today and goto_thisweek
journal_auto_open = false,
-- template for new notes (new_note, follow_link)
-- set to `nil` or do not specify if you do not want a template
template_new_note = home .. '/' .. 'templates/new_note.md',
-- template for newly created daily notes (goto_today)
-- set to `nil` or do not specify if you do not want a template
template_new_daily = home .. '/' .. 'templates/daily.md',
-- template for newly created weekly notes (goto_thisweek)
-- set to `nil` or do not specify if you do not want a template
template_new_weekly = home .. '/' .. 'templates/weekly.md',
-- image link style
-- wiki: ![[image name]]
-- markdown: ![](image_subdir/xxxxx.png)
image_link_style = "markdown",
-- default sort option: 'filename', 'modified'
sort = "filename",
-- integrate with calendar-vim
plug_into_calendar = true,
calendar_opts = {
-- calendar week display mode: 1 .. 'WK01', 2 .. 'WK 1', 3 .. 'KW01', 4 .. 'KW 1', 5 .. '1'
weeknm = 4,
-- use monday as first day of week: 1 .. true, 0 .. false
calendar_monday = 1,
-- calendar mark: where to put mark for marked days: 'left', 'right', 'left-fit'
calendar_mark = 'left-fit',
},
-- telescope actions behavior
close_after_yanking = false,
insert_after_inserting = true,
-- tag notation: '#tag', ':tag:', 'yaml-bare'
tag_notation = "#tag",
-- command palette theme: dropdown (window) or ivy (bottom panel)
command_palette_theme = "dropdown",
-- tag list theme:
-- get_cursor: small tag list at cursor; ivy and dropdown like above
show_tags_theme = "ivy",
-- when linking to a note in subdir/, create a [[subdir/title]] link
-- instead of a [[title only]] link
subdirs_in_links = true,
-- template_handling
-- What to do when creating a new note via `new_note()` or `follow_link()`
-- to a non-existing note
-- - prefer_new_note: use `new_note` template
-- - smart: if day or week is detected in title, use daily / weekly templates (default)
-- - always_ask: always ask before creating a note
template_handling = "smart",
-- path handling:
-- this applies to:
-- - new_note()
-- - new_templated_note()
-- - follow_link() to non-existing note
--
-- it does NOT apply to:
-- - goto_today()
-- - goto_thisweek()
--
-- Valid options:
-- - smart: put daily-looking notes in daily, weekly-looking ones in weekly,
-- all other ones in home, except for notes/with/subdirs/in/title.
-- (default)
--
-- - prefer_home: put all notes in home except for goto_today(), goto_thisweek()
-- except for notes with subdirs/in/title.
--
-- - same_as_current: put all new notes in the dir of the current note if
-- present or else in home
-- except for notes/with/subdirs/in/title.
new_note_location = "smart",
-- should all links be updated when a file is renamed
rename_update_links = true,
vaults = {
vault2 = {
-- alternate configuration for vault2 here. Missing values are defaulted to
-- default values from telekasten.
-- e.g.
-- home = "/home/user/vaults/personal",
},
},
-- how to preview media files
-- "telescope-media-files" if you have telescope-media-files.nvim installed
-- "catimg-previewer" if you have catimg installed
media_previewer = "telescope-media-files",
-- A customizable fallback handler for urls.
follow_url_fallback = nil,
})

```
### [nvim-lastplace](https://github.com/ethanholz/nvim-lastplace)

**pick up where you left off**
Expand Down