Skip to content

Commit a2642d3

Browse files
author
neo451
committed
chore: remove config and doc for blink/nvim_cmp
1 parent 4c7991a commit a2642d3

File tree

4 files changed

+17
-19
lines changed

4 files changed

+17
-19
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ _This plugin is not meant to replace Obsidian, but to complement it._ The Obsidi
3232

3333
## 🍴 About the fork
3434

35-
The original project has not been actively maintained for quite a while and with the ever-changing Neovim ecosystem, new widely used tools such as [blink.cmp](https://github.com/Saghen/blink.cmp) or [snacks.picker](https://github.com/folke/snacks.nvim/blob/main/docs/picker.md) were not supported.
35+
The original project has not been actively maintained for quite a while and with the ever-changing Neovim ecosystem, new widely used tools such as [snacks.picker](https://github.com/folke/snacks.nvim/blob/main/docs/picker.md) were not supported.
3636

3737
With bugs, issues and pull requests piling up, people from the community decided to fork and maintain the project.
3838

@@ -41,7 +41,7 @@ With bugs, issues and pull requests piling up, people from the community decided
4141

4242
## ⭐ Features
4343

44-
▶️ **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)
44+
▶️ **Completion:** Fast, asynchronous autocompletion for note references and tags via LSP completion (triggered by typing `[[` for wiki links, `[` for markdown links, or `#` for tags)
4545

4646
🏃 **Navigation:** Navigate throughout your vault via links, backlinks, tags and etc.
4747

lua/obsidian/config/default.lua

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -81,22 +81,14 @@ return {
8181

8282
---@class obsidian.config.CompletionOpts
8383
---
84-
---@field nvim_cmp? boolean
85-
---@field blink? boolean
8684
---@field min_chars? integer
8785
---@field match_case? boolean
8886
---@field create_new? boolean
89-
completion = (function()
90-
local has_nvim_cmp, _ = pcall(require, "cmp")
91-
local has_blink = pcall(require, "blink.cmp")
92-
return {
93-
nvim_cmp = has_nvim_cmp and not has_blink,
94-
blink = has_blink,
95-
min_chars = 2,
96-
match_case = true,
97-
create_new = true,
98-
}
99-
end)(),
87+
completion = {
88+
min_chars = 2,
89+
match_case = true,
90+
create_new = true,
91+
},
10092

10193
---@class obsidian.config.PickerNoteMappingOpts
10294
---

lua/obsidian/config/init.lua

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,16 @@ config.normalize = function(opts, defaults)
153153
)
154154
end
155155

156+
if opts.completion ~= nil and opts.completion.blink ~= nil then
157+
opts.completion.blink = nil
158+
log.warn_once "The config option 'completion.blink' is deprecated, completion will work regardless of completion engine"
159+
end
160+
161+
if opts.completion ~= nil and opts.completion.nvim_cmp ~= nil then
162+
opts.completion.nvim_cmp = nil
163+
log.warn_once "The config option 'completion.nvim_cmp' is deprecated, completion will work regardless of completion engine"
164+
end
165+
156166
if opts.detect_cwd ~= nil then
157167
opts.detect_cwd = nil
158168
log.warn_once(

tests/helpers.lua

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ M.temp_vault = MiniTest.new_set {
5858
templates = {
5959
folder = "templates",
6060
},
61-
completion = {
62-
blink = false,
63-
nvim_cmp = false,
64-
},
6561
log_level = vim.log.levels.WARN,
6662
}
6763

0 commit comments

Comments
 (0)