X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/f618e70bcbd4919ed8af1d52bae104d36189afbb..67d5a4ab99f1a7eaf1c3303fb8d7263c49ee39d1:/nvim/lua/plugins/coding.lua diff --git a/nvim/lua/plugins/coding.lua b/nvim/lua/plugins/coding.lua index bda4a98..131fc4a 100644 --- a/nvim/lua/plugins/coding.lua +++ b/nvim/lua/plugins/coding.lua @@ -9,6 +9,7 @@ return { "honza/vim-snippets", config = function() require("luasnip.loaders.from_snipmate").lazy_load() + require("luasnip.loaders.from_lua").load({ paths = vim.fn.stdpath("config") .. "/lua/snippets" }) end, }, }, @@ -23,6 +24,14 @@ return { -- auto completion { "hrsh7th/nvim-cmp", + version = false, -- last release is way too old + event = "InsertEnter", + dependencies = { + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + "saadparwaiz1/cmp_luasnip", + }, ---@param opts cmp.ConfigSchema opts = function(_, opts) local has_words_before = function() @@ -51,7 +60,7 @@ return { completeopt = "menu,menuone,noselect", }) -- TODO: review if I want to keep any of LazyVim's mappings - opts.mapping = cmp.mapping.preset.insert({ + opts.mapping = { -- lazyvims [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), [""] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), @@ -80,7 +89,7 @@ return { fallback() end end, { "i", "s" }), - }) + } end, },