Compare commits

...

2 Commits

Author SHA1 Message Date
844e227103 add env var for zk note app 2023-08-05 15:52:16 +02:00
b129eb5925 update config for vimtex 2023-08-05 15:51:36 +02:00
2 changed files with 39 additions and 48 deletions

View File

@ -51,6 +51,7 @@ export MYVIMRC="${HOME}/.vimrc"
export PASSWORD_STORE_DIR="${HOME}/Private/.password-store" export PASSWORD_STORE_DIR="${HOME}/Private/.password-store"
export PASSWORD_STORE_ENABLE_EXTENSIONS=True export PASSWORD_STORE_ENABLE_EXTENSIONS=True
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus
export ZK_NOTEBOOK_DIR="${HOME}/Notes"
# <<< environment variables <<< # <<< environment variables <<<
# >>> kitty completion >>> # >>> kitty completion >>>

View File

@ -116,6 +116,15 @@ lvim.builtin.which_key.mappings["l"] = {
}, },
} }
lvim.builtin.which_key.mappings["n"] = {
name = "Notes",
n = { "<CMD>ZkNew { title = vim.fn.input('Titre: ') }<CR>", "Créer une nouvelle note" },
o = { "<CMD>ZkNotes { sort = { 'modified' } }<CR>", "Ouvrir une note"},
O = { "<CMD>ZkTags<CR>", "Ouvrir les notes avec le tag sélectionné" },
f = { "<CMD>ZkNotes { sort = { 'modified' }, match = { vim.fn.input('Rechercher note: ') } }<CR>", "Rechercher une note" },
F = { ":'<,'>ZkMatch<CR>", "Rechercher les notes contenant la sélection" },
}
lvim.builtin.which_key.mappings["o"] = { "<CMD>Telescope find_files<CR>", "Open a file" } lvim.builtin.which_key.mappings["o"] = { "<CMD>Telescope find_files<CR>", "Open a file" }
lvim.builtin.which_key.mappings["P"] = lvim.builtin.which_key.mappings["p"] lvim.builtin.which_key.mappings["P"] = lvim.builtin.which_key.mappings["p"]
@ -126,20 +135,6 @@ lvim.builtin.which_key.mappings["s"] = { "<CMD>echom 'Sourcing' <BAR> source %<C
lvim.builtin.which_key.mappings["r"] = { "<CMD>Telescope oldfiles<CR>", "Open recent file" } lvim.builtin.which_key.mappings["r"] = { "<CMD>Telescope oldfiles<CR>", "Open recent file" }
lvim.builtin.which_key.mappings["z"] = {
name = "Zettel",
c = { "<CMD>lua require('neuron/cmd').new_edit('/home/jeff/Notes/')<CR>", "Create new note" },
i = { "<CMD>lua require'neuron'.goto_index()<CR>", "Goto notes index"},
z = { "<CMD>lua require'neuron/telescope'.find_zettels()<CR>", "Find notes" },
Z = { "<CMD>lua require'neuron/telescope'.find_zettels {insert = true}<CR>", "Insert the found note ID" },
b = { "<CMD>lua require'neuron/telescope'.find_backlinks()<CR>", "Backlinks of the current note" },
B = { "<CMD>lua require'neuron/telescope'.find_backlinks {insert = true}<CR>", "As b but insert the found ID" },
t = { "<CMD>lua require'neuron/telescope'.find_tags()<CR>", "Find all tags and insert" },
s = { "<CMD>lua require'neuron'.rib {address = '127.0.0.1:8200', verbose = true}<CR>", "Start neuron server" },
n = { "<CMD>lua require'neuron'.goto_next_extmark()<CR>", "Goto next link" },
p = { "<CMD>lua require'neuron'.goto_prev_extmark()<CR>", "Goto previous link" },
}
lvim.builtin.which_key.mappings["x"] = { "<CMD>w! <BAR> q!<CR>", "Save and quit"} lvim.builtin.which_key.mappings["x"] = { "<CMD>w! <BAR> q!<CR>", "Save and quit"}
lvim.builtin.which_key.mappings[";"] = {} lvim.builtin.which_key.mappings[";"] = {}
@ -379,16 +374,11 @@ lvim.plugins = {
}) })
end end
}, },
-- neuron: note taking -- zk: a plain text note-taking assistant
{ {
'oberblastmeister/neuron.nvim', 'mickael-menu/zk-nvim',
config = function() config = function()
require("neuron").setup({ require("zk").setup({
virtual_titles = true,
mappings = true,
run = nil,
neuron_dir = "~/Notes",
leader = ";z",
}) })
end, end,
}, },
@ -508,33 +498,33 @@ end
-- --
-- minimap view -- minimap view
lvim.autocommands = { -- lvim.autocommands = {
{ -- {
{"BufEnter", "Filetype"}, -- {"BufEnter", "Filetype"},
{ -- {
desc = "Open mini.map and exclude some filetypes", -- desc = "Open mini.map and exclude some filetypes",
pattern = { "*" }, -- pattern = { "*" },
callback = function() -- callback = function()
local exclude_ft = { -- local exclude_ft = {
"qf", -- "qf",
"NvimTree", -- "NvimTree",
"toggleterm", -- "toggleterm",
"TelescopePrompt", -- "TelescopePrompt",
"alpha", -- "alpha",
"netrw", -- "netrw",
} -- }
local map = require('mini.map') -- local map = require('mini.map')
if vim.tbl_contains(exclude_ft, vim.o.filetype) then -- if vim.tbl_contains(exclude_ft, vim.o.filetype) then
vim.b.minimap_disable = true -- vim.b.minimap_disable = true
map.close() -- map.close()
elseif vim.o.buftype == "" then -- elseif vim.o.buftype == "" then
map.open() -- map.open()
end -- end
end, -- end,
}, -- },
}, -- },
} -- }
-- wrap mode for json files -- wrap mode for json files
vim.api.nvim_create_autocmd("BufEnter", { vim.api.nvim_create_autocmd("BufEnter", {