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
Pass custom handler to vim.lsp.buf.rename #22075
Comments
Actually, for my usecase, it will be enough to pass |
|
justinmk
added a commit
to justinmk/neovim
that referenced
this issue
Mar 10, 2023
Problem: No easy way to hook into LSP request/response handlers. (No mention of "before" or "after" in `:help lsp`...) Solution: Introduce `vim.on_before()`. Example: vim.on_before(vim.lsp.handlers, 'textDocument/definition', function() vim.notify('before, yay') end) Fixes neovim#20568 Fixes neovim#22075 Fixes neovim#22323 Related: neovim#13977
justinmk
added a commit
to justinmk/neovim
that referenced
this issue
Mar 10, 2023
Problem: No easy way to hook into LSP request/response handlers. (No mention of "before" or "after" in `:help lsp`...) Solution: Introduce `vim.on_before()`. Example: vim.on_before(vim.lsp.handlers, 'textDocument/definition', function() vim.notify('before, yay') end) Fixes neovim#20568 Fixes neovim#22075 Fixes neovim#22323 Related: neovim#13977
justinmk
added a commit
to justinmk/neovim
that referenced
this issue
Mar 11, 2023
Problem: No easy way to hook into LSP request/response handlers. (No mention of "before" or "after" in `:help lsp`...) Solution: Introduce vim.on_fun(), a generic way to "hook into" any function before/after it is called. Example: vim.on_fun(vim.lsp.handlers, 'textDocument/definition', function() vim.print('before, yay') end) Fixes neovim#20568 Fixes neovim#22075 Fixes neovim#22323 Related: neovim#13977
justinmk
added a commit
to justinmk/neovim
that referenced
this issue
Mar 11, 2023
Problem: No easy way to hook into LSP request/response handlers. (No mention of "before" or "after" in `:help lsp`...) Solution: Introduce vim.on_fun(), a generic way to "hook into" any function before/after it is called. Example: vim.on_fun(vim.lsp.handlers, 'textDocument/definition', function() vim.print('before, yay') end) Fixes neovim#20568 Fixes neovim#22075 Fixes neovim#22323 Related: neovim#13977
justinmk
added a commit
to justinmk/neovim
that referenced
this issue
Mar 11, 2023
Problem: No easy way to hook into LSP request/response handlers. (No mention of "before" or "after" in `:help lsp`...) Solution: Introduce vim.on_fun(), a generic way to "hook into" any function before/after it is called. Example: vim.on_fun(vim.lsp.handlers, 'textDocument/definition', function() vim.print('before, yay') end) Fixes neovim#20568 Fixes neovim#22075 Fixes neovim#22323 Related: neovim#13977
justinmk
added a commit
to justinmk/neovim
that referenced
this issue
Mar 11, 2023
Problem: No easy way to hook into LSP request/response handlers. (No mention of "before" or "after" in `:help lsp`...) Solution: Introduce vim.on_fun(), a generic way to "hook into" any function before/after it is called. Example: vim.on_fun(vim.lsp.handlers, 'textDocument/definition', function() vim.print('before, yay') end) Fixes neovim#20568 Fixes neovim#22075 Fixes neovim#22323 Related: neovim#13977
justinmk
added a commit
to justinmk/neovim
that referenced
this issue
Mar 12, 2023
Problem: No easy way to hook into LSP request/response handlers. (No mention of "before" or "after" in `:help lsp`...) Solution: Introduce vim.on_fun(), a generic way to "hook into" any function before/after it is called. Example: vim.on_fun(vim.lsp.handlers, 'textDocument/definition', function() vim.print('before, yay') end) Fixes neovim#20568 Fixes neovim#22075 Fixes neovim#22323 Related: neovim#13977
justinmk
added a commit
to justinmk/neovim
that referenced
this issue
Mar 12, 2023
Problem: No easy way to hook into LSP request/response handlers. (No mention of "before" or "after" in `:help lsp`...) Solution: Introduce vim.on_fun(), a generic way to "hook into" any function before/after it is called. Example: vim.on_fun(vim.lsp.handlers, 'textDocument/definition', function() vim.print('before, yay') end) Fixes neovim#20568 Fixes neovim#22075 Fixes neovim#22323 Related: neovim#13977
justinmk
added a commit
to justinmk/neovim
that referenced
this issue
Mar 13, 2023
Problem: No easy way to hook into LSP request/response handlers. (No mention of "before" or "after" in `:help lsp`...) Solution: Introduce vim.on_fun(), a generic way to "hook into" any function before/after it is called. Example: vim.on_fun(vim.lsp.handlers, 'textDocument/definition', function() vim.print('before, yay') end) Fixes neovim#20568 Fixes neovim#22075 Fixes neovim#22323 Related: neovim#13977
justinmk
added a commit
to justinmk/neovim
that referenced
this issue
Mar 15, 2023
Problem: No easy way to hook into LSP request/response handlers. (No mention of "before" or "after" in `:help lsp`...) Solution: Introduce vim.on_fun(), a generic way to "hook into" any function before/after it is called. Example: vim.on_fun(vim.lsp.handlers, 'textDocument/definition', function() vim.print('before, yay') end) Fixes neovim#20568 Fixes neovim#22075 Fixes neovim#22323 Related: neovim#13977
justinmk
added a commit
to justinmk/neovim
that referenced
this issue
Mar 15, 2023
Problem: No easy way to hook into LSP request/response handlers. (No mention of "before" or "after" in `:help lsp`...) Solution: Introduce vim.on_fun(), a generic way to "hook into" any function before/after it is called. Example: vim.on_fun(vim.lsp.handlers, 'textDocument/definition', function() vim.print('before, yay') end) Fixes neovim#20568 Fixes neovim#22075 Fixes neovim#22323 Related: neovim#13977
justinmk
added a commit
to justinmk/neovim
that referenced
this issue
Mar 20, 2023
Problem: No easy way to hook into LSP request/response handlers. (No mention of "before" or "after" in `:help lsp`...) Solution: Introduce vim.on_fun(), a generic way to "hook into" any function before/after it is called. Example: vim.on_fun(vim.lsp.handlers, 'textDocument/definition', function() vim.print('before, yay') end) Fixes neovim#20568 Fixes neovim#22075 Fixes neovim#22323 Related: neovim#13977
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
I want to extend
vim.lsp.buf.rename
with a custom handler. Currently, I have 3 options listed in:h lsp-handler-resolution
.Option 2 and 3 will not allow me to have two functions - one calling default handler, the second calling custom handler.
With option 1 I will have to duplicate all the logic located in
vim.lsp.buf.rename
function, which is not ideal.Expected behavior
The text was updated successfully, but these errors were encountered: