Skip to content

Commit

Permalink
Update instructions for using vim-plug to install the plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
yegappan committed Jan 18, 2024
1 parent 4f1404d commit e3216ca
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ The following language server protocol (LSP) features are supported:
* Folding code
* Inlay hints
* Visually select symbol block/region
* Semantic Highlight

## Configuration

Expand Down Expand Up @@ -157,16 +158,16 @@ call LspOptionsSet(#{

If you used [vim-plug](https://github.com/junegunn/vim-plug) to install the LSP plugin, then you need to use the VimEnter autocmd to initialize the LSP server and to set the LSP server options. For example:
```viml
let lspOpts = #{autoHighlightDiags: v:true}
autocmd VimEnter * call LspOptionsSet(lspOpts)
let lspServers = [#{
\ name: 'clang',
\ filetype: ['c', 'cpp'],
\ path: '/usr/local/bin/clangd',
\ args: ['--background-index']
\ }]
autocmd VimEnter * call LspAddServer(lspServers)
let lspOpts = #{autoHighlightDiags: v:true}
autocmd VimEnter * call LspOptionsSet(lspOpts)
```

## Supported Commands
Expand Down

0 comments on commit e3216ca

Please sign in to comment.