Skip to content

Commit

Permalink
docs: make the role of on_attach more explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
mjlbach committed Jul 11, 2021
1 parent e5e06b4 commit a1dc30c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -70,6 +70,7 @@ For a full list of servers, see [CONFIG.md](CONFIG.md). This document contains i
## Keybindings and completion

nvim-lspconfig does not map keybindings or enable completion by default. Manual, triggered completion can be provided by neovim's built-in omnifunc. For autocompletion, a general purpose [autocompletion plugin](https://github.com/neovim/nvim-lspconfig/wiki/Autocompletion) is required. The following example configuration provides suggested keymaps for the most commonly used language server functions, and manually triggered completion with omnifunc (\<c-x\>\<c-o\>).
Note: **you must pass the defined on_attach as an argument to every setup {} call** and **the keybindings in on_attach only take effect after the language server has started (attached to the current buffer)**.

```vim
lua << EOF
Expand Down

1 comment on commit a1dc30c

@neovim-discourse
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on Neovim Discourse. There might be relevant details there:

https://neovim.discourse.group/t/help-setting-up-sumneko-lua/833/2

Please sign in to comment.