Golang gopls: Difference between revisions

From wikinotes
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
Go LSP create/maintained by the go team.
Go LSP create/maintained by the go team.<br>
The LSP features are all exposed on the commandline, which might be nice for scripting.


= Documentation =
= Documentation =
Line 22: Line 23:
<blockquote>
<blockquote>
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
gopls rename main.go:10:5 Foo  # rename word from 'main.go' line:10, col:5, to 'Foo'
gopls rename main.go:10:5 Foo  # rename identifier from 'main.go' line:10, col:5, to 'Foo'
</syntaxhighlight>
</syntaxhighlight>
</blockquote><!-- Rename -->
</blockquote><!-- Rename -->
</blockquote><!-- Usage -->
</blockquote><!-- Usage -->

Latest revision as of 18:26, 26 June 2022

Go LSP create/maintained by the go team.
The LSP features are all exposed on the commandline, which might be nice for scripting.

Documentation

github https://github.com/golang/tools/tree/master/gopls

Install

go install golang.org/x/tools/gopls@latest

Usage

Rename

gopls rename main.go:10:5 Foo  # rename identifier from 'main.go' line:10, col:5, to 'Foo'