diff --git a/common/.config/nvim/lua/plugins/code-completion.lua b/common/.config/nvim/lua/plugins/code-completion.lua index 04b852a..2055fd2 100644 --- a/common/.config/nvim/lua/plugins/code-completion.lua +++ b/common/.config/nvim/lua/plugins/code-completion.lua @@ -36,8 +36,9 @@ return { -- 'enter' for mappings similar to 'super-tab' but with 'enter' to accept -- See the full "keymap" documentation for information on defining your own keymap. keymap = { - preset = "super-tab", - [""] = { "select_and_accept" }, + preset = "none", + [""] = { "select_and_accept" }, -- Ctrl + Enter to accept + [""] = { "hide", "fallback" }, -- Ctrl + x to reject [""] = { "snippet_forward", "fallback" }, [""] = { "snippet_backward", "fallback" }, @@ -49,7 +50,6 @@ return { [""] = { "scroll_documentation_down", "fallback" }, [""] = { "show", "show_documentation", "hide_documentation" }, - [""] = { "hide", "fallback" }, }, appearance = { @@ -58,12 +58,8 @@ return { }, completion = { - accept = { - -- experimental auto-brackets support - auto_brackets = { - enabled = true, - }, - }, + keyword = { range = "full" }, + accept = { auto_brackets = { enabled = false } }, menu = { draw = { treesitter = { "lsp" }, @@ -74,7 +70,7 @@ return { auto_show_delay_ms = 200, }, ghost_text = { - enabled = vim.g.ai_cmp, + enabled = false, }, }, @@ -82,29 +78,15 @@ return { -- This comes from the luasnip extra, if you don't add it, won't be able to -- jump forward or backward in luasnip snippets - snippets = { - expand = function(snippet) - require("luasnip").lsp_expand(snippet) - end, - active = function(filter) - if filter and filter.direction then - return require("luasnip").jumpable(filter.direction) - end - return require("luasnip").in_snippet() - end, - jump = function(direction) - require("luasnip").jump(direction) - end, - }, + snippets = { preset = "luasnip" }, sources = { default = { "lsp", "buffer", + "path", "dadbod", "snippets", - "luasnip", - "path", "markdown", }, cmdline = {}, @@ -124,9 +106,6 @@ return { snippets = { score_offset = 1150, }, - luasnip = { - score_offset = 1100, - }, path = { score_offset = 750, },