From 2b877ee53e3432736ed2e41a987ab4d05d638876 Mon Sep 17 00:00:00 2001 From: rebuilt Date: Tue, 27 Jul 2021 17:02:20 +0200 Subject: Conditionally enable TAB to trigger completion based on filetype. Disable completion for simple text files (#1130) * disable tab completion for markdown * md is markdown * Set local keybindings conditionally based on filetype. Disable tab complete for text files * Rename functions and expose excluded filetypes setting for compe Co-authored-by: abzcoding --- lua/core/autocmds.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lua/core/autocmds.lua') diff --git a/lua/core/autocmds.lua b/lua/core/autocmds.lua index d337f71a..9280da9e 100644 --- a/lua/core/autocmds.lua +++ b/lua/core/autocmds.lua @@ -55,6 +55,9 @@ lvim.autocommands = { { "FileType", "markdown", "setlocal wrap" }, { "FileType", "markdown", "setlocal spell" }, }, + _tab_bindings = { + { "FileType", "*", "lua require'core.compe'.set_tab_keybindings()" }, + }, _buffer_bindings = { { "FileType", "floaterm", "nnoremap q :q" }, }, -- cgit v1.2.3