summaryrefslogtreecommitdiff
path: root/lua/core/autocmds.lua
diff options
context:
space:
mode:
authorrebuilt <[email protected]>2021-07-27 17:02:20 +0200
committerGitHub <[email protected]>2021-07-27 11:02:20 -0400
commit2b877ee53e3432736ed2e41a987ab4d05d638876 (patch)
treea020e58a1f1365cfe423158e6d3950e15067f407 /lua/core/autocmds.lua
parenta82fd81106f8d3266adb162f234b255e7f3b6a23 (diff)
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 <[email protected]>
Diffstat (limited to 'lua/core/autocmds.lua')
-rw-r--r--lua/core/autocmds.lua3
1 files changed, 3 insertions, 0 deletions
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 <silent> <buffer> q :q<CR>" },
},