-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: follow upstream deprecate non-method clients functions #3443
Conversation
6c53765
to
004cd23
Compare
004cd23
to
1cc6057
Compare
@@ -96,7 +96,7 @@ return { | |||
commands = { | |||
DenolsCache = { | |||
function() | |||
local clients = util.get_lsp_clients { bufnr = 0, name = 'denols' } | |||
local clients = util.get_lsp_clients({ bufnr = 0, name = 'denols' }) |
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.
is stylua doing this? not required by our style guide.
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 a bug of stylua . just run stylua ./
in shell
assert( | ||
#julials_clients > 0, | ||
'method julia/activateenvironment is not supported by any servers active on the current buffer' | ||
) | ||
local function _activate_env(environment) | ||
if environment then | ||
for _, julials_client in ipairs(julials_clients) do | ||
julials_client.notify('julia/activateenvironment', { envPath = environment }) | ||
util.client_proxy(julials_client).notify('julia/activateenvironment', { envPath = environment }) |
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.
Definitely not in favor of this PR if it requires client_proxy
in the configs themselves. That just introduces even more migration later.
If there's a way to make it transparent to configs, that's fine. Otherwise we should just wait until we can bump the minimum required Nvim to 0.11
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.
Yes. The current command design is too fragile. The client is necessary here. So it is better to provide a default wrapper function with the client
and bufnr
as the parameter so that we can easily handle any upstream changes on the client object internally.
switch_source_header(client, bufnr),
see neovim/neovim@454ae67