coc = {} vim.g.coc_global_extensions = { "coc-clangd", "coc-fish", "coc-go", "coc-haxe", "coc-java", "coc-json", "coc-kotlin", "coc-lua", "coc-rust-analyzer", "coc-snippets", "coc-tabnine", "coc-toml", } local function check_back_space() local col = vim.fn.col(".") - 1 return col <= 0 or vim.fn.getline("."):sub(col, col):match("%s") end function coc.tab_completion() if vim.fn.pumvisible() > 0 then return escape_keycode("") end if check_back_space() then return escape_keycode("") end return vim.fn["coc#refresh"]() end function coc.shift_tab_completion() if vim.fn.pumvisible() > 0 then return escape_keycode("") else return escape_keycode("") end end function coc.cr_completion() if vim.fn.pumvisible() > 0 then return vim.fn["coc#_select_confirm"]() else return escape_keycode([[\u\\=coc#on_enter()\]]) end end