-
Notifications
You must be signed in to change notification settings - Fork 43
Conversation
Reference: neovim/neovim#14090 (comment) Signed-off-by: Avimitin <avimitin@gmail.com>
lua/lspsaga/signaturehelp.lua
Outdated
@@ -16,7 +16,7 @@ local function check_server_support_signaturehelp() | |||
end | |||
local clients = vim.lsp.buf_get_clients() | |||
for _, client in pairs(clients) do | |||
if client.resolved_capabilities.signature_help == true then | |||
if client.server_capabilities.signatureHelpProvider == true then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the server_capabilities.signatureHelpProvider
is a table, so table will never be true
if client.server_capabilities.signatureHelpProvider == true then | |
if client.server_capabilities.signatureHelpProvider then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I use ~= nil
as condition? For readability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like somebody is already doing great job in #106 , maybe I should close this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I use
~= nil
as condition? For readability.
I'm not so sure about this one, I don't know if there's no provider it will be nil, are you sure about this?
if not, we could avoid that with this
if client.server_capabilities.signatureHelpProvider then
Signed-off-by: Avimitin <avimitin@gmail.com>
There is no guarantee that signatureHelpProvider will be nil. Signed-off-by: Avimitin <avimitin@gmail.com>
The maintainer of the project decided that we cannot remove support for previous versions, so make sure that this only runs in version 0.8, for the other version it should not be modified. if vim.fn.has("nvim-0.8") then |
But the code will become too verbose. |
I know, but version 0.8 is still beta, you know, many breaking changes, it will probably break again, and most of the people they use previous versions. |
Signed-off-by: Avimitin <avimitin@gmail.com>
lua/lspsaga/api.lua
Outdated
( is_nightly | ||
and type(client.server_capabilities.codeActionProvider) == "table" | ||
and client.server_capabilities.codeActionProvider.resolveProvider |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for sake of readability, client.server_capabilities
should be abbreviated to capabilities
Signed-off-by: Avimitin <avimitin@gmail.com>
Thanks @Avimitin, lgtm I'm going to merge it later on tonight in case of last suggestion ot changes |
Reference: neovim/neovim#14090 (comment)