joaotavora / eglot

A client for Language Server Protocol servers
GNU General Public License v3.0
2.22k stars 203 forks source link

eglot+gopls is ... off by one expression? #1101

Closed Cerebus closed 1 year ago

Cerebus commented 1 year ago

Discussed in https://github.com/joaotavora/eglot/discussions/1100

Originally posted by **Cerebus** November 9, 2022 I really don't know what's happening here, and I'll try to generate a minimal example, but by screenshots: - With a previous expression of the same kind, autocomplete suggestions are correct: ![with-previous-expression](https://user-images.githubusercontent.com/49740/200853387-8da5e744-8556-4f9c-a589-6a9c45db0c91.png) - Without a previous expression... ![no-previous-expression](https://user-images.githubusercontent.com/49740/200853508-c3babd95-1ad7-4829-96b9-c2fc21993035.png) I tried mucking about with `eglot--pos-to-lsp-position` but I don't really know if that's the problem. I'll also generate a minimal example when I have a chance, but mainly looking for feedback on whether this is an eglot or gopls problem.