mattn / efm-langserver

General purpose Language Server
MIT License
1.37k stars 61 forks source link

Minor cleanup, simplifications: #150

Closed alexaandru closed 3 years ago

alexaandru commented 3 years ago
mattn commented 3 years ago

Thank you

alexaandru commented 3 years ago

My pleasure! :) I thank you, for efm! Cheers! :)

apgrc commented 3 years ago

On debian buster i'm getting undefined: strings.ReplaceAll. That was fixed in #5 but this seems to be a regression.

$ go get github.com/mattn/efm-langserver                                                                                                                                                               
# github.com/mattn/efm-langserver/langserver
go/src/github.com/mattn/efm-langserver/langserver/handle_text_document_completion.go:78:14: undefined: strings.ReplaceAll
go/src/github.com/mattn/efm-langserver/langserver/handle_text_document_formatting.go:143:10: undefined: strings.ReplaceAll
go/src/github.com/mattn/efm-langserver/langserver/handle_text_document_hover.go:110:13: undefined: strings.ReplaceAll
go/src/github.com/mattn/efm-langserver/langserver/handler.go:612:12: undefined: strings.ReplaceAll
go/src/github.com/mattn/efm-langserver/langserver/handler.go:613:12: undefined: strings.ReplaceAll
go/src/github.com/mattn/efm-langserver/langserver/handler.go:614:12: undefined: strings.ReplaceAll
go/src/github.com/mattn/efm-langserver/langserver/handler.go:615:12: undefined: strings.ReplaceAll

$ go version 
go version go1.11.6 linux/amd64

$ uname -srvo
Linux 4.19.0-16-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) GNU/Linux

Would it be a better idea to add testing for Debian?

alexaandru commented 3 years ago

https://github.com/mattn/efm-langserver/blob/master/go.mod#L3 this project already required Go 1.13 and strings.ReplaceAll() was added in 1.12, which is why I dared using the newer ReplaceAll(). Besides, Go 1.11 is EOL (and so are all up to and including 1.14 FWIW...): https://endoflife.date/go

mattn commented 3 years ago

I'll fix ReplaceAll to Replace in later. Thanks.