You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+82-59Lines changed: 82 additions & 59 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,21 +3,43 @@
3
3
All notable changes to this project will be documented in this file.
4
4
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) with respect to the public API, which currently includes the installation steps, dependencies, configuration, keymappings, commands, and other plugin functionality. At the moment this does *not* include the Lua `Client` API, although in the future it will once that API stabilizes.
6
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) with respect to the public API, which currently includes the installation steps, dependencies, configuration, keymappings, commands, and other plugin functionality. At the moment this does _not_ include the Lua `Client` API, although in the future it will once that API stabilizes.
7
7
8
8
## Unreleased
9
9
10
10
### Added
11
11
12
+
- Added default `image_name_func` similar to Obsidian's.
13
+
- Added support `text/uri-list` to `ObsidianPasteImg`.
14
+
15
+
### Changed
16
+
17
+
-`ObsidianToggleCheckbox` now works in visual mode for multiline toggle
18
+
-`ObsidianRename` input field is pre-filled filled with the current note id to ease renaming
19
+
- Improved type annotations for user commands: add `CommandArgs` type.
20
+
21
+
### Fixed
22
+
23
+
- Enhanced completion menu to correctly display and handle non-English (ex. Korean) file names and tags in link, fixing Unicode encoding issues
- Added `opts.follow_img_func` option for customizing how to handle image paths.
13
30
- Added better handling for undefined template fields, which will now be prompted for.
14
31
- Added support for the [`snacks.picker`](https://github.com/folke/snacks.nvim/blob/main/docs/picker.md) picker
15
32
- Added support for the [`blink.cmp`](https://github.com/Saghen/blink.cmp) completion plugin.
33
+
- Added health check module
34
+
- Added a minimal sandbox script `minimal.lua`
16
35
17
36
### Changed
18
37
19
38
- Renamed `opts.image_name_func` to `opts.attachments.img_name_func`.
20
39
- Default to not activate ui render when `render-markdown.nvim` or `markview.nvim` is present
40
+
-`smart_action` shows picker for tags (`ObsidianTag`) when cursor is on a tag
41
+
-`ObsidianToggleCheckbox` now works with numbered lists
42
+
-`Makefile` is friendlier: self-documenting and automatically gets dependencies
21
43
22
44
### Fixed
23
45
@@ -196,11 +218,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
196
218
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:
197
219
198
220
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:
199
-
- Typical Obsidian-style wiki links, e.g. `[[My note#Heading 1]]`, `[[My note#Heading 1#Sub heading]]`, `[[My note#^block-123]]`.
200
-
- Wiki links with a label, e.g. `[[my-note#heading-1|Heading 1 in My Note]]`.
201
-
- Markdown links, e.g. `[Heading 1 in My Note](my-note.md#heading-1)`.
202
221
203
-
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]]`.
222
+
- Typical Obsidian-style wiki links, e.g. `[[My note#Heading 1]]`, `[[My note#Heading 1#Sub heading]]`, `[[My note#^block-123]]`.
223
+
- Wiki links with a label, e.g. `[[my-note#heading-1|Heading 1 in My Note]]`.
224
+
- Markdown links, e.g. `[Heading 1 in My Note](my-note.md#heading-1)`.
225
+
226
+
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]]`.
204
227
205
228
2. 📲 A basic callback system to let you easily customize obisidian.nvim's behavior even more. There are currently 4 events: `post_setup`, `enter_note`, `pre_write_note`, and `post_set_workspace`. You can define a function for each of these in your config.
206
229
3. 🔭 Improved picker integrations (especially for telescope), particular for the `:ObsidianTags` command. See <https://github.com/epwalsh/obsidian.nvim/discussions/450> for a demo.
@@ -211,44 +234,44 @@ Full changelog below 👇
211
234
212
235
- Added a configurable callback system to further customize obsidian.nvim's behavior. Callbacks are defined through the `callbacks` field in the config:
213
236
214
-
```lua
215
-
callbacks= {
216
-
-- Runs at the end of `require("obsidian").setup()`.
217
-
---@paramclientobsidian.Client
218
-
post_setup=function(client) end,
219
-
220
-
-- Runs anytime you enter the buffer for a note.
221
-
---@paramclientobsidian.Client
222
-
---@paramnoteobsidian.Note
223
-
enter_note=function(client, note) end,
224
-
225
-
-- Runs anytime you leave the buffer for a note.
226
-
---@paramclientobsidian.Client
227
-
---@paramnoteobsidian.Note
228
-
leave_note=function(client, note) end,
229
-
230
-
-- Runs right before writing the buffer for a note.
- 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:
Please read this document to learn the various steps you should take before submitting a pull request.
5
+
6
+
## TL;DR
7
+
8
+
- Start an issue to discuss the planned changes
9
+
- To submit a pull request
10
+
- Start developing your feature in a branch
11
+
- Make sure that your codes complies the `obsidian.nvim` code style, run
12
+
`make chores`
13
+
- The PR should contain
14
+
- The code changes
15
+
- Tests for the code changes
16
+
- Documentation for the code changes (in the code itself and in the `README.md`)
17
+
-`CHANGELOG.md` entry for the code changes
18
+
19
+
## Details
20
+
21
+
Note: we automate tedious tasks using a `Makefile` in the root of the repository.
22
+
Just call `make` to see what you can do, or `make chores` to run the most important tasks on your code.
23
+
You can override some parts of the `Makefile` by setting env variables.
24
+
25
+
### Local development with LuaLS and `plenary.nvim`
26
+
27
+
If you're using the [Lua Language Server](https://luals.github.io) (LuaLS) you'll probably want to add `plenary.nvim` as a workspace library since we rely heavily on plenary throughout the codebase.
28
+
You can do this by adding a `.luarc.json` configuration file that looks like this:
Make sure that the path there to plenary is correct for you.
39
+
40
+
### Keeping the `CHANGELOG.md` up-to-date
41
+
42
+
This project tries hard to adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
43
+
and we maintain a [`CHANGELOG`](https://github.com/obsidian-nvim/obsidian.nvim/blob/main/CHANGELOG.md)
44
+
with a format based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
45
+
If your PR addresses a bug or makes any other substantial change,
46
+
please be sure to add an entry under the "Unreleased" section at the top of `CHANGELOG.md`.
47
+
Entries should always be in the form of a list item under a level-3 header of either "Added", "Fixed", "Changed", or "Removed" for the most part.
48
+
If the corresponding level-3 header for your item does not already exist in the "Unreleased" section, you should add it.
49
+
50
+
### Formatting code
51
+
52
+
TL;DR: `make style`
53
+
54
+
Lua code should be formatted using [StyLua](https://github.com/JohnnyMorganz/StyLua).
55
+
Once you have StyLua installed, you can run `make style` to automatically apply styling to all of the Lua files in this repo.
56
+
57
+
### Linting code
58
+
59
+
TL;DR: `make lint`
60
+
61
+
We use [luacheck](https://github.com/mpeterv/luacheck) to lint the Lua code.
62
+
Once you have `luacheck` installed, you can run `make lint` to get a report.
63
+
64
+
### Running tests
65
+
66
+
TL;DR: `make test`
67
+
68
+
Tests are written in the `test/` folder and are run using the [Plenary](https://github.com/nvim-lua/plenary.nvim) test harness.
69
+
Since Plenary is a dependency of `obsidian.nvim`, you probably already have it installed somewhere.
70
+
To run the tests locally you'll need to know where it's installed, which depends on your plugin manager.
71
+
In my case I use `Lazy.nvim` which puts Plenary at `~/.local/share/nvim/lazy/plenary.nvim/`.
72
+
73
+
### Building the vim user documentation
74
+
75
+
TL;DR: `make user-docs`
76
+
77
+
The Vim documentation lives at `doc/obsidian.txt`, which is automatically generated from the `README.md` using [panvimdoc](https://github.com/kdheepak/panvimdoc).
78
+
**Please only commit documentation changes to the `README.md`, not `doc/obsidian.txt`.**
79
+
80
+
However you can test how changes to the README will affect the Vim doc by running `panvimdoc` locally.
81
+
To do this you'll need install `pandoc` (e.g. `brew install pandoc` on Mac)
82
+
and clone [panvimdoc](https://github.com/kdheepak/panvimdoc) (e.g. `git clone [email protected]:kdheepak/panvimdoc.git ../panvimdoc`).
83
+
84
+
This will build the Vim documentation to `/tmp/obsidian.txt`.
85
+
86
+
### Building the vim API documentation
87
+
88
+
TL;DR: `make api-docs`
89
+
90
+
The API docs lives in `doc/obsidian_api.txt` and is generated from the source code using [`mini.docs`](https://github.com/echasnovski/mini.doc).
0 commit comments