-
Notifications
You must be signed in to change notification settings - Fork 194
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
Support for textDocument/selectionRange API #534
Comments
Hi 👋, The Language Server Protocol version of that is We would gladly merge well-written support for selectionRange. I wouldn't call this feature herculean, but it is a sizeable amount of work. For the syntax analysis the textDocument/foldingRange PR #492 would be useful to look at. I transferred this to the elixir-ls repo since it fits better there (and re-named the title). |
@aarongraham Are you currently working on this? If not, I'd be interested in picking it up (it's a feature I want!). |
Hey @crispinb, I am not currently working on this no, life changed for me in a way that I have very little free time for coding outside of work now. I spent a decent amount of time thinking about how to achieve this early last year though. First I tried using As a side note I recently switched to Neovim and now use tree-sitter alongside ElixirLS. The incremental selection offered in nvim-treesitter works great, even better than it did in IntelliJ in my opinion, and has support for basically every language. Good luck if you decide to have a go adding the feature, I'll definitely keep an eye out and be interested in seeing what you come up with. |
Thanks @aarongraham - if I was writing a standalone VSCode extension, I'd consider tree-sitter because the api looks nice. As it is, I guess it wouldn't be a good fit for elixir-ls because of the required binary. And in any case part of my motivation is to deepen my Elixir understanding. I spent a bit of time this week reading up on the Elixir AST and looking through some relevant codebases, and came to about the same conclusion - ie. that this is essentially an exercise in walking up the AST, with ElixirSense probably useful for filling in holes resulting from the AST's lossiness. Thanks for the Sourcerer pointer. |
Selection ranges provider added in #1060. This turned out to be pretty big one. I tried 3 different approaches to that in the last years and none was satisfactory. Trying several different approaches at once and combining results as in folding ranges provider turned ot to work reasonably well. I'm going to release it in v0.20 |
Wanted to give a quick feedback that I tried this in v0.20.0 and it is working great. Thank you for shipping this, it takes working with multiple selections to a whole new level 👏 🚀 |
I recently moved to VSCode from IntelliJ, mostly because of ElixirLS, one feature I really miss however is the intelligent extend/shrink selection of text. VSCode has an API available for language servers to use to achieve the same thing. The JSON extension can be used as an implementation example.
I would love to contribute to the extension by adding this feature if I could be pointed in the right direction? Or would adding this feature be a herculean task?
The text was updated successfully, but these errors were encountered: