stevearc / dressing.nvim

Neovim plugin to improve the default vim.ui interfaces
MIT License
1.83k stars 32 forks source link

Attempt to index a boolean value #78

Closed RomanoZumbe closed 1 year ago

RomanoZumbe commented 1 year ago

Describe the bug Since the recent update I get an error when starting nvim on linux (not on windows though). The error message is: E5113: Error while calling lua chunk: ...site/pack/packer/start/dressing.nvim/plugin/dressing.lua:1: attempt to index a boolean value

System information

-- Paste your call to require("dressing").setup(...) in here

To Reproduce Steps to reproduce the behavior:

  1. Install the plugin under linux

If possible, provide a minimal file that will trigger the issue (see tests/manual for examples of short ways to call vim.ui.*):

minimal code here

Screenshots If applicable, add screenshots to help explain your problem.

Additional context I tried to find out what is going on and the problem is that the call to 'require("dressing")' in plugin\dressing is equated to true and not to a reference

stevearc commented 1 year ago

This is going to be because of some conflict you have in your config. If require("dressing") is returning true, it either means that you have another module in your runtimepath at lua/dressing.lua or lua/dressing/init.lua that is returning a boolean (and is resolved earlier than the one in the plugin), or it means that you've monkey patched require and it's doing something very unexpected.

RomanoZumbe commented 1 year ago

Oh man, what a shitty mistake of mine. There was indeed a copy in the root of my nvim folder. It was my previous settings file for the plugin that I backed up before setting the new win_options. Somehow I seem to have forgotten to change the location. Sorry for the unnecessary work!