feat: register obsidian.nvim cmp source

This commit is contained in:
Youwen Wu 2024-12-29 15:53:22 -08:00
parent 1becd97d57
commit 4d4c7550eb
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3
4 changed files with 20 additions and 3 deletions

View file

@ -175,6 +175,7 @@
lazydev-nvim
plenary-nvim
obsidian-nvim
blink-compat
# colorschemes
rose-pine

View file

@ -3,6 +3,7 @@ return {
event = "BufEnter",
after = function()
require("lz.n").trigger_load("blink-ripgrep")
require("lz.n").trigger_load("blink.compat")
require("blink.cmp").setup({
keymap = {
@ -21,7 +22,7 @@ return {
default = { "lsp", "path", "snippets", "buffer" },
per_filetype = {
lua = { "lazydev", "lsp", "path", "snippets", "buffer" },
markdown = { "lsp", "path", "snippets", "buffer", "markdown" },
markdown = { "lsp", "snippets", "obsidian", "obsidian_new", "obsidian_tags", "path", "buffer", "markdown" },
},
providers = {
ripgrep = {
@ -34,6 +35,18 @@ return {
score_offset = 100,
},
markdown = { name = "RenderMarkdown", module = "render-markdown.integ.blink" },
obsidian = {
name = "obsidian",
module = "blink.compat.source",
},
obsidian_new = {
name = "obsidian_new",
module = "blink.compat.source",
},
obsidian_tags = {
name = "obsidian_tags",
module = "blink.compat.source",
},
},
},
completion = {

View file

@ -231,6 +231,7 @@ return {
end,
},
{ "blink-ripgrep", lazy = true },
{ "blink.compat", lazy = true },
{
"lazydev.nvim",
filetypes = { "lua" },

View file

@ -36,10 +36,12 @@ return {
local workspaces = get_workspaces()
if #workspaces > 0 then
require("obsidian").setup({
local opts = {
ui = { enable = false },
workspaces = workspaces,
})
completion = { nvim_cmp = false },
}
require("obsidian").setup(opts)
end
end,
}