Skip to content

Commit

Permalink
don't autoselect first item
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Steinke committed Apr 22, 2024
1 parent f8c38e9 commit ce63334
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nvim/lua/plugins/completion.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ return {
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
and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
-- end

Expand All @@ -45,7 +45,7 @@ return {
}),
mapping = {
-- confirm selection
["<CR>"] = cmp.mapping.confirm({ select = true }),
["<CR>"] = cmp.mapping.confirm(),

-- jump between snippet fields
-- based on nvim-cmp wiki
Expand Down

0 comments on commit ce63334

Please sign in to comment.