MordFustang21 / ide-gopls

Atom integration with the Go language server (gopls)
MIT License
13 stars 5 forks source link

Fix for autocomplete on imports. #16

Closed marcelkohl closed 3 years ago

marcelkohl commented 3 years ago

Issue https://github.com/MordFustang21/ide-gopls/issues/6.

The issue is that gopls sends back the coordinates for the text in the actual buffer and does not consider the changes made along the replaces. So, as soon as the first replace in the text happens all other coordinates are automatically wrong.

Replaced text suggestions from bottom to top (reverse for-each), so it will prevent text to be moved from it's original place.