Skip to content

Commit

Permalink
nvim: use blink.compat for obsidian autocompletion
Browse files Browse the repository at this point in the history
  • Loading branch information
rbmarliere committed Dec 30, 2024
1 parent fa4a9a9 commit a99bcd1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
19 changes: 18 additions & 1 deletion .config/nvim/lua/plugins/blink.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ return {
},
},
},
{ "saghen/blink.compat", lazy = true, version = false },
{ "epwalsh/obsidian.nvim" },
},
opts = {
enabled = function()
Expand All @@ -36,7 +38,7 @@ return {
},
},
sources = {
default = { "lazydev", "lsp", "path", "snippets", "buffer" },
default = { "obsidian", "obsidian_new", "obsidian_tags", "lazydev", "lsp", "path", "snippets", "buffer" },
cmdline = {},
providers = {
lazydev = {
Expand All @@ -53,6 +55,21 @@ return {
},
},
},
obsidian = {
name = "obsidian",
module = "blink.compat.source",
score_offset = 100,
},
obsidian_new = {
name = "obsidian_new",
module = "blink.compat.source",
score_offset = 100,
},
obsidian_tags = {
name = "obsidian_tags",
module = "blink.compat.source",
score_offset = 100,
},
},
},
},
Expand Down
3 changes: 2 additions & 1 deletion .config/nvim/lua/plugins/obsidian.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ return {
date_format = "%Y/%m-%B/%Y-%m-%d-%A",
},
completion = {
nvim_cmp = false,
nvim_cmp = true,
min_chars = 2,
},
note_id_func = function(title)
local suffix = ""
Expand Down
2 changes: 1 addition & 1 deletion .local/bin/sway.notes
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ echo -ne "\033]0;notes\007"

TMUX="tmux -L notes"
if ! $TMUX list-sessions 2>/dev/null; then
$TMUX new-session -d -s notes -c "$HOME/notes" "vi"
$TMUX new-session -d -s notes -c "$HOME/notes" "vi; exec bash"
$TMUX set-option -pg allow-rename off
$TMUX set-option -wg automatic-rename off
$TMUX set-option -g set-titles off
Expand Down

0 comments on commit a99bcd1

Please sign in to comment.