luckasRanarison / nvim-devdocs

Neovim DevDocs integration
MIT License
270 stars 20 forks source link

E5108: Error executing lua: vim/keymap.lua:71: Invalid (empty) LHS #40

Closed Pagliacii closed 1 year ago

Pagliacii commented 1 year ago

https://github.com/luckasRanarison/nvim-devdocs/blob/fdb0ebe6f432c90c055c41b0f8185eea2ecd02fd/lua/nvim-devdocs/operations.lua#L244-L252

This code doesn't check the open_in_browser empty or not. So this error occurs:

E5108: Error executing lua: vim/keymap.lua:71: Invalid (empty) LHS
stack traceback:
    [C]: in function 'nvim_buf_set_keymap'
    vim/keymap.lua:71: in function 'set'
    ...m-data/lazy/nvim-devdocs/lua/nvim-devdocs/operations.lua:245: in function 'set_buf_keymap'
    ...m-data/lazy/nvim-devdocs/lua/nvim-devdocs/operations.lua:248: in function 'open'
    ...nvim-data/lazy/nvim-devdocs/lua/nvim-devdocs/pickers.lua:107: in function 'open_doc'
    ...nvim-data/lazy/nvim-devdocs/lua/nvim-devdocs/pickers.lua:201: in function 'run_replace_or_original'
    ...im-data/lazy/telescope.nvim/lua/telescope/actions/mt.lua:65: in function 'key_func'
    ...nvim-data/lazy/telescope.nvim/lua/telescope/mappings.lua:257: in function <...nvim-data/lazy/telescope.nvim/lua/telescope/mappings.lua:256>