Skip to content

Commit

Permalink
chore(doc): auto generate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Aug 9, 2024
1 parent 0baf499 commit f600445
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions doc/autocomplete.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*autocomplete.txt* For NVIM v0.10.0 Last change: 2024 July 16
*autocomplete.txt* For NVIM v0.10.0 Last change: 2024 August 09

==============================================================================
Table of Contents *autocomplete-table-of-contents*
Expand Down Expand Up @@ -89,7 +89,7 @@ You also probably want to enable `popup` in completeopt to show documentation
preview:

>lua
vim.o.completeopt = 'menuone,noinsert,popup'
vim.o.completeopt = 'menuone,noselect,noinsert,popup'
<

And you also ideally want to set the capabilities so Neovim will fetch
Expand All @@ -99,23 +99,15 @@ documentation when resolving completion items:
-- Here we grab default Neovim capabilities and extend them with ones we want on top
local capabilities = vim.tbl_deep_extend('force',
vim.lsp.protocol.make_client_capabilities(),
require('autocomplete.capabilities'))
require('autocomplete.capabilities')
)

-- Now set capabilities on your LSP servers
require('lspconfig')['<YOUR_LSP_SERVER>'].setup {
capabilities = capabilities
}
<

If you want to disable `<CR>` to accept completion (as with autocomplete its
very annoying) you can do this:

>lua
vim.keymap.set("i", "<CR>", function()
return vim.fn.pumvisible() ~= 0 and "<C-e><CR>" or "<CR>"
end, { expr = true, replace_keycodes = true })
<


SIMILAR PROJECTS *autocomplete-autocomplete.nvim-similar-projects*

Expand Down

0 comments on commit f600445

Please sign in to comment.