cleanup
This commit is contained in:
parent
2339f35451
commit
df30a0ba0a
2 changed files with 50 additions and 42 deletions
|
@ -41,13 +41,6 @@ local autocmds = {
|
|||
command = "silent!!xrdb %",
|
||||
},
|
||||
},
|
||||
{ -- Trigger asciidoctor-pdf
|
||||
"BufWritePost",
|
||||
{
|
||||
pattern = { "*.adoc" },
|
||||
command = "silent!!asciidoctor -r asciidoctor-pdf -r asciidoctor-diagram -b pdf % &",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
vim.api.nvim_create_augroup("user_config", { clear = true })
|
||||
|
|
|
@ -85,9 +85,11 @@ return {
|
|||
},
|
||||
config = function(_, opts)
|
||||
local key = Lib.get_secret("openai")
|
||||
if key then
|
||||
require("chatgpt.api").OPENAI_API_KEY = key
|
||||
require("chatgpt.api").AUTHORIZATION_HEADER = "Authorization: Bearer " .. key
|
||||
require("chatgpt").setup(opts)
|
||||
end
|
||||
end,
|
||||
--stylua: ignore
|
||||
keys = {
|
||||
|
@ -130,6 +132,9 @@ return {
|
|||
border = {
|
||||
style = "single",
|
||||
},
|
||||
win_options = {
|
||||
winhighlight = "Normal:NormalFloat,FloatBorder:FloatBorder",
|
||||
},
|
||||
},
|
||||
keymaps = {
|
||||
close = "<C-c>",
|
||||
|
@ -270,7 +275,17 @@ return {
|
|||
keys = {
|
||||
{ "<leader>zn", function() require("zk.commands").get("ZkNew")({ title = vim.fn.input('Title: ') }) end, desc = "New Note", mode = { "n", "v" } },
|
||||
{ "<leader>znt", function() require("zk.commands").get("ZkNewFromTitleSelection")() end, desc = "Title from selection", mode = { "v" } },
|
||||
{ "<leader>znc", function() require("zk.commands").get("ZkNewFromContentSelection")({ title = vim.fn.input('Title: ') }) end, desc = "Content from selection", mode = { "v" } },
|
||||
{
|
||||
"<leader>znc",
|
||||
function()
|
||||
require("zk.commands").get("ZkNewFromContentSelection")({
|
||||
title = vim.fn.input(
|
||||
'Title: ')
|
||||
})
|
||||
end,
|
||||
desc = "Content from selection",
|
||||
mode = { "v" }
|
||||
},
|
||||
{ "<leader>zb", function() require("zk.commands").get("ZkBacklinks")() end, desc = "Links" },
|
||||
{ "<leader>zl", function() require("zk.commands").get("ZkLinks")() end, desc = "Backlinks" },
|
||||
{ "<leader>zx", function() require("zk.commands").get("ZkIndex")() end, desc = "Index" },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue