Closed lougreenwood closed 1 year ago
It appears that somehow, a directory entry got into the history database. I've pushed a change to the branch that will filter that out. I can't reproduce the issue with the warning that gets printed, but I think it might be due to the attempt to highlight directory entries (which this new change will filter out anyway). If you could give it a shot and let me know if it resolves that issue, I'd appreciate it!
I'm not sure it's working - should I also clear the history (and then somehow get a dir into the history) when testing.
Here's a video showing the error still happening with verification of being on the latest release: https://monosnap.com/file/IL1ig76d4EKpUW6DFCrVkJzJG8gScU
Let me know if I can do anything else to help debug this 👍
Yeah I'm stumped. I think what might help is a dump of the history database (named smart_open.sqlite3) or better yet the entire file. I think that there's an entry in there with something different about it perhaps.
@lougreenwood If you are using AstroNvim, I found that AstroNvim's devicons overrides is missing name field here, which leads to devicons not returning hl_groups. Either adding a name to AstroNvim's devicons config or changing smart-open.nvim's this line fixes the error for me:
- table.insert(to_display, { icon .. " ", hl_group = { { { 1, 3 }, hl_group } } })
+ table.insert(to_display, { icon .. " ", hl_group = hl_group and { { { 1, 3 }, hl_group } } })
@cshuaimin yes! This seems to have fixed it for me, thanks for sharing the knowledge!
I'm not familiar enough with Vim to know where the correct fix for this should live though - do you think AstroNvim
needs fixing upstream, or is this a bug in smart-open
not handling a wider set of config potentials?
@danielfalk WDYT?
I've pushed that fix. Thanks @cshuaimin for finding that!
@lougreenwood I don't know for sure either but I think that if you're providing overrides for dev icons, you normally provide a name. The examples in the docs do.
I've additionally pushed some tweaks to the highlighting so that it would highlight properly in neovim nightly. If you see any issues with the highlighting, please let me know!
I noticed this bug appearing recently, if the results list contains a directory then the result does not have a name, which seems to trigger the error message.
Also, more generally, when opening I often see the
Press ENTER or type command to continue
message and the picker isn't populated until I press enter, this is not accompanied by any error - I'm not sure if this is related and only seems to happen when opening for the first time:EDIT: Actually, for this second issue, it seems that it's triggered by a warning: 🎥 example