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

feat: Enhance note creation with custom extensions and improved filefiltering #339

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ The following sub-commands are defined:
- `follow_link` : Follow the link under the cursor
- `goto_today` : Open today's daily note
- `new_note` : Create a new note, prompts for title
- `create_new_note_with_extension` : Create a new note with custom extension, prompts for title with extension
- `goto_thisweek` : Open this week's weekly note
- `find_weekly_notes` : Find weekly notes by title (calendar week)
- `yank_notelink` : Yank a link to the currently open note
Expand Down Expand Up @@ -327,6 +328,14 @@ Telekasten allows the user to have completely separated note collections and
switch between them easily. Simply add data to the `vaults` table in the
configuration and configure each vault as you wish.

#### Files with different extensions in a vault
Added support for filtering files in the vault based on multiple extensions. This can be configured by assigning a table with one or more file extensions in the configuration. Example:

```lua
filter_extensions = { ".md", ".qmd", ".rmd", ".norg", ".org" }
```
This allows more flexible and comprehensive file type management within the vault.

### Link notation

The following links are supported:
Expand Down
18 changes: 17 additions & 1 deletion doc/telekasten.txt
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,14 @@ telekasten.setup({opts})
Filename extension of your markdown note files.

Default: '.md'

*telekasten.settings.filter_extensions*
filter_extensions: ~
Table with the filename extensions of your markdown note files.
You can use several markdown files like:
'{ ".norg", ".org", ".md", ".rmd", ".qmd" }'

Default: '{".md}'

*telekasten.settings.new_note_filename*
new_note_filename: ~
Configures the filenames of newly created notes. See |uuid_sep|
Expand Down Expand Up @@ -596,6 +603,15 @@ telekasten.new_templated_note()~
opened immediately.

See also:~
- |telekasten.template_files|
*telekasten.create_new_note_with_extension()*
telekasten.create_new_note_with_extension()~
Promts for a title and creates a new note which should inclue the extension
for the file by the `new_note` template, then shows it in Telescope.

See also:~
- |telekasten.settings.template_new_note|
- |telekasten.templates|
- |telekasten.template_files|
*telekasten.find_notes()*
telekasten.find_notes({opts})~
Expand Down
Loading