aboutsummaryrefslogtreecommitdiff
path: root/lua/plugins.lua
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2021-08-08 21:27:54 +0800
committerjdhao <jdhao@hotmail.com>2021-08-08 21:34:03 +0800
commitac4bb6c162d708d407f2769f8188bf1b5a19a681 (patch)
tree68828763eea92cfd9ea056db7800c971fb74beda /lua/plugins.lua
parent88b0b895104c1afed76eb1177e9ee998644af885 (diff)
Change ultisnips load condition
Benefit of doing this: + No change of cursor line position after entering insert mode. Previous, if we load ultisnips on InsertEnter, the cursor line will moved automatically (e.g., if cursor line is on bottom of the screen, when we enter insert mode, now we are at the middle of the screen, like Ctrl-E is used before entering insert mode), which is really annoying! + We can see the snippets in nvim-compe auto-completion menu. Previously, the snippets are not shown on the nvim-compe completion menu (snippet expansion works though, it is just we can not see snippets in the completion menu), possibly due to the loading order of ultisnips and nvim-compe, because we load them both on event InsertEnter. After changing ultisnips to a start plugin, this issue is gone.
Diffstat (limited to 'lua/plugins.lua')
-rw-r--r--lua/plugins.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/plugins.lua b/lua/plugins.lua
index f602883..315bff0 100644
--- a/lua/plugins.lua
+++ b/lua/plugins.lua
@@ -126,7 +126,7 @@ require('packer').startup(
end
-- Snippet engine and snippet template
- use {'SirVer/ultisnips', event = {'InsertEnter'}}
+ use 'SirVer/ultisnips'
use {'honza/vim-snippets', event = {'InsertEnter'}}
-- Automatic insertion and deletion of a pair of characters