You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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: