Skip to content

Commit

Permalink
Note about gopls settings being documented now.
Browse files Browse the repository at this point in the history
  • Loading branch information
puremourning authored Sep 27, 2023
1 parent 91ee858 commit 66a35b2
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1527,8 +1527,19 @@ built YCM with the `--go-completer` flag; see the [*Installation*
section](#installation) for details). The server only works for projects with
the "canonical" layout.

`gopls` also has a handful of undocumented options for which the
[source code][gopls-preferences] is the only reference.
`gopls` also has a load of [documented options](https://github.com/golang/tools/blob/master/gopls/doc/settings.md).

You can set these in your `.ycm_extra_conf.py`. For example, to set the build tags:

```python
def Settings( **kwargs ):
if kwargs[ 'language' ] == 'go':
return {
'ls': {
'build': { 'buildFlags': [ '-tags=debug' ] }
}
}
```

### JavaScript and TypeScript Semantic Completion

Expand Down

0 comments on commit 66a35b2

Please sign in to comment.