aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/insert.txt
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2023-06-19 02:24:44 -0700
committerGitHub <noreply@github.com>2023-06-19 02:24:44 -0700
commitcee981bf09c81ab4b2fe6facf45076ea4bac46a5 (patch)
treeccdf43826f362a560eadb6518a399f35b192dcd4 /runtime/doc/insert.txt
parent8c9dab3e0d788d44c8a2fee83a6193f5955c814e (diff)
downloadrneovim-cee981bf09c81ab4b2fe6facf45076ea4bac46a5.tar.gz
rneovim-cee981bf09c81ab4b2fe6facf45076ea4bac46a5.tar.bz2
rneovim-cee981bf09c81ab4b2fe6facf45076ea4bac46a5.zip
docs #22363
Co-authored by: zeertzjq <zeertzjq@outlook.com> Co-authored by: Steven Todd McIntyre II <114119064+stmii@users.noreply.github.com> Co-authored by: nobe4 <nobe4@users.noreply.github.com> - docs: mention --luadev-mod to run with lua runtime files When changing a lua file in the ./runtime folder, a new contributor might expect changes to be applied to the built Neovim binary.
Diffstat (limited to 'runtime/doc/insert.txt')
-rw-r--r--runtime/doc/insert.txt20
1 files changed, 20 insertions, 0 deletions
diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt
index de1b850a3f..a1e0675b36 100644
--- a/runtime/doc/insert.txt
+++ b/runtime/doc/insert.txt
@@ -1081,6 +1081,26 @@ Stop completion *compl-stop*
CTRL-X CTRL-Z Stop completion without changing the text.
+AUTO-COMPLETION *compl-autocomplete*
+
+To get basic "autocompletion" without installing a plugin, try this script: >lua
+
+ local triggers = {"."}
+ vim.api.nvim_create_autocmd("InsertCharPre", {
+ buffer = vim.api.nvim_get_current_buf(),
+ callback = function()
+ if vim.fn.pumvisible() == 1 then
+ return
+ end
+ local char = vim.v.char
+ if vim.tbl_contains(triggers, char) then
+ local key = vim.keycode("<C-x><C-n>")
+ vim.api.nvim_feedkeys(key, "m", false)
+ end
+ end
+ })
+<
+
FUNCTIONS FOR FINDING COMPLETIONS *complete-functions*
This applies to 'completefunc', 'thesaurusfunc' and 'omnifunc'.