From 303bcae87efce5914fc5419fcab570c685b19c98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Hamal=20Dvo=C5=99=C3=A1k?= Date: Mon, 16 Feb 2026 21:31:51 +0100 Subject: [PATCH] Drop blink.cmp --- .gitmodules | 3 --- bundle/blink.cmp | 1 - init.vim | 2 +- lua/init.lua | 52 ++++++++++-------------------------------------- 4 files changed, 12 insertions(+), 46 deletions(-) delete mode 160000 bundle/blink.cmp diff --git a/.gitmodules b/.gitmodules index 22084f5..10f11ff 100644 --- a/.gitmodules +++ b/.gitmodules @@ -25,6 +25,3 @@ [submodule "bundle/conform"] path = bundle/conform url = https://github.com/stevearc/conform.nvim.git -[submodule "bundle/blink.cmp"] - path = bundle/blink.cmp - url = https://github.com/saghen/blink.cmp.git diff --git a/bundle/blink.cmp b/bundle/blink.cmp deleted file mode 160000 index cd79f57..0000000 --- a/bundle/blink.cmp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cd79f572971c58784ca72551af29af3a63da9168 diff --git a/init.vim b/init.vim index 49c1f25..4e798a3 100644 --- a/init.vim +++ b/init.vim @@ -11,7 +11,7 @@ set sidescroll=1 set scrolloff=3 set nobackup set mouse= -set completeopt-=preview +"set completeopt-=preview set nofoldenable set spellcapcheck=0 set sw=2 diff --git a/lua/init.lua b/lua/init.lua index 6e8eee1..e839a88 100644 --- a/lua/init.lua +++ b/lua/init.lua @@ -206,47 +206,17 @@ vim.lsp.config("rust_analyzer", {}) -- end, -- }) --- 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 tab_complete() --- if check_back_space() then --- return vim.api.nvim_replace_termcodes('', true, false, true) --- end --- return vim.api.nvim_replace_termcodes('', true, false, true) --- end --- --- vim.api.nvim_set_keymap('i', '', 'v:lua.tab_complete()', { expr = true, noremap = true }) --- vim.api.nvim_set_keymap('i', '', '', { noremap = true }) - -local has_words_before = function() - local col = vim.api.nvim_win_get_cursor(0)[2] - if col == 0 then - return false - end - local line = vim.api.nvim_get_current_line() - return line:sub(col, col):match("%s") == nil +local function check_back_space() + local col = vim.fn.col('.') - 1 + return col <= 0 or vim.fn.getline('.'):sub(col, col):match('%s') end -require("blink.cmp").setup { - keymap = { - preset = "none", +function tab_complete() + if check_back_space() then + return vim.api.nvim_replace_termcodes('', true, false, true) + end + return vim.api.nvim_replace_termcodes('', true, false, true) +end - [""] = { - function(cmp) - if not has_words_before() then - vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("", true, true, true), "n", false) - return true - end - end, - "show", "select_next", "fallback" }, - [""] = { "show", "select_prev", "fallback" }, - }, - fuzzy = { implementation = "prefer_rust_with_warning" }, - completion = { - menu = { auto_show = false }, - list = { selection = { preselect = false, auto_insert = true }, cycle = { from_top = true } }, - }, -} +vim.api.nvim_set_keymap('i', '', 'v:lua.tab_complete()', { expr = true, noremap = true }) +vim.api.nvim_set_keymap('i', '', '', { noremap = true })