ray-x / navigator.lua

Code analysis & navigation plugin for Neovim. Navigate codes like a breeze🎐 Exploring LSP and 🌲Treesitter symbols a piece of 🍰 Take control like a boss 🦍
MIT License
1.31k stars 58 forks source link

Error when entering .html buffers #210

Closed al-ce closed 2 years ago

al-ce commented 2 years ago

Description

Since 3d9a958, on BufEnter for .html files, the following error occurs:

Error detected while processing BufEnter Autocommands for "*":
E5108: Error executing lua .../start/navigator.lua/lua/navigator/lspclient/clients.lua:875: attempt to compare number with boolean
stack traceback:
        .../start/navigator.lua/lua/navigator/lspclient/clients.lua:875: in function 'on_filetype'
        [string ":lua"]:1: in main chunk

To Reproduce

Any of the following:

Config

require'navigator'.setup()
return require("packer").startup {
  function(use)
    use {
        'wbthomason/packer.nvim',
        }
    use({
        'ray-x/navigator.lua',
        requires = {
            { 'ray-x/guihua.lua', run = 'cd lua/fzy && make' },
            { 'neovim/nvim-lspconfig' },
        },
        })
  end
}

The issue is the same with this setup or with my usual plugin setup.

What I've Tried

Thanks!

al-ce commented 2 years ago

Forgot to mention, I'm on nightly, and also that the error doesn't occur on branch neovim_0.6.

beaumccartney commented 2 years ago

I have the same issue.

Temp fix, I'm using Packer's commit feature to roll back to https://github.com/ray-x/navigator.lua/commit/05753da8db0e7fdb979cc5fc396965b150e09d79 (third most recent commit at the time of this writing). Any commit after that has the bug.

Afaik, the commit after the one I mentioned above introduced the bug (that is https://github.com/ray-x/navigator.lua/commit/05dfed9ed964a7f186941f85a435a185e1ffa700).

ray-x commented 2 years ago

Thanks for filing the issue. It was caused by HTML LSP server. The name of LSP server is html which is same as filetype. I did not expect that lsp and file type to be same name. It should be fixed by 49c3e5cd4d6b24067b9ca24f0b046a646fdee270

al-ce commented 2 years ago

Thanks, the fix worked! Appreciate your work, I really admire this plugin.