NTBBloodbath / galaxyline.nvim

neovim statusline plugin written in lua
MIT License
164 stars 16 forks source link

Is LSP provider global or for the current buffer? #9

Closed davidsierradz closed 3 years ago

davidsierradz commented 3 years ago

vim.lsp.get_active_clients() list all lsp clients even if they are not attached to the current buffer. I guess vim.lsp.buf_get_clients() is more accurate?

NTBBloodbath commented 3 years ago

Hey, thank you so much, I think this makes a lot more sense. I'll change it asap!

Regards

davidsierradz commented 3 years ago

Thanks! Sorry to bother you, but I think we should use pairs instead of ipairs because buf_get_clients does not necessarily return a contiguous list-like table. See fix(lsp): avoid ipairs on non-sequential tables by mjlbach · Pull Request #15059 · neovim/neovim.

NTBBloodbath commented 3 years ago

Don't worry haha you're not bothering me :)

Didn't know about this, I'll change it very quickly and commit, thank you for pointing this!