News for hackers. Stuff that matters.
Re:Greppability is an underrated code metric by setopt on Tuesday September 03, 2024 @02:46AM (#41432000)
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?

Re:Greppability is an underrated code metric by Maxion on Tuesday September 03, 2024 @03:07AM (#41432121)
IntelliJ's refactor tool?
Re:Greppability is an underrated code metric by yen223 on Tuesday September 03, 2024 @10:10AM (#41435153)
IntelliJ doesn't use LSP as far as I know.

It does usually make that kind of DogModel -> WolfModel refactoring.

Re:Greppability is an underrated code metric by turboponyy on Tuesday September 03, 2024 @04:55AM (#41432785)
Neither 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.

Re:Greppability is an underrated code metric by setopt on Tuesday September 03, 2024 @01:00PM (#41436842)
I 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.

Re:Greppability is an underrated code metric by nickcox on Tuesday September 03, 2024 @06:50PM (#41440117)