sourcegraph / go-langserver

Go language server to add Go support to editors and other tools that use the Language Server Protocol (LSP)
https://sourcegraph.com
MIT License
1.17k stars 89 forks source link

rename command not in initialization response #342

Closed Dbz closed 5 years ago

Dbz commented 5 years ago

My language client doesn't know go-langserver can perform renames because go-langserver doesn't add the capability in the initialize response. Would we be able to add that?

I would be happy to make a PR myself if someone can help point me in the right direction. (I just started learning Go this past week and completed a Udemy course on it, and this would be a fun first PR.)

slimsag commented 5 years ago

Thanks! Set RenameProvider: true, here to fix this:

https://sourcegraph.com/github.com/sourcegraph/go-langserver@d6e9e93704de6e6c103b0fb305c2e78fc34ed188/-/blob/langserver/handler.go#L276-287

Dbz commented 5 years ago

Oh perfect 🎉 I'll make a PR as soon as I get home from work

Dbz commented 5 years ago

Had to steal my PR @fannheyward ! I'm teasing. I'm glad it got in and that I could help with creating the issue :)

fannheyward commented 5 years ago

@Dbz sorry for steal your PR. Just see that you have not submit for hours, so I made it.

Dbz commented 5 years ago

I know, I just got home from work. But it is OK - I was just teasing. What is important is that we help each other build better software, and we're doing that. It doesn't matter if I do it, or if you do it. I'm glad there are more people out there who want to improve the project 👍

slimsag commented 5 years ago

Haha I didn't notice the author was different, my bad :P FWIW CI just detected a (unrelated) data race if anyone wants to look into that 😜https://github.com/sourcegraph/go-langserver/issues/344