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
|
lazydev-nvim
|
||||||
plenary-nvim
|
plenary-nvim
|
||||||
obsidian-nvim
|
obsidian-nvim
|
||||||
|
blink-compat
|
||||||
|
|
||||||
# colorschemes
|
# colorschemes
|
||||||
rose-pine
|
rose-pine
|
||||||
|
|
|
@ -3,6 +3,7 @@ return {
|
||||||
event = "BufEnter",
|
event = "BufEnter",
|
||||||
after = function()
|
after = function()
|
||||||
require("lz.n").trigger_load("blink-ripgrep")
|
require("lz.n").trigger_load("blink-ripgrep")
|
||||||
|
require("lz.n").trigger_load("blink.compat")
|
||||||
|
|
||||||
require("blink.cmp").setup({
|
require("blink.cmp").setup({
|
||||||
keymap = {
|
keymap = {
|
||||||
|
@ -21,7 +22,7 @@ return {
|
||||||
default = { "lsp", "path", "snippets", "buffer" },
|
default = { "lsp", "path", "snippets", "buffer" },
|
||||||
per_filetype = {
|
per_filetype = {
|
||||||
lua = { "lazydev", "lsp", "path", "snippets", "buffer" },
|
lua = { "lazydev", "lsp", "path", "snippets", "buffer" },
|
||||||
markdown = { "lsp", "path", "snippets", "buffer", "markdown" },
|
markdown = { "lsp", "snippets", "obsidian", "obsidian_new", "obsidian_tags", "path", "buffer", "markdown" },
|
||||||
},
|
},
|
||||||
providers = {
|
providers = {
|
||||||
ripgrep = {
|
ripgrep = {
|
||||||
|
@ -34,6 +35,18 @@ return {
|
||||||
score_offset = 100,
|
score_offset = 100,
|
||||||
},
|
},
|
||||||
markdown = { name = "RenderMarkdown", module = "render-markdown.integ.blink" },
|
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 = {
|
completion = {
|
||||||
|
|
|
@ -231,6 +231,7 @@ return {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{ "blink-ripgrep", lazy = true },
|
{ "blink-ripgrep", lazy = true },
|
||||||
|
{ "blink.compat", lazy = true },
|
||||||
{
|
{
|
||||||
"lazydev.nvim",
|
"lazydev.nvim",
|
||||||
filetypes = { "lua" },
|
filetypes = { "lua" },
|
||||||
|
|
|
@ -36,10 +36,12 @@ return {
|
||||||
local workspaces = get_workspaces()
|
local workspaces = get_workspaces()
|
||||||
|
|
||||||
if #workspaces > 0 then
|
if #workspaces > 0 then
|
||||||
require("obsidian").setup({
|
local opts = {
|
||||||
ui = { enable = false },
|
ui = { enable = false },
|
||||||
workspaces = workspaces,
|
workspaces = workspaces,
|
||||||
})
|
completion = { nvim_cmp = false },
|
||||||
|
}
|
||||||
|
require("obsidian").setup(opts)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue