From eb786ea5a80318ded5f313d4697342bbb1b2ca4c Mon Sep 17 00:00:00 2001 From: tastytea Date: Fri, 9 Sep 2022 06:13:49 +0200 Subject: [PATCH] nvim: add completions from Zsh --- .config/nvim/lua/my/completion.lua | 5 +++++ .config/nvim/lua/my/plugins.lua | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.config/nvim/lua/my/completion.lua b/.config/nvim/lua/my/completion.lua index 1605311..ea52db4 100644 --- a/.config/nvim/lua/my/completion.lua +++ b/.config/nvim/lua/my/completion.lua @@ -43,6 +43,7 @@ if cmp and luasnip then sources = cmp.config.sources({ { name = 'nvim_lsp' }, { name = 'luasnip' }, + { name = 'zsh' }, }, { { name = 'buffer' }, { name = 'spell' } @@ -99,4 +100,8 @@ if cmp and luasnip then local map = require('my.functions').map map('s', '', function() luasnip.jump(1) end) map('s', '', function() luasnip.jump(-1) end) + + require('cmp_zsh').setup({ + filetypes = { 'zsh', 'bash', 'sh' } + }) end diff --git a/.config/nvim/lua/my/plugins.lua b/.config/nvim/lua/my/plugins.lua index cfe3201..c9166bb 100644 --- a/.config/nvim/lua/my/plugins.lua +++ b/.config/nvim/lua/my/plugins.lua @@ -63,7 +63,8 @@ require('packer').startup({ function(use) 'https://github.com/hrsh7th/cmp-nvim-lua', 'https://github.com/uga-rosa/cmp-dictionary', 'https://github.com/f3fora/cmp-spell', - 'https://github.com/hrsh7th/cmp-nvim-lsp-document-symbol' + 'https://github.com/hrsh7th/cmp-nvim-lsp-document-symbol', + 'https://github.com/tamago324/cmp-zsh' } }