all repos

init.lua @ ae31aa8

my nvim config
2 files changed, 18 insertions(+), 20 deletions(-)
feat(plugins): add cmp
Author: Smirnov Olexander ss2316544@gmail.com
Committed at: 2022-04-29 12:27:40 +0300
Parent: 7c6803e
M lua/configs/cmp.lualua/configs/cmp.lua

@@ -1,15 +1,12 @@

local cmp = require "cmp" local luasnip = require "luasnip" --- Snippets -require("luasnip/loaders/from_vscode").load { +require("luasnip.loaders.from_vscode").load { paths = { - "~/.local/share/nvim/site/pack/packer/start/friendly-snippets", "~/.local/share/nvim/site/pack/packer/opt/friendly-snippets", }, } --- Autopairs cmp.event:on( "confirm_done", require("nvim-autopairs.completion.cmp").on_confirm_done {
M lua/plugins.lua

@@ -71,6 +71,23 @@ cmd = "NvimTreeToggle",

config = u.get_config "configs.nvimtree", } + use { + "hrsh7th/nvim-cmp", + event = "BufRead", + config = u.get_config "configs.cmp", + requires = { + { "hrsh7th/cmp-buffer", after = "nvim-cmp" }, + { "saadparwaiz1/cmp_luasnip", after = "nvim-cmp" }, + { "hrsh7th/cmp-path", after = "nvim-cmp" }, + }, + } + + use { + "L3MON4D3/LuaSnip", + module = "luasnip", + requires = { { "rafamadriz/friendly-snippets", after = "nvim-cmp" } }, + } + --[[ use { "neovim/nvim-lspconfig",

@@ -80,22 +97,6 @@ "williamboman/nvim-lsp-installer",

"jose-elias-alvarez/null-ls.nvim", { "folke/lua-dev.nvim", module = "lua-dev" }, "j-hui/fidget.nvim", - }, - } - - -- completion - use { - "hrsh7th/nvim-cmp", - config = get_config "fk.plugin.cmp", - module = "cmp", - requires = { - { "hrsh7th/cmp-nvim-lsp", module = "cmp_nvim_lsp" }, - { "hrsh7th/cmp-buffer", after = "nvim-cmp" }, - { "hrsh7th/cmp-path", after = "nvim-cmp" }, - { "saadparwaiz1/cmp_luasnip", after = "nvim-cmp" }, - - "L3MON4D3/LuaSnip", - "rafamadriz/friendly-snippets", }, }]] end)