From f3fe3d46c8e07c194b0ed498ba426ac7a506f714 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Fri, 24 Sep 2021 18:22:04 +0530 Subject: [PATCH] remove cheatsheet.nvim for now --- lua/chadrc.lua | 5 ---- lua/core/mappings.lua | 11 -------- lua/default_config.lua | 5 ---- lua/plugins/configs/chadsheet.lua | 44 ------------------------------- lua/plugins/init.lua | 13 --------- 5 files changed, 78 deletions(-) delete mode 100644 lua/plugins/configs/chadsheet.lua diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 1fea4ad..2b7ec23 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -77,7 +77,6 @@ M.plugin_status = { autosave = false, -- to autosave files blankline = true, -- beautified blank lines bufferline = true, -- buffer shown as tabs - cheatsheet = true, -- fuzzy search your commands/keymappings colorizer = true, comment = true, -- universal commentor dashboard = false, -- a nice looking dashboard @@ -148,10 +147,6 @@ M.mappings.plugin = { moveUp = "", moveDown = "", }, - chadsheet = { - default_keys = "dk", - user_keys = "uk", - }, comment = { toggle = "/", -- trigger comment on a single/selected lines/number prefix }, diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 568b2af..2bcd048 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -131,17 +131,6 @@ M.bufferline = function() map("n", m.moveDown, "j") end -M.chadsheet = function() - local m = plugin_maps.chadsheet - - map("n", m.default_keys, ":lua require('cheatsheet').show_cheatsheet_telescope() ") - map( - "n", - m.user_keys, - ":lua require('cheatsheet').show_cheatsheet_telescope{bundled_cheatsheets = false, bundled_plugin_cheatsheets = false } " - ) -end - M.comment = function() local m = plugin_maps.comment.toggle map("n", m, ":CommentToggle ") diff --git a/lua/default_config.lua b/lua/default_config.lua index c8a9a36..bcc3cce 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -82,7 +82,6 @@ M.plugin_status = { autosave = false, -- to autosave files blankline = true, -- beautified blank lines bufferline = true, -- buffer shown as tabs - cheatsheet = true, -- fuzzy search your commands/keymappings colorizer = true, comment = true, -- universal commentor dashboard = false, -- a nice looking dashboard @@ -148,10 +147,6 @@ M.mappings.plugin = { next_buffer = "", -- next buffer prev_buffer = "", -- previous buffer }, - chadsheet = { - default_keys = "dk", - user_keys = "uk", - }, comment = { toggle = "/", -- trigger comment on a single/selected lines/number prefix }, diff --git a/lua/plugins/configs/chadsheet.lua b/lua/plugins/configs/chadsheet.lua deleted file mode 100644 index 0a6cc02..0000000 --- a/lua/plugins/configs/chadsheet.lua +++ /dev/null @@ -1,44 +0,0 @@ -local present, chadsheet = pcall(require, "cheatsheet") - -if not present then - return -end - -local mappings = require("core.utils").load_config().mappings - --- add user mappings to the cheetsheet --- improve this function to not hardcode plugin -local function add_to_chadsheet(section, keymap, desc) - if section == "plugin" then - for sec, key in pairs(mappings.plugin) do - add_to_chadsheet(sec, key, sec) - end - else - if type(keymap) == "table" then - for sec, key in pairs(keymap) do - if type(sec) == "number" then - add_to_chadsheet(section, key, desc or section) - else - add_to_chadsheet(sec, key, desc or section) - end - end - else - chadsheet.add_cheat(section, keymap, desc or "Misc") - end - end -end - -for section, keymap in pairs(mappings) do - add_to_chadsheet(section, keymap) -end - -require("cheatsheet").setup { - - bundled_cheatsheets = { - enabled = { "default" }, - disabled = { "unicode", "nerd-fonts" }, - }, - - bundled_plugin_cheatsheets = false, - include_only_installed_plugins = true, -} diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 01456ce..cee6992 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -272,20 +272,7 @@ return packer.startup(function() use { "nvim-telescope/telescope.nvim", cmd = "Telescope", - -- because cheatsheet is not activated by a teleacope command - module = "cheatsheet", requires = { - { - "sudormrfbin/cheatsheet.nvim", - disable = not plugin_status.cheatsheet, - after = "telescope.nvim", - config = function() - require "plugins.configs.chadsheet" - end, - setup = function() - require("core.mappings").chadsheet() - end, - }, { "nvim-telescope/telescope-fzf-native.nvim", run = "make",