3 ms·
I’ve never seen an LSP server that lets you rename “Dog” to “Wolf” where your actual class names are “Dog[A-Za-z]*”? Do you have an example?
by setopt 2y ago
I’ve never seen an LSP server that lets you rename “Dog” to “Wolf” where your actual class names are “Dog[A-Za-z]*”?
Do you have an example?
- Maxion 2y agoIntelliJ's refactor tool?
- yen223 2y agoIntelliJ doesn't use LSP as far as I know. It does usually make that kind of DogModel -> WolfModel refactoring.
- turboponyy 2y agoNeither have I; and no, I don't - I misinterpreted what you said. But I don't see why LSP servers shouldn't support this, still. I'm not sure if the LSP specification allows for this as of current, though.
- setopt 2y agoI would actually love a regexp search-and-replace assisted by either TreeSitter or LSP. Something that lets me say that I want to replace “Dog\(.*\)” with “Wolf\1”, but where each substitution is performed only within single “symbols” as identified by TS or LSP.
- nickcox 2y agoast-grep supports regex [1] or pattern based [2] matching and replacement. [1] https://ast-grep.github.io/guide/rule-config/atomic-rule.html#regex https://ast-grep.github.io/guide/rule-config/atomic-rule.htm... [2] https://ast-grep.github.io/guide/rule-config/atomic-rule.html#pattern https://ast-grep.github.io/guide/rule-config/atomic-rule.htm...
- deleted 2y ago[deleted]