language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

LSP Rename incorrectly maps field name and appends character

Open kevintraver opened this issue 1 year ago • 1 comments

Bug description

LSP Rename incorrectly maps field name and appends character

How to reproduce

use LSP Rename code action to rename dateAdded to addedDate

dateAdded          DateTime? @db.DateTime

Result

addedDate          DateTime? @db.DateTim @map("dateAdded")e

Expected behavior

addedDate          DateTime? @db.DateTime @map("dateAdded")

Prisma information

Version: 15.5.0

Environment & setup

  • Editor: Neovim
  • Editor version: 0.10.0

kevintraver avatar Jun 19 '24 11:06 kevintraver

I think it might have something to do with this change: fe081ac

kevintraver avatar Jun 19 '24 11:06 kevintraver

Hey @kevintraver, I can indeed confirm this :/ Looks like that change is the culprit indeed

https://github.com/prisma/language-tools/assets/29753584/7c3c1761-a0e8-4831-a9ad-0224a6555541

Druue avatar Jul 10 '24 23:07 Druue

This fix will be part of the 5.17.0 release and is already on our latest version of Insiders. (Though I see you use nvim so not sure how long that takes to propagate there)

https://github.com/user-attachments/assets/93e9753e-09a7-4651-94a1-927eb9b5539c

Druue avatar Jul 16 '24 10:07 Druue

It appears fixed! 🎉

kevintraver avatar Jul 16 '24 16:07 kevintraver