Skip to content

Releases: epwalsh/obsidian.nvim

v3.7.6

01 Apr 18:07
Compare
Choose a tag to compare

What's new

Fixed βœ…

  • Ensure fields transferred to new note when cloning from template.
  • Fixed bug with YAML parser where it would fail to parse field names with spaces in them.
  • Fixed bug with YAML parser where it would incorrectly identity comments.

Added πŸŽ‰

  • Added a smart action mapping on <CR>, that depends on the context. It will follow links or toggle checkboxes.

Changed ⚠️

  • Added order field to ui.checkboxes config fields that determines the order in which the different checkbox characters are cycled through via :ObsidianToggleCheckbox and the smart action.

Commits

d70f328 chore(release): bump version to v3.7.6 for release
3c3656b fix another YAML parser bug
30a7d7b Don't resolve duplicate paths
2516df4 chore(docs): auto generate docs
2f9b95a Added :ObsidianToggleCheckbox cmd and smart action mapping (#329) (#518)
a7e2ec9 Fix bug with YAML parser
c5c4088 Fix bug with YAML parser
f2eeb0a Ensure fields transfer to new note when cloning from template

v3.7.5

22 Mar 23:57
Compare
Choose a tag to compare

What's new

Fixed βœ…

  • Fixed bug with created new notes from nvim-cmp on Linux.

Commits

df0c5cc chore(release): bump version to v3.7.5 for release
271db15 Fix bug with cmp_obsidian_new on Linux (#508)
6a81ca9 clean up Client:should_save_frontmatter()
be075a1 Add more debugging info about completion
dd1e7ad update chars used in debug command

v3.7.4

20 Mar 01:11
Compare
Choose a tag to compare

What's new

Fixed βœ…

  • Don't open picker for tags when there aren't any matches.
  • Fixed overwriting frontmatter when creating daily note with template.
  • Fixed default date format for the alias of daily notes.
  • Made buffer open strategy more robust.

Commits

68da729 chore(release): bump version to v3.7.4 for release
b2df42f Make buffer open strategy more robust
02f0136 Fix default format for daily note datetime
a6b5e97 chore(docs): auto generate docs
fd9c8ec return note
9b2b85b Update prompt for title / path
ade062a Add file completion to :ObsidianNew command
e3d1b86 chore(docs): auto generate docs
87267f9 Clean up templates API
4e80ab4 Fix overwriting frontmatter from template
450c3da Don't open picker for tags when there aren't any results

v3.7.3

13 Mar 23:59
Compare
Choose a tag to compare

What's new

Changed ⚠️

  • Add indicator to entries that don't exist yet in :ObsidianDailies picker list.

Fixed βœ…

  • Fixed img_text_func example in README.
  • When following intra-note links, such as with a table of contents, load the note from the buffer to resolve anchor/block links instead of from file.

Commits

0f4ea50 chore(release): bump version to v3.7.3 for release
63da36f Load note from buffer to resolve inter-note links
53eace3 chore(docs): auto generate docs
9049199 Fix img_text_func example in README
82fa400 chore(docs): auto generate docs
538cd94 Add indicator to :ObsidianDailies entries that don't exist

v3.7.2

12 Mar 19:39
Compare
Choose a tag to compare

What's new

Changed ⚠️

  • :ObsidianNew won't write the new note to disk, it will only populate the buffer.

Fixed βœ…

  • Fixed renaming when passing file path
  • Make Client:resolve_note fall back to fuzzy matching when there are no exact matches.

Commits

5747ae3 chore(release): bump version to v3.7.2 for release
f68f5c8 Don't collect anchors/blocks within code blocks
af0ce46 chore(docs): auto generate docs
4e21c8c Don't write new note from :ObsidianFollowLink
7c9a337 chore(docs): auto generate docs
e6b7ce1 Don't write note on :ObsidianNew (#490)
52e91bc chore(docs): auto generate docs
4d3f2c2 Make Client:resolve_note a little fuzzy
979f154 fix: renaming sends proper path to joinpath (#487)

v3.7.1

09 Mar 21:53
Compare
Choose a tag to compare

What's new

Fixed βœ…

  • Fixed regression with :ObsidianExtractNote.
  • Fixed regression of edge case when paths are passed to :ObsidianNew.
  • Don't write frontmatter when frontmatter table is empty.

Commits

b136c15 chore(release): bump version to v3.7.1 for release
0577a02 CHANGELOG
f82d96a Fix title assigned to new notes
78f572c Do not write empty metadata to note (#482)
bd2b2a5 chore(docs): auto generate docs
dc60381 Fix bug with :ObsidianExtractNote

v3.7.0

09 Mar 00:26
Compare
Choose a tag to compare

What's new

There's a lot of new features and improvements here that I'm really excited about πŸ₯³ They've improved my workflow a ton and I hope they do for you too. To highlight the 3 biggest additions:

  1. πŸ”— Full support for header anchor links and block links! That means both for following links and completion of links. Various forms of anchor/block links are support. Here are a few examples:

    • Typical Obsidian-style wiki links, e.g. [[My note#Heading 1]], [[My note#Heading 1#Sub heading]], [[My note#^block-123]].
    • Wiki links with a label, e.g. [[my-note#heading-1|Heading 1 in My Note]].
    • Markdown links, e.g. [Heading 1 in My Note](my-note.md#heading-1).

    We also support links to headers within the same note, like for a table of contents, e.g. [[#Heading 1]], [[#heading-1|Heading]], [[#^block-1]].

  2. πŸ“² A basic callback system to let you easily customize obisidian.nvim's behavior even more. There are currently 5 events: post_setup, enter_note, leave_note, pre_write_note, and post_set_workspace. You can define a function for each of these in your config.

  3. πŸ”­ Improved picker integrations (especially for telescope), particular for the :ObsidianTags command. See https://github.com/epwalsh/obsidian.nvim/discussions/450 for a demo.

Full changelog below πŸ‘‡

Added πŸŽ‰

  • Added a configurable callback system to further customize obsidian.nvim's behavior. Callbacks are defined through the callbacks field in the config:

    callbacks = {
      -- Runs at the end of `require("obsidian").setup()`.
      ---@param client obsidian.Client
      post_setup = function(client) end,
    
      -- Runs anytime you enter the buffer for a note.
      ---@param client obsidian.Client
      ---@param note obsidian.Note
      enter_note = function(client, note) end,
    
      -- Runs anytime you leave the buffer for a note.
      ---@param client obsidian.Client
      ---@param note obsidian.Note
      leave_note = function(client, note) end,
    
      -- Runs right before writing the buffer for a note.
      ---@param client obsidian.Client
      ---@param note obsidian.Note
      pre_write_note = function(client, note) end,
    
      -- Runs anytime the workspace is set/changed.
      ---@param client obsidian.Client
      ---@param workspace obsidian.Workspace
      post_set_workspace = function(client, workspace) end,
    }
  • Added configuration option note_path_func(spec): obsidian.Path for customizing how file names for new notes are generated. This takes a single argument, a table that looks like { id: string, dir: obsidian.Path, title: string|? }, and returns an obsidian.Path object. The default behavior is equivalent to this:

    ---@param spec { id: string, dir: obsidian.Path, title: string|? }
    ---@return string|obsidian.Path The full path to the new note.
    note_path_func = function(spec)
      local path = spec.dir / tostring(spec.id)
      return path:with_suffix(".md")
    end
  • Added config option picker.tag_mappings, analogous to picker.note_mappings.

  • Added log field to obsidian.Client for easier access to the logger.

  • Added ability to follow anchor and block links.

  • Added completion support for anchor and block links. Note that this requires you to update your wiki_link_func and markdown_link_func in your config to handle anchors and blocks. See the configuration example in the README.

  • You can set wiki_link_func to a one of the following strings to use a builtin function:

    • "use_alias_only", e.g. [[Foo Bar]]
    • "prepend_note_id", e.g. [[foo-bar|Foo Bar]]
    • "prepend_note_path", e.g. [[foo-bar.md|Foo Bar]]
    • "use_path_only", e.g. [[foo-bar.md]]
  • Added command :ObsidianDailies for opening a picker list of daily notes.

Changed ⚠️

  • Renamed config option picker.mappings to picker.note_mappings.

Fixed βœ…

  • Fixed consistency in frontmatter between opening daily notes with or without a template
  • Fixed issue with :ObsidianOpen on windows.
  • Respect telescope.nvim themes configured by user.
  • Make tags completion more efficient (less CPU time!).
  • Added file/directory completion to image name prompt from :ObsidianPasteImg.
  • Handle prompt cancellation gracefully.
  • Fix lua diagnostic warnings about missing fields in the configuration.
  • Made Client:resolve_note() more robust to when the search term is a file name.

Commits

6888c76 chore(release): bump version to v3.7.0 for release
d0d699c Update picker titles
43abaa3 Use header under cursor when collecting backlinks
4c5a1b0 Use block ID under cursor for backlinks
eb5706e chore(docs): auto generate docs
ad0d6bb Add leave-note callback event
ba116f3 chore(docs): auto generate docs
554b0d6 Add template option to Client:create_note()
656313b Show sub tags
3fd4877 chore(docs): auto generate docs
1c2921e support anchors/blocks in backlinks
598cc7d Fix #478
52f94d0 chore(docs): auto generate docs
e69b824 Support datetime macros with cmp_obsidian_new
51bc688 Make nvim-cmp completion more robust to different link formats
3393e3b Make Client:resolve_note robust to file name searches.
497d605 Allow '+' in URLs for detection
81c560a Error when templates fail instead of log
0cde098 Fix some type hints (#474)
86468d7 chore(docs): auto generate docs
7b27902 Add ext marks for block IDs
3704c5e Clean up
02971d2 provide consistency between daily notes frontmatter with/without template (#472)
2814bd2 chore(docs): auto generate docs
1f31e2b Add more context to cmp entry documentation
aa4312f chore(docs): auto generate docs
f1f106e add support for block links
207bdea Clean up unnecessary diagnostic comments
62c845f fix: handle timer nil value in async.throttle function (#468)
169f3ef Handle prompt cancellation gracefully
28ddc4c Fix bug with log.log_once()
3158718 Fix lint
cb309f2 chore(docs): auto generate docs
8d3fbb2 Handle blocks links
a29d178 Ensure line and col are in picker entry
4e53636 Consolidate code that falls back to picker
0e5e062 Use picker when we can't resolve to a single note
57c14b7 Ignore case in backlinks search
ae0c95f Ensure daily note is given title
0a4f7d3 Sort :ObsidianLinks entries by lnum
8101f72 Add :ObsidianDailies command
099ef3d Add file/dir completion to image name prompt
656d9c2 Add more details to CHANGELOG
fe7464d Catch single char anchors for completion
42c8d1a chore(docs): auto generate docs
06c1ee7 minor improvements
ab6877f minor improvement to tags and new cmp sources
89672ca chore(docs): auto generate docs
47ccca2 Handle nested anchor links, improve completion (#460)
977e621 Fix open cmd on windows (#459)
c57b248 Respect user's telescope.nvim themes
b14c882 chore(docs): auto generate docs
225f80d Add completion for header anchors (#457)
2746f79 chore(docs): auto generate docs
38abaa1 Merge pull request #455 from epwalsh/epwalsh/lua-api-improvements
60432d3 Add a safety check for note_id_func
6eb6707 chore(docs): auto generate docs
f615466 CHANGELOG
4648518 :ObsidianFollowLink will now attempt to resolve anchor
1e0b4ce chore(docs): auto generate docs
8879320 Add basic callbacks system (#451)
4c521b9 Make util.get_visual_selection() more robust
7734811 Fix bug with getting viz selection for tags command
bbc553f Don't use telescope previewer for string values
35f27e2 chore(docs): auto generate docs
9ff9f34 Added note_path_func option to customize how note fname are generated (#445)
c7812ab chore(docs): auto generate docs
cc4efa1 Picker improvements (#447)
a6af03b add more info to debug output
3cfbf14 Make util.strip_comments() more robust
f60660b make logging more robust

v3.6.1

28 Feb 21:19
Compare
Choose a tag to compare

What's new

Added πŸŽ‰

  • Added configuration option attachments.confirm_img_paste: boolean to allow users to control whether they are prompted for confirmation when pasting an image.

Fixed βœ…

  • Only show unique links in buffer with :ObsidianLinks.

Commits

b1f5eb1 chore(release): bump version to v3.6.1 for release
c00b6f2 Make :ObsidianCheck more robust
813254b Add extra assert to be safe
a07e828 Remove unnecessary code in Path:relative_to()
fc6cb8a Let user control whether paste image is confirmed (#442)
ebf4cd2 Only show unique links with :ObsidianLinks cmd

v3.6.0

27 Feb 15:33
Compare
Choose a tag to compare

What's new

Various bug fixes and Lua API improvements.

Changed ⚠️

  • Deprecated Client:new_note() in favor of Client:create_note().
  • Changed API of Client:apply_async() to take a table of options in place of the 2nd and 3rd arguments.
  • Changed API of Note:save() to take a table of options.

Fixed βœ…

  • Ignore things that looks like tags within code blocks.
  • Fixed bug with pasting images.

Commits

b77e4c1 chore(release): bump version to v3.6.0 for release
ef956c8 Fix bug with pasting images
cb5a8d1 Make tags search for efficient
60851cc chore(docs): auto generate docs
4c36010 Ignore things that look like tags in code blocks
953f67c Add Note.from_file_with_contents_async()
3ef8090 ignore false positive from Luacheck
37c356c chore(docs): auto generate docs
9cfd03c Make Note:save() more robust
2fa0d93 Make Path.new more robust
34897c2 Update API of Note:save()
69bf964 Add @deprecated annotation to Client:new_note()
b21de4e Update API for Client:apply_async()
d68b2a1 chore(docs): auto generate docs
daab784 API and internal improvements (#438)

v3.5.3

25 Feb 16:01
Compare
Choose a tag to compare

What's new

Fixed βœ…

  • Fixed regression with cloning templates where a directory was created instead of a file.

Commits

9ede6c8 chore(release): bump version to v3.5.3 for release
76d76c6 Fix bug with cloning templates (#437)