diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index 9116106..26eb627 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -44,6 +44,15 @@ lsp_installer.on_server_ready(function(server) end) -- Setup nvim-cmp. +local has_words_before = function() + local line, col = unpack(vim.api.nvim_win_get_cursor(0)) + return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil +end + +local feedkey = function(key, mode) + vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true), mode, true) +end + local cmp = require'cmp' cmp.setup({