daic0r / dap-helper.nvim

Neovim Plugin that provides some convenience functions for nicer debugging
MIT License
8 stars 0 forks source link

[Bug] autocmds exception #3

Open Ajaymamtora opened 1 day ago

Ajaymamtora commented 1 day ago

I get an error from an autocmd in this plugin when using FzfLua files, can there be a check added at this line?

[Fzf-lua] fn_selected threw an error: vim/_editor.lua:0: nvim_exec2()..BufReadPost Autocommands for "*": Vim(append):Error executing lua callback: .../share/nvim/lazy/dap-helper.nvim/lua/dap-helper/init.lua:114: attempt to index a nil value
stack traceback:
    .../share/nvim/lazy/dap-helper.nvim/lua/dap-helper/init.lua:114: in function 'set_launch_args'
    .../share/nvim/lazy/dap-helper.nvim/lua/dap-helper/init.lua:99: in function <.../share/nvim/lazy/dap-helper.nvim/lua/dap-helper/init.lua:95>
    [C]: in function 'resume'
    ...mtora/.local/share/nvim/lazy/fzf-lua/lua/fzf-lua/fzf.lua:284: in function <...mtora/.local/share/nvim/lazy/fzf-lua/lua/fzf-lua/fzf.lua:265>
stack traceback:
    ...tora/.local/share/nvim/lazy/fzf-lua/lua/fzf-lua/core.lua:242: in function <...tora/.local/share/nvim/lazy/fzf-lua/lua/fzf-lua/core.lua:236>
    [C]: in function 'nvim_exec2'
    vim/_editor.lua: in function 'cmd'
    /Users/ajay.mamtora/.config/nvim/lua/core/user_setup.lua:85: in function '_on_choice'
    ...re/nvim/lazy/fzf-lua/lua/fzf-lua/providers/ui_select.lua:52: in function 'action'
    ...a/.local/share/nvim/lazy/fzf-lua/lua/fzf-lua/actions.lua:99: in function 'act'
    ...re/nvim/lazy/fzf-lua/lua/fzf-lua/providers/ui_select.lua:120: in function 'fn_selected'
    ...tora/.local/share/nvim/lazy/fzf-lua/lua/fzf-lua/core.lua:235: in function <...tora/.local/share/nvim/lazy/fzf-lua/lua/fzf-lua/core.lua:234>
    [C]: in function 'xpcall'
    ...tora/.local/share/nvim/lazy/fzf-lua/lua/fzf-lua/core.lua:234: in function <...tora/.local/share/nvim/lazy/fzf-lua/lua/fzf-lua/core.lua:226>
daic0r commented 15 hours ago

Thanks for reporting the issue! I'll look into it :-)