Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default_file_manager: expected boolean, got nil #18

Closed
Dimfred opened this issue Aug 11, 2023 · 2 comments
Closed

default_file_manager: expected boolean, got nil #18

Dimfred opened this issue Aug 11, 2023 · 2 comments

Comments

@Dimfred
Copy link

Dimfred commented Aug 11, 2023

Hi and thanks for the plugin :)

One of the last 3 commits broke those functions:

M.lf.change_workspace = function()
    vim.g.is_floatterm = true
    local lf = require("lf")
    lf.start("~/workspaces", { default_action = "cd" })
end
M.lf.open_file = function()
    vim.g.is_floatterm = true
    local lf = require("lf", { default_action = "drop" })
    local res = lf.start()
end

The first command fails with:

E5108: Error executing lua .../dimfred/.local/share/nvim/lazy/vimpeccable/lua/vimp.lua:269: Error when executing map '<leader>po':
...dimfred/.local/share/nvim/lazy/lf.nvim/lua/lf/config.lua:65: default_file_manager: expected boolean, got nil
stack traceback:
        [C]: in function 'error'
        vim/shared.lua: in function 'validate'
        ...dimfred/.local/share/nvim/lazy/lf.nvim/lua/lf/config.lua:65: in function 'validate'
        ...dimfred/.local/share/nvim/lazy/lf.nvim/lua/lf/config.lua:101: in function 'override'
        ...e/dimfred/.local/share/nvim/lazy/lf.nvim/lua/lf/main.lua:70: in function 'new'
        /home/dimfred/.local/share/nvim/lazy/lf.nvim/lua/lf.lua:127: in function 'start'
        /home/dimfred/.config/nvim/lua/user/commands.lua:238: in function </home/dimfred/.config/nvim/lua/user/commands.lua:235>
        [C]: in function 'xpcall'
        .../dimfred/.local/share/nvim/lazy/vimpeccable/lua/vimp.lua:265: in function '_executeMap'
        [string ":lua"]:1: in main chunk

stack traceback:
        [C]: in function 'error'
        .../dimfred/.local/share/nvim/lazy/vimpeccable/lua/vimp.lua:269: in function '_executeMap'
        [string ":lua"]:1: in main chunk

The second command failes with:

E5108: Error executing lua .../dimfred/.local/share/nvim/lazy/vimpeccable/lua/vimp.lua:269: Error when executing map '<leader>pt':
...e/dimfred/.local/share/nvim/lazy/lf.nvim/lua/lf/main.lua:98: attempt to index field 'env' (a nil value)
stack traceback:
        ...e/dimfred/.local/share/nvim/lazy/lf.nvim/lua/lf/main.lua:98: in function '__create_term'
        ...e/dimfred/.local/share/nvim/lazy/lf.nvim/lua/lf/main.lua:83: in function 'new'
        /home/dimfred/.local/share/nvim/lazy/lf.nvim/lua/lf.lua:127: in function 'start'
        /home/dimfred/.config/nvim/lua/user/commands.lua:243: in function </home/dimfred/.config/nvim/lua/user/commands.lua:240>
        [C]: in function 'xpcall'
        .../dimfred/.local/share/nvim/lazy/vimpeccable/lua/vimp.lua:265: in function '_executeMap'
        [string ":lua"]:1: in main chunk

stack traceback:
        [C]: in function 'error'
        .../dimfred/.local/share/nvim/lazy/vimpeccable/lua/vimp.lua:269: in function '_executeMap'
        [string ":lua"]:1: in main chunk

Sry I am currently too lazy to debug, if something is broke, could you just tell me if I am using the commands correctly?
I reverted for now to: c30426d2fb70ac3ada0dbc07f204dffb3293e86b

@lmburns
Copy link
Owner

lmburns commented Aug 31, 2023

Check the latest commit and see if your issue is resolved

@Dimfred
Copy link
Author

Dimfred commented Sep 1, 2023

Updated and everything seems to work again.
Thanks for fixing. Closing.

@Dimfred Dimfred closed this as completed Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants