Skip to content

Commit

Permalink
docs: add notes on capabilities (hrsh7th#21)
Browse files Browse the repository at this point in the history
* docs: add notes on capabilities

Closes hrsh7th#3

* Update README.md
  • Loading branch information
mjlbach authored Jan 4, 2022
1 parent 1341172 commit b4251f0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# cmp-nvim-lsp

nvim-cmp source for neovim builtin LSP client
nvim-cmp source for neovim's built-in language server client.

# Capabilities

Language servers provide different completion results depending on the capabilities of the client. Neovim's default omnifunc has basic support for serving completion candidates. nvim-cmp supports more types of completion candidates, so users must override the capabilities sent to the server such that it can provide these candidates during a completion request. These capabilities are provided via the helper function `require('cmp_nvim_lsp').update_capabilities`

As these candidates are sent on each request, **adding these capabilities will break the built-in omnifunc support for neovim's language server client**. `nvim-cmp` provides manually triggered completion that can replace omnifunc. See `:help cmp-faq` for more details.

# Setup

Expand Down

0 comments on commit b4251f0

Please sign in to comment.