From 9a3eee6938ba9f97e97fc2d82846ed1c2d36b2d0 Mon Sep 17 00:00:00 2001 From: Jeff LANCE Date: Mon, 9 Oct 2023 22:25:32 +0200 Subject: [PATCH] update --- conf.d/lvim/config.lua | 16 +++++++++++----- conf.d/lvim/ftplugin/tex.lua | 8 ++++---- conf.d/zk/config.toml | 4 +++- conf.d/zk/templates/default.md | 10 +++++++++- 4 files changed, 27 insertions(+), 11 deletions(-) diff --git a/conf.d/lvim/config.lua b/conf.d/lvim/config.lua index 1de1278..a7a742d 100644 --- a/conf.d/lvim/config.lua +++ b/conf.d/lvim/config.lua @@ -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 = { "AddHeader", "Add header to the file" }, m = { "AddMinHeader", "Add minimal header to the file" }, lg = { "AddGNULicense", "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 = { "ZkNew { dir = vim.fn.input('Groupe: '), title = vim.fn.input('Titre: ') }", +lvim.builtin.which_key.mappings["n"] = { "AdvancedNewFile", "Create a new file"} +lvim.builtin.which_key.mappings["N"] = { + name = " Notes", + c = { "edit /home/jeff/.config/zk/config.toml", "Edit config.toml" }, + n = { "ZkNew { dir = vim.fn.input('Groupe: '), title = vim.fn.input('Titre: '), date = 'now' }", "Créer une nouvelle note" }, o = { "ZkNotes { sort = { 'modified' } }", "Ouvrir une note" }, O = { "ZkTags", "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", diff --git a/conf.d/lvim/ftplugin/tex.lua b/conf.d/lvim/ftplugin/tex.lua index 3974da8..277ab32 100644 --- a/conf.d/lvim/ftplugin/tex.lua +++ b/conf.d/lvim/ftplugin/tex.lua @@ -33,10 +33,10 @@ whk.register { whk.register { [""] = { -- to set a completly new using only the localleader key - name = "LaTeX", + name = " LaTeX", c = { "VimtexCompileSS", "Single-shot compile project" }, C = { - name = "Compile", + name = " Compile", s = { "VimtexStop", "Stop compile" }, c = { "VimtexCompileSelected", "Compile Selected" }, }, @@ -46,12 +46,12 @@ whk.register { o = { "VimtexView", "View pdf" }, s = { "VimtexStatus", "Look at the status" }, T = { - name = "TOC", + name = " TOC", o = { "VimtexTocOpen", "Open TOC" }, t = { "VimtexTocToggle", "Toggle TOC" }, }, V = { - name = "VimTeX", + name = " VimTeX", c = { "edit /home/jeff/.config/lvim/ftplugin/tex.lua", "Edit configuration" }, s = { "edit /home/jeff/.config/lvim/luasnippets/tex.lua", "Edit snippets" }, i = { "VimtexInfo", "Vimtex Info" }, diff --git a/conf.d/zk/config.toml b/conf.d/zk/config.toml index 9287982..2232e31 100644 --- a/conf.d/zk/config.toml +++ b/conf.d/zk/config.toml @@ -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.}} [extra] + author = "Jeff Lance" +mail = "email@jefflance.me" # GROUP OVERRIDES diff --git a/conf.d/zk/templates/default.md b/conf.d/zk/templates/default.md index cb44174..51ead4e 100644 --- a/conf.d/zk/templates/default.md +++ b/conf.d/zk/templates/default.md @@ -1,3 +1,11 @@ +--- +title: {{title}} +date: {{format-date now "short"}} +author: {{extra.author}} +mail: {{extra.mail}} +tags: #{{dir}}# +--- + # {{title}} -{{content}} +