From 8bc66e3d0709d80f90512f6f052198195dc84d51 Mon Sep 17 00:00:00 2001 From: fm39hz-workstation Date: Mon, 13 May 2024 10:18:46 +0700 Subject: [PATCH] feat: add my own plugins - oil.nvim - togglecheckbox --- lua/config/keymaps.lua | 8 ++++++++ lua/plugins/oil.lua | 9 +++++++++ lua/plugins/toggle-checkbox.lua | 6 ++++++ 3 files changed, 23 insertions(+) create mode 100644 lua/plugins/oil.lua create mode 100644 lua/plugins/toggle-checkbox.lua diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index 2c134f7..68ebb13 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -1,3 +1,11 @@ -- Keymaps are automatically loaded on the VeryLazy event -- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua -- Add any additional keymaps here + +local map = vim.keymap.set + +-- Oil Nvim +map("n", "op", "Oil", { desc = "Open parent directory" }) + +-- Markdown related +map("n", "ct", ":lua require('toggle-checkbox').toggle()", { desc = "Toggle Checkbox" }) diff --git a/lua/plugins/oil.lua b/lua/plugins/oil.lua new file mode 100644 index 0000000..cef118f --- /dev/null +++ b/lua/plugins/oil.lua @@ -0,0 +1,9 @@ +return { + -- add oil + { + "stevearc/oil.nvim", + opts = {}, + -- Optional dependencies + dependencies = { "nvim-tree/nvim-web-devicons" }, + }, +} diff --git a/lua/plugins/toggle-checkbox.lua b/lua/plugins/toggle-checkbox.lua new file mode 100644 index 0000000..599cbac --- /dev/null +++ b/lua/plugins/toggle-checkbox.lua @@ -0,0 +1,6 @@ +return { + -- add plugin + { + "opdavies/toggle-checkbox.nvim", + }, +}