Skip to content

Commit 66a35b2

Browse files
authored
Note about gopls settings being documented now.
1 parent 91ee858 commit 66a35b2

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1527,8 +1527,19 @@ built YCM with the `--go-completer` flag; see the [*Installation*
15271527
section](#installation) for details). The server only works for projects with
15281528
the "canonical" layout.
15291529

1530-
`gopls` also has a handful of undocumented options for which the
1531-
[source code][gopls-preferences] is the only reference.
1530+
`gopls` also has a load of [documented options](https://github.com/golang/tools/blob/master/gopls/doc/settings.md).
1531+
1532+
You can set these in your `.ycm_extra_conf.py`. For example, to set the build tags:
1533+
1534+
```python
1535+
def Settings( **kwargs ):
1536+
if kwargs[ 'language' ] == 'go':
1537+
return {
1538+
'ls': {
1539+
'build': { 'buildFlags': [ '-tags=debug' ] }
1540+
}
1541+
}
1542+
```
15321543

15331544
### JavaScript and TypeScript Semantic Completion
15341545

0 commit comments

Comments
 (0)