-
Notifications
You must be signed in to change notification settings - Fork 19
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
Idea: have editing operations specific to source editing types #103
Comments
Hmm so I'm tempted not to attempt to implement this ourselves - LSP support is a must for any editor to be nice to use, and every self-respecting LSP server can do refactor-replace. Handling local variables would probably be doable, but for languages like Rust with very complex importing rules, we'd end up falling back on LSP anyway. I don't like it as a solution very much, but I think it'd work which is at the end of the day what matters. |
This being done via The paradigm of sapling is that you’re thinking in terms of other operations. A text editor is mainly concerned with create a UI that allows fast and intuitive access to editing facilities. A code editor has different facilities oft provided by language servers, but sometimes exposable to the editor directly. |
So, there are a few things I can do if I’m an AST node (e.g. a variable). I could edit the string that’s the current leaf, e.g.
“Emacs -> emacs”.
I could also try and replace this concrete instance of a variable with a variable of the same kind,
“emacs -> kakoune”
But in the general case, it might make sense to rename all instances of the same string,
“emacs -> editor”
Because you’ve chosen modal editing as a paradigm, it may be useful to replace the c* a* and i* commands.
The text was updated successfully, but these errors were encountered: