remove cheatsheet.nvim for now
This commit is contained in:
parent
0b30ed27d5
commit
f3fe3d46c8
@ -77,7 +77,6 @@ M.plugin_status = {
|
|||||||
autosave = false, -- to autosave files
|
autosave = false, -- to autosave files
|
||||||
blankline = true, -- beautified blank lines
|
blankline = true, -- beautified blank lines
|
||||||
bufferline = true, -- buffer shown as tabs
|
bufferline = true, -- buffer shown as tabs
|
||||||
cheatsheet = true, -- fuzzy search your commands/keymappings
|
|
||||||
colorizer = true,
|
colorizer = true,
|
||||||
comment = true, -- universal commentor
|
comment = true, -- universal commentor
|
||||||
dashboard = false, -- a nice looking dashboard
|
dashboard = false, -- a nice looking dashboard
|
||||||
@ -148,10 +147,6 @@ M.mappings.plugin = {
|
|||||||
moveUp = "<C-k>",
|
moveUp = "<C-k>",
|
||||||
moveDown = "<C-j>",
|
moveDown = "<C-j>",
|
||||||
},
|
},
|
||||||
chadsheet = {
|
|
||||||
default_keys = "<leader>dk",
|
|
||||||
user_keys = "<leader>uk",
|
|
||||||
},
|
|
||||||
comment = {
|
comment = {
|
||||||
toggle = "<leader>/", -- trigger comment on a single/selected lines/number prefix
|
toggle = "<leader>/", -- trigger comment on a single/selected lines/number prefix
|
||||||
},
|
},
|
||||||
|
@ -131,17 +131,6 @@ M.bufferline = function()
|
|||||||
map("n", m.moveDown, "<C-w>j")
|
map("n", m.moveDown, "<C-w>j")
|
||||||
end
|
end
|
||||||
|
|
||||||
M.chadsheet = function()
|
|
||||||
local m = plugin_maps.chadsheet
|
|
||||||
|
|
||||||
map("n", m.default_keys, ":lua require('cheatsheet').show_cheatsheet_telescope() <CR>")
|
|
||||||
map(
|
|
||||||
"n",
|
|
||||||
m.user_keys,
|
|
||||||
":lua require('cheatsheet').show_cheatsheet_telescope{bundled_cheatsheets = false, bundled_plugin_cheatsheets = false } <CR>"
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
M.comment = function()
|
M.comment = function()
|
||||||
local m = plugin_maps.comment.toggle
|
local m = plugin_maps.comment.toggle
|
||||||
map("n", m, ":CommentToggle <CR>")
|
map("n", m, ":CommentToggle <CR>")
|
||||||
|
@ -82,7 +82,6 @@ M.plugin_status = {
|
|||||||
autosave = false, -- to autosave files
|
autosave = false, -- to autosave files
|
||||||
blankline = true, -- beautified blank lines
|
blankline = true, -- beautified blank lines
|
||||||
bufferline = true, -- buffer shown as tabs
|
bufferline = true, -- buffer shown as tabs
|
||||||
cheatsheet = true, -- fuzzy search your commands/keymappings
|
|
||||||
colorizer = true,
|
colorizer = true,
|
||||||
comment = true, -- universal commentor
|
comment = true, -- universal commentor
|
||||||
dashboard = false, -- a nice looking dashboard
|
dashboard = false, -- a nice looking dashboard
|
||||||
@ -148,10 +147,6 @@ M.mappings.plugin = {
|
|||||||
next_buffer = "<TAB>", -- next buffer
|
next_buffer = "<TAB>", -- next buffer
|
||||||
prev_buffer = "<S-Tab>", -- previous buffer
|
prev_buffer = "<S-Tab>", -- previous buffer
|
||||||
},
|
},
|
||||||
chadsheet = {
|
|
||||||
default_keys = "<leader>dk",
|
|
||||||
user_keys = "<leader>uk",
|
|
||||||
},
|
|
||||||
comment = {
|
comment = {
|
||||||
toggle = "<leader>/", -- trigger comment on a single/selected lines/number prefix
|
toggle = "<leader>/", -- trigger comment on a single/selected lines/number prefix
|
||||||
},
|
},
|
||||||
|
@ -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,
|
|
||||||
}
|
|
@ -272,20 +272,7 @@ return packer.startup(function()
|
|||||||
use {
|
use {
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
cmd = "Telescope",
|
cmd = "Telescope",
|
||||||
-- because cheatsheet is not activated by a teleacope command
|
|
||||||
module = "cheatsheet",
|
|
||||||
requires = {
|
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",
|
"nvim-telescope/telescope-fzf-native.nvim",
|
||||||
run = "make",
|
run = "make",
|
||||||
|
Loading…
Reference in New Issue
Block a user