comparison dot_config/nvim/config.lua @ 366:42bc7d63537e

Map <c-y> to trigger completion in compe
author zegervdv <zegervdv@me.com>
date Mon, 29 Mar 2021 10:59:20 +0200
parents f300ef1bc475
children f0a89299e854
comparison
equal deleted inserted replaced
365:d8216ea00ad1 366:42bc7d63537e
110 autocomplete = true; 110 autocomplete = true;
111 debug = false; 111 debug = false;
112 min_length = 1; 112 min_length = 1;
113 preselect = 'enable'; 113 preselect = 'enable';
114 throttle_time = 80; 114 throttle_time = 80;
115 source_timeout = 2000; 115 source_timeout = 1000;
116 incomplete_delay = 400; 116 incomplete_delay = 400;
117 max_abbr_width = 100; 117 max_abbr_width = 100;
118 max_kind_width = 100; 118 max_kind_width = 100;
119 max_menu_width = 100; 119 max_menu_width = 100;
120 documentation = true;
120 121
121 source = { 122 source = {
122 path = true; 123 path = true;
123 buffer = true; 124 buffer = true;
124 calc = true; 125 calc = true;
125 nvim_lsp = true; 126 nvim_lsp = true;
126 nvim_lua = true; 127 nvim_lua = true;
127 spell = true; 128 spell = true;
128 ultisnips = true; 129 ultisnips = true;
129 treesitter = true; 130 -- TODO add vsnip for LSP snippets
130 }; 131 };
131 } 132 }
132 133
133 vim.cmd [[ inoremap <silent><expr> <TAB> compe#complete() ]] 134 vim.cmd [[ inoremap <silent><expr> <C-y> compe#complete() ]]
134 vim.cmd [[ inoremap <silent><expr> <CR> compe#confirm({ 'keys': "\<Plug>delimitMateCR", 'mode': '' }) ]] 135 vim.cmd [[ inoremap <silent><expr> <CR> compe#confirm({ 'keys': "\<Plug>delimitMateCR", 'mode': '' }) ]]
135 vim.cmd [[ inoremap <silent><expr> <C-e> compe#close('<C-e>') ]] 136 vim.cmd [[ inoremap <silent><expr> <C-e> compe#close('<C-e>') ]]
136 end 137 end
137 } 138 }
138 use { 139 use {