diff --git a/README.md b/README.md index e3996cc..14486b5 100644 --- a/README.md +++ b/README.md @@ -227,6 +227,9 @@ require('telekasten').setup({ close_after_yanking = false, insert_after_inserting = true, + -- make syntax available to markdown buffers and telescope previewers + install_syntax = true + }) END ``` @@ -482,6 +485,10 @@ The only symbols allowed are: Numbers are allowed in tags, as long as a tag is not purely numeric. For example, #1984 is not a valid tag, but `#y1984` is. +**Note**: For proper highlighting, the `install_syntax` option is set to `true` by default. This automatically sets the +syntax of filetype `markdown` to `telekasten`, and also registers this syntax with telescope previewers for `.md` files. + + ### 2.2 Note templates The functions `goto_today`, `goto_thisweek`, `find_daily_notes`, `find_weekly_notes`, and `follow_link` can create diff --git a/doc/telekasten.txt b/doc/telekasten.txt index 15034cf..902bca7 100644 --- a/doc/telekasten.txt +++ b/doc/telekasten.txt @@ -107,6 +107,9 @@ telekasten.setup({opts}) -- 'left' -- 'right' -- 'left-fit' + + -- make syntax available to markdown buffers and telescope previewers + install_syntax = true, } < @@ -207,6 +210,11 @@ telekasten.setup({opts}) Default: `nil` Example: `'~/zettelkasten/templates/daily.md'` + install_syntax:~ + If `true`, telekasten's syntax for links, tags, etc. will be used for + markdown files, also in telescope previewers. Your configured markdown + syntax will be inherited, though. + Valid keys for {opts.calendar_opts} @@ -548,6 +556,12 @@ Tag syntax:~ Numbers are allowed in tags, as long as a tag is not purely numeric. For example, #1984 is not a valid tag, but `#y1984` is. +Note:~ + For proper highlighting, the `install_syntax` option is set to `true` by + default. This automatically sets the syntax of filetype `markdown` to + `telekasten`, and also registers this syntax with telescope previewers for + `.md` files. + -------------------------------------------------------------------------------- Section 3.3: Templates *telekasten.templates*