Closed rodrigc closed 1 year ago
I am using 0.12.2 as well. the inline hint looks good to me
The error might come from another linter?
What does the inline hint on func SumIntsOrFloats
look like for you?
I do not see warnings around the generic func.
Ah OK, I figured it out.
I use this plugin: https://github.com/dense-analysis/ale
and the default linters that Ale uses for Go are:
'go': ['gofmt', 'golint', 'gopls', 'govet'],
golint
does not support generics, and prints out this warning: expected '(', found '[' (and 2 more errors)
So the problem is with golint, as invoked by ale
Hi @ray-x , nice neovim plugin, as usual. :)
This may not be a go.nvim question, but I thought I would ask you since you are quite knowledgeable.
Do you know if any of the go language servers support Go generics?
I read this tutorial: https://go.dev/doc/tutorial/generics
and wrote this code example:
The inline language hints looked like this:
But that line is valid.
I am using gopls at this version: