feat: register obsidian.nvim cmp source
This commit is contained in:
parent
1becd97d57
commit
4d4c7550eb
4 changed files with 20 additions and 3 deletions
|
@ -175,6 +175,7 @@
|
|||
lazydev-nvim
|
||||
plenary-nvim
|
||||
obsidian-nvim
|
||||
blink-compat
|
||||
|
||||
# colorschemes
|
||||
rose-pine
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -231,6 +231,7 @@ return {
|
|||
end,
|
||||
},
|
||||
{ "blink-ripgrep", lazy = true },
|
||||
{ "blink.compat", lazy = true },
|
||||
{
|
||||
"lazydev.nvim",
|
||||
filetypes = { "lua" },
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue