rmagatti / session-lens

A session-switcher extension for rmagatti/auto-session using Telescope.nvim
MIT License
226 stars 13 forks source link

Fixed and uncommented entry maker function #14

Closed doubleloop closed 3 years ago

doubleloop commented 3 years ago

Previous commented function was overcomplicated. It constructed return dictionary using setmetatable and object with custom __index. I know this was taken straight from the telescope source code but this dictionary can be just constructed directly. Also fixed path usages.

rmagatti commented 3 years ago

Thanks for the fix! @doubleloop

rafi commented 3 years ago

@doubleloop it can also be path_display = { shorten = 5 } as specified in :h telescope.defaults.path_display and parsed at https://github.com/nvim-telescope/telescope.nvim/blob/master/lua/telescope/utils.lua#L285-L325