Skip to content

Commit a78fb6d

Browse files
authored
Merge pull request #5 from obsidian-nvim/blink-support
feat(completion): blink.cmp support
2 parents dbd6529 + 658f548 commit a78fb6d

23 files changed

+1252
-577
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
- Added `opts.follow_img_func` option for customizing how to handle image paths.
1313
- Added better handling for undefined template fields, which will now be prompted for.
14+
- Added support for the [`blink.cmp`](https://github.com/Saghen/blink.cmp) completion plugin.
1415

1516
### Changed
1617

README.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ _Keep in mind this plugin is not meant to replace Obsidian, but to complement it
2828

2929
## Features
3030

31-
▶️ **Completion:** Ultra-fast, asynchronous autocompletion for note references and tags via [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) (triggered by typing `[[` for wiki links, `[` for markdown links, or `#` for tags), powered by [`ripgrep`](https://github.com/BurntSushi/ripgrep).
31+
▶️ **Completion:** Ultra-fast, asynchronous autocompletion for note references and tags via [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) or [blink.cmp](https://github.com/Saghen/blink.cmp) (triggered by typing `[[` for wiki links, `[` for markdown links, or `#` for tags), powered by [`ripgrep`](https://github.com/BurntSushi/ripgrep).
3232

3333
[![See this screenshot](https://github.com/epwalsh/obsidian.nvim/assets/8812459/90d5f218-06cd-4ebb-b00b-b59c2f5c3cc1)](https://github.com/epwalsh/obsidian.nvim/assets/8812459/90d5f218-06cd-4ebb-b00b-b59c2f5c3cc1)
3434

@@ -195,6 +195,7 @@ The only **required** plugin dependency is [plenary.nvim](https://github.com/nvi
195195
**Completion:**
196196

197197
- **[recommended]** [hrsh7th/nvim-cmp](https://github.com/hrsh7th/nvim-cmp): for completion of note references.
198+
- [blink.cmp](https://github.com/Saghen/blink.cmp) (new): for completion of note references.
198199

199200
**Pickers:**
200201

@@ -266,8 +267,10 @@ This is a complete list of all of the options that can be passed to `require("ob
266267

267268
-- Optional, completion of wiki links, local markdown links, and tags using nvim-cmp.
268269
completion = {
269-
-- Set to false to disable completion.
270+
-- Enables completion using nvim_cmp
270271
nvim_cmp = true,
272+
-- Enables completion using blink.cmp
273+
blink = false,
271274
-- Trigger completion at 2 chars.
272275
min_chars = 2,
273276
},
@@ -612,7 +615,9 @@ See [using obsidian.nvim outside of a workspace / Obsidian vault](#usage-outside
612615

613616
#### Completion
614617

615-
obsidian.nvim will set itself up as an nvim-cmp source automatically when you enter a markdown buffer within your vault directory, you do **not** need to specify this plugin as a cmp source manually.
618+
obsidian.nvim supports nvim_cmp and blink.cmp completion plugins.
619+
620+
obsidian.nvim will set itself up automatically when you enter a markdown buffer within your vault directory, you do **not** need to specify this plugin as a cmp source manually.
616621

617622
Note that in order to trigger completion for tags _within YAML frontmatter_ you still need to type the "#" at the start of the tag. obsidian.nvim will remove the "#" when you hit enter on the tag completion item.
618623

lua/cmp_obsidian.lua

-309
This file was deleted.

0 commit comments

Comments
 (0)