blink.lib + neorg
This commit is contained in:
parent
add1882062
commit
dac9d33960
2 changed files with 4 additions and 17 deletions
2
init.lua
2
init.lua
|
|
@ -13,7 +13,7 @@ local plugins = {
|
||||||
"treesitter",
|
"treesitter",
|
||||||
"nvim-lint",
|
"nvim-lint",
|
||||||
|
|
||||||
-- "neorg",
|
"neorg",
|
||||||
|
|
||||||
"nightfox",
|
"nightfox",
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,10 @@ return {
|
||||||
require("lazydev").setup({})
|
require("lazydev").setup({})
|
||||||
|
|
||||||
load("rafamadriz/friendly-snippets")
|
load("rafamadriz/friendly-snippets")
|
||||||
|
load("saghen/blink.lib")
|
||||||
load("saghen/blink.cmp")
|
load("saghen/blink.cmp")
|
||||||
|
|
||||||
|
|
||||||
---@module "blink.cmp"
|
---@module "blink.cmp"
|
||||||
require("blink.cmp").setup({
|
require("blink.cmp").setup({
|
||||||
keymap = { preset = "super-tab" },
|
keymap = { preset = "super-tab" },
|
||||||
|
|
@ -47,22 +49,7 @@ return {
|
||||||
end,
|
end,
|
||||||
onUpdate = function()
|
onUpdate = function()
|
||||||
vim.notify("Building blink.cmp", vim.log.levels.INFO)
|
vim.notify("Building blink.cmp", vim.log.levels.INFO)
|
||||||
local cmd
|
require('blink.cmp').build():pwait()
|
||||||
if vim.fn.executable("nix") == 1 then
|
|
||||||
cmd = { "nix", "run", ".#build-plugin" }
|
|
||||||
elseif vim.fn.executable("cargo") == 1 then
|
|
||||||
cmd = { "cargo", "build", "--release" }
|
|
||||||
else
|
|
||||||
print("either cargo or nix is needed to build blink.cmp fzf")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
local obj = vim.system(cmd, { cwd = vim.pack.get({ "blink.cmp" })[1].path })
|
|
||||||
:wait()
|
|
||||||
if obj.code == 0 then
|
|
||||||
vim.notify("Building blink.cmp done", vim.log.levels.INFO)
|
|
||||||
else
|
|
||||||
vim.notify("Building blink.cmp failed", vim.log.levels.ERROR)
|
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue