Open bbigras opened 4 years ago
Any progress for this issue? Is there any way to keep same keystroke with expand-region
? I'd like to use expand-region-contract-fast-key
to use lsp-extend-selection
but did not find where to integrate.
Is there any way to keep same keystroke with expand-region ? I'd like to use expand-region-contract-fast-key to use lsp-extend-selection but did not find where to integrate.
I just tested and this works for me:
(setq-local er/try-expand-list (append
er/try-expand-list
'(lsp-extend-selection)))
I would like a keybinding for lsp-extend-selection but with a fallback in case the language server doesn't support it.
You can check if the server supports it via (lsp--capability :selectionRangeProvider)
and define an own interactive defun
based on that to either use (lsp-extend-selection)
or invoke (er/expand-region)
.
I would like a keybinding for lsp-extend-selection but with a fallback in case the language server doesn't support it.