Skip to content

Editing elm code incorrectly triggers linkedEditingRange mode with elm-language-server #21843

Open
@brzezinskip

Description

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Hi. I've ran into a strange issue while editing Elm code in vim mode.

Whenever I put my cursor above a function definition, for example

--cursor here
viewError : View Msg
viewError = {}

And I use o O I or i to start inserting text, the text is being inserted not only in the line I'm editing but also the first non-empty line below it (the amount of whitespace doesn't matter as can be see on the screenshots).
So, adding some giberish like asdasd above the viewError definition would most of the time (not always) yield something like that:

asdasd
vidasdewError : View Msg
viewError = {}

which makes editing code quite inconvinient. I'm not sure if this is language specific (could as well be), but I haven't gotten into a same problem with this language using other editors (neovim/vscode).

Hopefully the info I provided here makes sense. Thanks for creating such great product 🚀

Environment

Linux Pop!_OS 22.04 LTS
GeForce RTX 3070 Ti (560.35.03)

System Specs ``` System: Kernel: 6.9.3-76060903-generic x86_64 bits: 64 compiler: N/A Desktop: GNOME 42.9 Distro: Pop!_OS 22.04 LTS base: Ubuntu 22.04 LTS Jammy Machine: Type: Desktop System: ASUS product: N/A v: N/A serial: Mobo: ASUSTeK model: PRIME Z590-P v: Rev 1.xx serial: UEFI: American Megatrends v: 1203 date: 10/27/2021 Battery: ID-1: hidpp_battery_0 charge: 29% condition: N/A volts: 3.7 min: N/A model: Logitech G Pro Wireless Gaming Mouse status: Discharging CPU: Info: 8-core model: 11th Gen Intel Core i7-11700K bits: 64 type: MT MCP arch: Rocket Lake rev: 1 cache: L1: 640 KiB L2: 4 MiB L3: 16 MiB Speed (MHz): avg: 800 min/max: 800/4900:5000 cores: 1: 800 2: 800 3: 800 4: 800 5: 800 6: 800 7: 800 8: 800 9: 800 10: 800 11: 800 12: 800 13: 800 14: 800 15: 800 16: 800 bogomips: 115200 Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 Graphics: Device-1: NVIDIA GA104 [GeForce RTX 3070 Ti] vendor: Gigabyte driver: nvidia v: 560.35.03 bus-ID: 01:00.0 Device-2: Creative Live! Cam Sync 1080p type: USB driver: snd-usb-audio,uvcvideo bus-ID: 1-1.2:6 Display: x11 server: X.Org v: 1.21.1.4 driver: X: loaded: nouveau unloaded: fbdev,modesetting,vesa failed: nvidia gpu: nvidia resolution: 3440x1440~60Hz OpenGL: renderer: NVIDIA GeForce RTX 3070 Ti/PCIe/SSE2 v: 4.6.0 NVIDIA 560.35.03 direct render: Yes Audio: Device-1: Intel Tiger Lake-H HD Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 Device-2: NVIDIA GA104 High Definition Audio vendor: Gigabyte driver: snd_hda_intel v: kernel bus-ID: 01:00.1 Device-3: C-Media Blue Snowball type: USB driver: hid-generic,snd-usb-audio,usbhid bus-ID: 1-1.1:23 Device-4: Creative Live! Cam Sync 1080p type: USB driver: snd-usb-audio,uvcvideo bus-ID: 1-1.2:6 Sound Server-1: ALSA v: k6.9.3-76060903-generic running: yes Sound Server-2: PulseAudio v: 15.99.1 running: no Sound Server-3: PipeWire v: 1.0.3 running: yes Network: Device-1: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel bus-ID: 05:00.0 IF: wlp5s0 state: up mac: Device-2: Realtek RTL8125 2.5GbE vendor: ASUSTeK driver: r8169 v: kernel port: 4000 bus-ID: 06:00.0 IF: enp6s0 state: down mac: IF-ID-1: br-33c933c45c6f state: down mac: IF-ID-2: br-f4477181f800 state: up speed: 10000 Mbps duplex: unknown mac: IF-ID-3: docker0 state: down mac: IF-ID-4: vethc5f2d21 state: up speed: 10000 Mbps duplex: full mac: Bluetooth: Device-1: Intel AX200 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 1-2.2:7 Report: hciconfig ID: hci0 rfk-id: 0 state: up address: bt-v: 3.0 lmp-v: 5.2 Drives: Local Storage: total: 931.51 GiB used: 301.06 GiB (32.3%) ID-1: /dev/nvme0n1 vendor: Kingston model: SNVS1000G size: 931.51 GiB temp: 34.9 C Partition: ID-1: / size: 382.44 GiB used: 300.87 GiB (78.7%) fs: ext4 dev: /dev/nvme0n1p6 ID-2: /boot/efi size: 2.35 GiB used: 190.5 MiB (7.9%) fs: vfat dev: /dev/nvme0n1p7 Swap: ID-1: swap-1 type: zram size: 16 GiB used: 394.8 MiB (2.4%) dev: /dev/zram0 Sensors: System Temperatures: cpu: 27.8 C mobo: N/A gpu: nvidia temp: 35 C Fan Speeds (RPM): N/A gpu: nvidia fan: 0% Info: Processes: 623 Uptime: 8d 23h 37m Memory: 62.63 GiB used: 40.56 GiB (64.8%) Init: systemd runlevel: 5 Compilers: gcc: 11.4.0 clang: 14.0.0-1ubuntu1.1 Packages: 2609 Shell: Zsh v: 5.8.1 inxi: 3.3.13 ```

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

image

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

No response

Metadata

Assignees

No one assigned

    Labels

    bug[core label]elmElm programming language supportlanguage serverAn umbrella label for all language serversreproducibleVerified steps to reproduce includedupstream

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions