From 2b09dbf0984e836255a294d746159a68bdeb9be8 Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 31 Jul 2021 15:53:00 -0400 Subject: cleanup old tab filetype specific code --- lua/core/autocmds.lua | 3 --- lua/core/compe.lua | 20 -------------------- 2 files changed, 23 deletions(-) (limited to 'lua') diff --git a/lua/core/autocmds.lua b/lua/core/autocmds.lua index 1bc49d37..d9884073 100644 --- a/lua/core/autocmds.lua +++ b/lua/core/autocmds.lua @@ -55,9 +55,6 @@ 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" }, }, diff --git a/lua/core/compe.lua b/lua/core/compe.lua index dc83ff09..08d8b8bd 100644 --- a/lua/core/compe.lua +++ b/lua/core/compe.lua @@ -34,8 +34,6 @@ M.config = function() emoji = { kind = " ﲃ (Emoji)", filetypes = { "markdown", "text" } }, -- for emoji press : (idk if that in compe tho) }, - -- FileTypes in this list won't trigger auto-complete when TAB is pressed. Hitting TAB will insert a tab character - exclude_filetypes = { "md", "markdown", "mdown", "mkd", "mkdn", "mdwn", "text", "txt" }, } end @@ -100,22 +98,4 @@ M.setup = function() vim.api.nvim_set_keymap("i", "", "compe#scroll({ 'delta': -4 })", { noremap = true, silent = true, expr = true }) end -local is_excluded = function(file_type) - for _, type in ipairs(lvim.builtin.compe.exclude_filetypes) do - if type == file_type then - return true - end - end - return false -end - -M.set_tab_keybindings = function() - local file_type = vim.fn.expand "%:e" - -- if is_excluded(file_type) == false then - -- vim.api.nvim_buf_set_keymap(0, "i", "", "v:lua.tab_complete()", { expr = true }) - -- vim.api.nvim_buf_set_keymap(0, "s", "", "v:lua.tab_complete()", { expr = true }) - -- vim.api.nvim_buf_set_keymap(0, "i", "", "v:lua.s_tab_complete()", { expr = true }) - -- vim.api.nvim_buf_set_keymap(0, "s", "", "v:lua.s_tab_complete()", { expr = true }) - -- end -end return M -- cgit v1.2.3