vlang / vls

V language server. (Old V language server - see v-analyzer)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Formatter is working with incorrect file contents

itsMapleLeaf opened this issue · comments

System Information

V doctor

OS: linux, "EndeavourOS Linux"
Processor: 16 cpus, 64bit, little endian, AMD Ryzen 7 2700X Eight-Core Processor
CC version: cc (GCC) 12.1.0

getwd: /home/maple/dev/vstuff
vmodules: /home/maple/.vmodules
vroot: /home/maple/.v
vexe: /home/maple/.v/v
vexe mtime: 2022-06-25 17:09:22
is vroot writable: true
is vmodules writable: true
V full version: V 0.2.4 d336b7b.d7f962e

Git version: git version 2.36.1
Git vroot status: weekly.2022.24-88-gd7f962ef
.git/config present: true
thirdparty/tcc status: thirdparty-linux-amd64 827f7452

VLS info

vls version 0.0.1.7fccefa

Problem Description

See the video. On save, it re-inserts text that I deleted from the document. I think the formatter is lagging behind the actual editor contents?

Peek.2022-06-25.12-29.mp4

Steps to Reproduce

Happens while performing normal editing tasks

Last Recorded LSP Requests

https://gist.github.com/itsMapleLeaf/88c0b349bb343e2305bb58ee58158264

commented

@itsMapleLeaf does it occur consistently? i can't seem to reproduce it properly

commented

nevermind i have reproduced your issue and identified the problem. will fix this within today. thanks!

Screen.Recording.2022-06-27.at.2.58.00.PM.mov
commented

1ae269e should fix this issue

Awesome, thanks for the quick fix! 😄

Great job @nedpals !

And thanks for the report @itsMapleLeaf

I actually ended up running into this again 🥲

I get this notification on save after toggling the quotes. Here you can see the actual source code, vs. the code that it's trying to format

image

v doctor:

OS: linux, "EndeavourOS Linux"
Processor: 16 cpus, 64bit, little endian, AMD Ryzen 7 2700X Eight-Core Processor
CC version: cc (GCC) 12.1.0

getwd: /home/maple/dev/me/vstuff/http
vmodules: /home/maple/.vmodules
vroot: /home/maple/.v
vexe: /home/maple/.v/v
vexe mtime: 2022-07-15 18:40:35
is vroot writable: true
is vmodules writable: true
V full version: V 0.3.0 9f3b6e3.ac7e809

Git version: git version 2.37.1
Git vroot status: weekly.2022.28-14-gac7e8094
.git/config present: true
thirdparty/tcc status: thirdparty-linux-amd64 827f7452

vls info: vls version 0.0.1.bcbc46c