brenoprata10 / nvim-highlight-colors

Highlight colors for neovim
724 stars 33 forks source link

Doesn't play nice with coroutines #74

Closed a-priestley closed 7 months ago

a-priestley commented 7 months ago

Recently I'm getting this error whilst opening a floating REPL window with dapui:

E5108: Error executing lua: ...estley/.local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:95: Async task failed without callback: The coroutine failed with this message
:
.../share/nvim/lazy/nvim-dap-ui/lua/dapui/windows/float.lua:71: BufEnter Autocommands for "*": Vim(append):Error executing lua callback: Vim:E976: Using a Blob as a S
tring
stack traceback:
        [C]: in function 'match'
        ...hlight-colors/lua/nvim-highlight-colors/buffer_utils.lua:21: in function 'get_positions_by_regex'
        ...nvim-highlight-colors/lua/nvim-highlight-colors/init.lua:59: in function 'highlight_colors'
        ...nvim-highlight-colors/lua/nvim-highlight-colors/init.lua:91: in function 'refresh_highlights'
        ...nvim-highlight-colors/lua/nvim-highlight-colors/init.lua:140: in function <...nvim-highlight-colors/lua/nvim-highlight-colors/init.lua:138>
        [C]: in function 'resume'
        ...estley/.local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:113: in function 'step'
        ...estley/.local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:145: in function 'run'
        ...ey/.local/share/nvim/lazy/nvim-dap-ui/lua/dapui/init.lua:130: in function 'float_element'
        /home/apriestley/.config/nvim/lua/plugins/dap.lua:226: in function </home/apriestley/.config/nvim/lua/plugins/dap.lua:225>
stack traceback:
        [C]: in function 'nvim_set_current_win'
        .../share/nvim/lazy/nvim-dap-ui/lua/dapui/windows/float.lua:71: in function <.../share/nvim/lazy/nvim-dap-ui/lua/dapui/windows/float.lua:67>
stack traceback:
        [C]: in function 'error'
        ...estley/.local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:95: in function 'close_task'
        ...estley/.local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:117: in function 'step'
        ...estley/.local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:145: in function 'run'
        ...ey/.local/share/nvim/lazy/nvim-dap-ui/lua/dapui/init.lua:130: in function 'float_element'
        /home/apriestley/.config/nvim/lua/plugins/dap.lua:226: in function </home/apriestley/.config/nvim/lua/plugins/dap.lua:225>

Since the lsp integration update was such a significant change, I believe it may be related.

brenoprata10 commented 7 months ago

Hey o/ It seems this if failing when calling vim.fn.match to be honest I think this should be reported on the plugin that is triggering the error. This is not caused by the LSP logic BTW.