Skip to content

Commit

Permalink
Add documentation for YouCompleteMe (hashicorp#1718)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhharris authored Jun 10, 2024
1 parent a9fdd01 commit 393cfbf
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions docs/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,27 @@ if executable('terraform-ls')
endif
```

### YouCompleteMe
- [Install](https://opensource.com/article/20/2/how-install-vim-plugins) the following plugins:
* [YouCompleteMe plugin](https://github.com/ycm-core/YouCompleteMe)
- Add the following to your `.vimrc`:

```vim
" Remove this line if additional custom language servers are set elsewhere
let g:ycm_language_server = []
if executable('terraform-ls')
let g:ycm_language_server += [
\ {
\ 'name': 'terraform',
\ 'cmdline': [ 'terraform-ls', 'serve' ],
\ 'filetypes': [ 'terraform' ],
\ 'project_root_files': [ '*.tf', '*.tfvars' ],
\ },
\ ]
endif
```

### LanguageClient-neovim

- Install the [LanguageClient-neovim plugin](https://github.com/autozimu/LanguageClient-neovim)
Expand Down Expand Up @@ -201,7 +222,7 @@ Make sure to read through to [server_configurations.md#terraformls](https://gith

## Kate

KDE [Kate editor](https://kate-editor.org/) supports LSP and is user configurable.
KDE [Kate editor](https://kate-editor.org/) supports LSP and is user configurable.

- Install the `terraform-ls` package (or the equivalent package name appropriate to your distro)
- Open Kate configuration (Settings Menu -> `Configure` Kate or Kate -> `Preferences` on macOS)
Expand All @@ -220,4 +241,4 @@ KDE [Kate editor](https://kate-editor.org/) supports LSP and is user configurabl
}
}
```
- Restart of the editor should *not* be necessary.
- Restart of the editor should *not* be necessary.

0 comments on commit 393cfbf

Please sign in to comment.