Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eldoc documentation is incomplete in go-mode #97

Closed
edkolev opened this issue Sep 3, 2018 · 2 comments
Closed

eldoc documentation is incomplete in go-mode #97

edkolev opened this issue Sep 3, 2018 · 2 comments

Comments

@edkolev
Copy link
Contributor

edkolev commented Sep 3, 2018

The go language server returns
func(a ...interface{}) (n int, err error),
but the eldoc message which is displayed is
func(a ...interface{})

The issue is probably caused by this replace-regexp-in-string here https://github.com/joaotavora/eglot/blob/master/eglot.el#L1491

To reproduce, run

(eglot--sig-info [(:label "func(a ...interface{}) (n int, err error)" :documentation "Println formats using the default formats for its operands and writes to standard output.
Spaces are always added between operands and a newline is appended.
It returns the number of bytes written and any write error encountered.
" :parameters [(:label "a []interface{}")])] 0 0)

Or to reproduce in a .go file - place the cursor on Println:

package main

import (
	"fmt"
)

func Hello(name string) string {
	return "Hello, " + name
}

func Main() {
	fmt.Println(Hello("World"))
}
@mkcms
Copy link
Collaborator

mkcms commented Oct 24, 2018

This was fixed in #128.

@mkcms mkcms closed this as completed Oct 24, 2018
@edkolev
Copy link
Contributor Author

edkolev commented Oct 24, 2018

Awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants