summaryrefslogtreecommitdiffstats
path: root/.config/nvim
diff options
context:
space:
mode:
authorYigit Sever2023-08-21 23:18:19 +0300
committerYigit Sever2023-08-21 23:18:19 +0300
commit30ba1496fdb83caebe0e03ac6e3e299193b760e2 (patch)
tree6fcdc7215d9edaa076a6a53d0da6569d504fc07a /.config/nvim
parent49b0f23821690ac4b58aa4edf5f4608b43f1e8bf (diff)
downloaddotfiles-30ba1496fdb83caebe0e03ac6e3e299193b760e2.tar.gz
dotfiles-30ba1496fdb83caebe0e03ac6e3e299193b760e2.tar.bz2
dotfiles-30ba1496fdb83caebe0e03ac6e3e299193b760e2.zip
nvim: add cmp-omni for vimwiki
path completion and tag completion
Diffstat (limited to '.config/nvim')
-rw-r--r--.config/nvim/lazy-lock.json3
-rw-r--r--.config/nvim/lua/plugins/cmp.lua20
2 files changed, 18 insertions, 5 deletions
diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json
index b2bb81a..cf2687f 100644
--- a/.config/nvim/lazy-lock.json
+++ b/.config/nvim/lazy-lock.json
@@ -2,10 +2,11 @@
2 "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, 2 "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
3 "LuaSnip": { "branch": "master", "commit": "c4d6298347f7707e9757351b2ee03d0c00da5c20" }, 3 "LuaSnip": { "branch": "master", "commit": "c4d6298347f7707e9757351b2ee03d0c00da5c20" },
4 "barbar.nvim": { "branch": "master", "commit": "8cca17ea0ced3ba564e5da972a25600edafe7d7b" }, 4 "barbar.nvim": { "branch": "master", "commit": "8cca17ea0ced3ba564e5da972a25600edafe7d7b" },
5 "catppuccin": { "branch": "main", "commit": "e2d6ce295eb537c92b567ec5d31f120de46e8d13" }, 5 "catppuccin": { "branch": "main", "commit": "91f9f6fb413caff2bd06e326ec174deee1c1b7a9" },
6 "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, 6 "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
7 "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, 7 "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
8 "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, 8 "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
9 "cmp-omni": { "branch": "main", "commit": "9436e6cdd7c5dfa24a99a60d9280b24dbdea3649" },
9 "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, 10 "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
10 "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, 11 "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
11 "dashboard-nvim": { "branch": "master", "commit": "c17d3210b3dec8798b4fc82a11c542989251f85d" }, 12 "dashboard-nvim": { "branch": "master", "commit": "c17d3210b3dec8798b4fc82a11c542989251f85d" },
diff --git a/.config/nvim/lua/plugins/cmp.lua b/.config/nvim/lua/plugins/cmp.lua
index 828d7c2..7f3163f 100644
--- a/.config/nvim/lua/plugins/cmp.lua
+++ b/.config/nvim/lua/plugins/cmp.lua
@@ -7,6 +7,7 @@ return {
7 "hrsh7th/cmp-nvim-lua", 7 "hrsh7th/cmp-nvim-lua",
8 "hrsh7th/cmp-buffer", 8 "hrsh7th/cmp-buffer",
9 "hrsh7th/cmp-path", 9 "hrsh7th/cmp-path",
10 "hrsh7th/cmp-omni",
10 "L3MON4D3/LuaSnip", 11 "L3MON4D3/LuaSnip",
11 "saadparwaiz1/cmp_luasnip", 12 "saadparwaiz1/cmp_luasnip",
12 "rafamadriz/friendly-snippets", 13 "rafamadriz/friendly-snippets",
@@ -132,8 +133,8 @@ return {
132 sources = cmp.config.sources({ 133 sources = cmp.config.sources({
133 { name = 'git' }, 134 { name = 'git' },
134 }, { 135 }, {
135 { name = 'buffer' }, 136 { name = 'buffer' },
136 }) 137 })
137 }) 138 })
138 139
139 -- use buffer source for `/` . 140 -- use buffer source for `/` .
@@ -152,8 +153,19 @@ return {
152 sources = cmp.config.sources({ 153 sources = cmp.config.sources({
153 { name = 'path' } 154 { name = 'path' }
154 }, { 155 }, {
155 { name = 'cmdline' } 156 { name = 'cmdline' }
156 }) 157 })
158 })
159
160 -- use omnifunc in vimwiki to complete paths and tags
161 ---@diagnostic disable-next-line: missing-fields
162 cmp.setup.filetype('vimwiki', {
163 sources = cmp.config.sources({
164 { name = 'omni' },
165 option = {
166 disable_omnifuncs = {},
167 },
168 })
157 }) 169 })
158 end, 170 end,
159 }, 171 },