Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lua/cheatsheet/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ M.get_cheatsheet_files = function(opts)
if opts.include_only_installed_plugins then
local rtp_dirs = {}
for _, dir in pairs(vim.api.nvim_list_runtime_paths()) do
table.insert(rtp_dirs, dir:match(".+/(.+)"))
table.insert(rtp_dirs, dir:match(".+[\\/](.+)$"))
end
plugin_include = { enabled = rtp_dirs }
else
plugin_include = true
end

local cheatsheet_name_pat = '.+/cheatsheets/cheatsheet%-(.+)%.txt'
local cheatsheet_name_pat = '.+[\\/]cheatsheets[\\/]cheatsheet%-(.+)%.txt'
local cheatsheet_plugin_name_pat =
'.+/cheatsheets/plugins/cheatsheet%-(.+)%.txt'
'.+[\\/]cheatsheets[\\/]plugins[\\/]cheatsheet%-(.+)%.txt'

local bundled_plugins = {}
filter_insert(
Expand Down