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 Feb 22, 2024
1 parent a745928 commit 6118b4f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions doc/autocomplete.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,11 @@ preview:
<

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

>lua
-- Disable <CR> to accept (this really should be a mapping, so stupid)
vim.keymap.set("i", "<CR>", function()
return vim.fn.pumvisible() ~= 0 and "<Esc>o" or "<CR>"
return vim.fn.pumvisible() ~= 0 and "<C-e><CR>" or "<CR>"
end, { expr = true, replace_keycodes = true })
<

Expand All @@ -109,7 +108,7 @@ documentation and additional text edits 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.buffer').capabilities)
require('autocomplete.capabilities'))

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

0 comments on commit 6118b4f

Please sign in to comment.