Compare commits
2 Commits
feature/up
...
8cb2e48406
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8cb2e48406 | ||
|
|
2fc3dc6ecf |
@@ -1,26 +0,0 @@
|
|||||||
return {
|
|
||||||
"saghen/blink.cmp",
|
|
||||||
opts = function(_, opts)
|
|
||||||
local completion_toggle = Snacks.toggle({
|
|
||||||
name = "Completion",
|
|
||||||
get = function()
|
|
||||||
return vim.b.completion
|
|
||||||
end,
|
|
||||||
set = function(state)
|
|
||||||
vim.b.completion = state
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
local function toggle_completion()
|
|
||||||
require("blink.cmp").hide()
|
|
||||||
completion_toggle:toggle()
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.keymap.set({ "i", "n" }, "<C-Space>", toggle_completion, { desc = "Toggle Completion" })
|
|
||||||
opts.enabled = function()
|
|
||||||
return vim.b.completion
|
|
||||||
end
|
|
||||||
|
|
||||||
return opts
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
22
nvim/lua/plugins/cmp.lua
Normal file
22
nvim/lua/plugins/cmp.lua
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
return {
|
||||||
|
"saghen/blink.cmp",
|
||||||
|
-- Make blink.cmp toogleable
|
||||||
|
opts = function(_, opts)
|
||||||
|
vim.b.completion = false
|
||||||
|
|
||||||
|
Snacks.toggle({
|
||||||
|
name = "Completion",
|
||||||
|
get = function()
|
||||||
|
return vim.b.completion
|
||||||
|
end,
|
||||||
|
set = function(state)
|
||||||
|
vim.b.completion = state
|
||||||
|
end,
|
||||||
|
}):map("<leader>uk")
|
||||||
|
|
||||||
|
opts.enabled = function()
|
||||||
|
return vim.b.completion ~= false
|
||||||
|
end
|
||||||
|
return opts
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -34,6 +34,27 @@ return {
|
|||||||
min_chars = 4,
|
min_chars = 4,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
daily_notes = {
|
||||||
|
-- Optional, if you keep daily notes in a separate directory.
|
||||||
|
folder = "0. Daily Notes",
|
||||||
|
-- Optional, if you want to change the date format for the ID of daily notes.
|
||||||
|
date_format = "%Y.%m.%d",
|
||||||
|
-- Optional, if you workant to change the date format of the default alias of daily notes.
|
||||||
|
alias_format = "%B %-d, %Y",
|
||||||
|
-- Optional, default tags to add to each new daily note created.
|
||||||
|
default_tags = { "daily-notes" },
|
||||||
|
-- Optional, if you want to automatically insert a template from your template directory like 'daily.md'
|
||||||
|
template = "98. Templates/Daily Note",
|
||||||
|
},
|
||||||
|
|
||||||
|
templates = {
|
||||||
|
folder = "98. Templates",
|
||||||
|
date_format = "YYYY.MM.DD",
|
||||||
|
time_format = "HHMM",
|
||||||
|
-- A map for custom variables, the key should be the variable and the value a function
|
||||||
|
substitutions = {},
|
||||||
|
},
|
||||||
|
|
||||||
-- Optional, configure key mappings. These are the defaults. If you don't want to set any keymappings this
|
-- Optional, configure key mappings. These are the defaults. If you don't want to set any keymappings this
|
||||||
-- way then set 'mappings = {}'.
|
-- way then set 'mappings = {}'.
|
||||||
mappings = {
|
mappings = {
|
||||||
|
|||||||
Reference in New Issue
Block a user