This commit is contained in:
Jeff Lance 2023-10-09 22:25:32 +02:00
parent 4a3c4dac21
commit 9a3eee6938
4 changed files with 27 additions and 11 deletions

View File

@ -83,7 +83,7 @@ lvim.builtin.which_key.mappings["g"] = {}
lvim.builtin.which_key.mappings["H"] = lvim.builtin.which_key.mappings["h"]
lvim.builtin.which_key.mappings["h"] = {
name = "Header",
name = " Header",
h = { "<CMD>AddHeader<CR>", "Add header to the file" },
m = { "<CMD>AddMinHeader<CR>", "Add minimal header to the file" },
lg = { "<CMD>AddGNULicense<CR>", "Add GPLv3 License" },
@ -94,14 +94,16 @@ lvim.builtin.which_key.mappings["Lv"] = lvim.builtin.which_key.mappings["L"]
lvim.builtin.which_key.mappings["Ll"] = lvim.builtin.which_key.mappings["l"]
lvim.builtin.which_key.mappings["l"] = {}
lvim.builtin.which_key.mappings["L"] = {
name = "LSP, Lunar"
name = " LSP, Lunar"
}
lvim.builtin.which_key.mappings["Lve"] = lvim.builtin.which_key.mappings["Lvc"]
lvim.builtin.which_key.mappings["Lvc"] = {}
lvim.builtin.which_key.mappings["n"] = {
name = "Notes",
n = { "<CMD>ZkNew { dir = vim.fn.input('Groupe: '), title = vim.fn.input('Titre: ') }<CR>",
lvim.builtin.which_key.mappings["n"] = { "<CMD>AdvancedNewFile<CR>", "Create a new file"}
lvim.builtin.which_key.mappings["N"] = {
name = " Notes",
c = { "<CMD>edit /home/jeff/.config/zk/config.toml<CR>", "Edit config.toml" },
n = { "<CMD>ZkNew { dir = vim.fn.input('Groupe: '), title = vim.fn.input('Titre: '), date = 'now' }<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é" },
@ -226,6 +228,10 @@ lvim.plugins = {
]])
end,
},
-- new file plugin
{
'Mohammed-Taher/AdvancedNewFile.nvim',
},
-- asyncrun
{
"skywind3000/asyncrun.vim",

View File

@ -33,10 +33,10 @@ whk.register {
whk.register {
["<localleader>"] = { -- to set a completly new using only the localleader key
name = "LaTeX",
name = " LaTeX",
c = { "<cmd>VimtexCompileSS<CR>", "Single-shot compile project" },
C = {
name = "Compile",
name = " Compile",
s = { "<cmd>VimtexStop<CR>", "Stop compile" },
c = { "<cmd>VimtexCompileSelected<CR>", "Compile Selected" },
},
@ -46,12 +46,12 @@ whk.register {
o = { "<cmd>VimtexView<CR>", "View pdf" },
s = { "<cmd>VimtexStatus<CR>", "Look at the status" },
T = {
name = "TOC",
name = " TOC",
o = { "<cmd>VimtexTocOpen<CR>", "Open TOC" },
t = { "<cmd>VimtexTocToggle<CR>", "Toggle TOC" },
},
V = {
name = "VimTeX",
name = " VimTeX",
c = { "<CMD>edit /home/jeff/.config/lvim/ftplugin/tex.lua<CR>", "Edit configuration" },
s = { "<CMD>edit /home/jeff/.config/lvim/luasnippets/tex.lua<CR>", "Edit snippets" },
i = { "<cmd>VimtexInfo<CR>", "Vimtex Info" },

View File

@ -20,7 +20,7 @@ default-title = "Untitled"
# Template used to generate a note's filename, without extension.
#filename = "{{id}}"
filename = "{{id}}-{{slug title}}"
filename = "{{slug title}}"
# filename = "{{format-date now}}-{{slug title}}"
# The file extension used for the notes.
@ -58,7 +58,9 @@ id-case = "lower"
# A dictionary of variables you can use for any custom values when generating
# new notes. They are accessible in templates with {{extra.<key>}}
[extra]
author = "Jeff Lance"
mail = "email@jefflance.me"
# GROUP OVERRIDES

View File

@ -1,3 +1,11 @@
---
title: {{title}}
date: {{format-date now "short"}}
author: {{extra.author}}
mail: {{extra.mail}}
tags: #{{dir}}#
---
# {{title}}
{{content}}