zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
48.33k stars 2.87k forks source link

vue completion out of expected range #18917

Open oleasteo opened 4 days ago

oleasteo commented 4 days ago

Check for existing issues

Describe the bug / provide steps to reproduce it

When editing .vue files, I frequently get cursor jumps accompanied by unexpected text changes.

One such example, starting from Test.vue as following:

<script setup>

</script>

<template>
  <div></div>
</template>

Now, type input {} in line 2. As the } is written to overwrite the auto-closing bracket, the cursor jumps to the next line (with the accompanying space in between the { } being inserted).

See logs below.

Environment

Zed: v0.155.2 (Zed) OS: Linux Wayland endeavouros unknown Memory: 15.4 GiB Architecture: x86_64 GPU: Intel(R) Xe Graphics (TGL GT2) || Intel open-source Mesa driver || Mesa 24.2.4-arch1.1

If applicable, add mockups / screenshots to help explain present your vision of the feature

If applicable, attach your Zed.log file to this issue.

Zed.log

2024-10-09T16:51:01.74495841+02:00 [INFO] Language server with id 7 sent unhandled notification eslint/status:
{
  "uri": "file:///home/ole/projects/play-zed-vue/vue-project/Test.vue",
  "state": 1,
  "validationTime": 34
}
2024-10-09T16:51:02.818781987+02:00 [INFO] Language server with id 7 sent unhandled notification eslint/status:
{
  "uri": "file:///home/ole/projects/play-zed-vue/vue-project/Test.vue",
  "state": 1,
  "validationTime": 39
}
2024-10-09T16:51:02.931254794+02:00 [INFO] Language server with id 7 sent unhandled notification eslint/status:
{
  "uri": "file:///home/ole/projects/play-zed-vue/vue-project/Test.vue",
  "state": 1,
  "validationTime": 31
}
2024-10-09T16:51:03.045079369+02:00 [INFO] Language server with id 7 sent unhandled notification eslint/status:
{
  "uri": "file:///home/ole/projects/play-zed-vue/vue-project/Test.vue",
  "state": 1,
  "validationTime": 27
}
2024-10-09T16:51:03.202101759+02:00 [INFO] Language server with id 7 sent unhandled notification eslint/status:
{
  "uri": "file:///home/ole/projects/play-zed-vue/vue-project/Test.vue",
  "state": 1,
  "validationTime": 28
}
2024-10-09T16:51:03.323327133+02:00 [INFO] Language server with id 7 sent unhandled notification eslint/status:
{
  "uri": "file:///home/ole/projects/play-zed-vue/vue-project/Test.vue",
  "state": 1,
  "validationTime": 25
}
2024-10-09T16:51:03.491094289+02:00 [INFO] Language server with id 7 sent unhandled notification eslint/status:
{
  "uri": "file:///home/ole/projects/play-zed-vue/vue-project/Test.vue",
  "state": 1,
  "validationTime": 17
}
2024-10-09T16:51:03.540828257+02:00 [INFO] Language server with id 7 sent unhandled notification eslint/status:
{
  "uri": "file:///home/ole/projects/play-zed-vue/vue-project/Test.vue",
  "state": 1,
  "validationTime": 15
}
2024-10-09T16:51:03.836869996+02:00 [INFO] Language server with id 7 sent unhandled notification eslint/status:
{
  "uri": "file:///home/ole/projects/play-zed-vue/vue-project/Test.vue",
  "state": 1,
  "validationTime": 14
}
2024-10-09T16:51:04.08338155+02:00 [INFO] Language server with id 7 sent unhandled notification eslint/status:
{
  "uri": "file:///home/ole/projects/play-zed-vue/vue-project/Test.vue",
  "state": 1,
  "validationTime": 12
}
2024-10-09T16:51:04.430790896+02:00 [INFO] Language server with id 7 sent unhandled notification eslint/status:
{
  "uri": "file:///home/ole/projects/play-zed-vue/vue-project/Test.vue",
  "state": 1,
  "validationTime": 17
}
2024-10-09T16:51:04.4884289+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.488502549+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.48853748+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.488570264+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.488601928+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.488633682+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.488665308+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.488696732+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.488728323+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.488759276+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.488791232+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.488836813+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.488867278+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.488898533+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.488928782+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.488959963+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.488989492+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.489019926+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.489049958+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.489079887+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.489109927+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.489205158+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.489257538+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.489289968+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.489319576+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.489349144+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.489379226+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.489409473+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.489439753+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.489469585+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.489498543+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.489527498+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.489556617+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.489585786+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.489615031+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.489644497+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.489673339+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.489701997+02:00 [INFO] completion out of expected range
2024-10-09T16:51:04.633358606+02:00 [INFO] Language server with id 7 sent unhandled notification eslint/status:
{
  "uri": "file:///home/ole/projects/play-zed-vue/vue-project/Test.vue",
  "state": 1,
  "validationTime": 12
}
2024-10-09T16:51:04.984497116+02:00 [INFO] Language server with id 7 sent unhandled notification eslint/status:
{
  "uri": "file:///home/ole/projects/play-zed-vue/vue-project/Test.vue",
  "state": 1,
  "validationTime": 17
}
2024-10-09T16:51:05.229886801+02:00 [INFO] completion out of expected range
2024-10-09T16:51:05.240590349+02:00 [INFO] completion out of expected range
2024-10-09T16:51:05.262921044+02:00 [INFO] completion out of expected range
2024-10-09T16:51:05.276875671+02:00 [INFO] completion out of expected range
2024-10-09T16:51:05.285489063+02:00 [INFO] Language server with id 7 sent unhandled notification eslint/status:
{
  "uri": "file:///home/ole/projects/play-zed-vue/vue-project/Test.vue",
  "state": 1,
  "validationTime": 17
}
2024-10-09T16:51:05.410220114+02:00 [INFO] completion out of expected range
2024-10-09T16:51:05.418758885+02:00 [INFO] completion out of expected range
2024-10-09T16:51:05.619058199+02:00 [INFO] Language server with id 7 sent unhandled notification eslint/status:
{
  "uri": "file:///home/ole/projects/play-zed-vue/vue-project/Test.vue",
  "state": 1,
  "validationTime": 10
}

notpeter commented 4 days ago

Thanks for the excellent reproduction instructions. I can reproduce the behavior on MacOS where the cursor jumps down to the next line, but there's not "completion out of expected range" in my logs 🤔...so that's probably unrelated.

I disabled the vue-language-server and the problem went away.