From 5f9cc116df28a6b87515dda4f4dae47e6e0e5f05 Mon Sep 17 00:00:00 2001 From: Paul Date: Sun, 9 Mar 2025 19:21:30 +0100 Subject: [PATCH] updated neovim state --- states/neovim/templates/init.lua.j2 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/states/neovim/templates/init.lua.j2 b/states/neovim/templates/init.lua.j2 index fcf3d6c..c9d8c89 100644 --- a/states/neovim/templates/init.lua.j2 +++ b/states/neovim/templates/init.lua.j2 @@ -22,6 +22,7 @@ vim.{{ t }}["{{ k }}"]{% if v is defined %}={% if v is integer or v is boolean % -- NeoVIM options {{- cfg("options", neovim.config.options) }} +-- NeoVIM functions function RemoveComments() vim.cmd.normal("g/^#/d") vim.cmd.normal("g/^$/d") @@ -34,14 +35,15 @@ end vim.api.nvim_command("command! Reformat call luaeval('Reformat()')") vim.api.nvim_command("command! RemoveComments call luaeval('RemoveComments()')") +-- NeoVIM keymaps vim.keymap.set("n", "", ":!%:p") -vim.keymap.set("n", "", ":FzfLua") vim.keymap.set("v", "", "g") vim.keymap.set("v", "", "g") vim.keymap.set("v", "g", "") vim.keymap.set("v", "g", "") +-- NeoVIM functions {% if "nvim-tree" in neovim.plugins.keys() -%} vim.g.loaded_netrw = 1 vim.g.loaded_netrwPlugin = 1 @@ -62,4 +64,9 @@ require("nvim-tree").setup({ dotfiles = true, }, }) +vim.keymap.set("n", "", ":NvimTreeToggle") +{% endif -%} + +{% if "fzf-lua" in neovim.plugins.keys() -%} +vim.keymap.set("n", "", ":FzfLua") {% endif -%}