diff options
| author | Kyren223 <ulmliad223@gmail.com> | 2024-07-08 01:13:30 +0300 |
|---|---|---|
| committer | Kyren223 <ulmliad223@gmail.com> | 2024-07-08 01:13:30 +0300 |
| commit | b491f9e3a73367dfd54ca8f8bc74008332c80f34 (patch) | |
| tree | bf9c2f515d71291d941979d462176b9266c6308f /.config/nvim/lua/custom/plugins | |
| parent | fb07fbdefd9cbe7d3d8a185812d0a930d7ddc4ab (diff) | |
Neovim: reworked most of the completion stuff, 80% done, will continue tmr
Diffstat (limited to '.config/nvim/lua/custom/plugins')
| -rw-r--r-- | .config/nvim/lua/custom/plugins/TODO-completion.lua | 53 |
1 files changed, 11 insertions, 42 deletions
diff --git a/.config/nvim/lua/custom/plugins/TODO-completion.lua b/.config/nvim/lua/custom/plugins/TODO-completion.lua index 0699e9b..3f0ba3e 100644 --- a/.config/nvim/lua/custom/plugins/TODO-completion.lua +++ b/.config/nvim/lua/custom/plugins/TODO-completion.lua @@ -1,50 +1,19 @@ return { { - 'hrsh7th/cmp-nvim-lsp', - }, - { - 'L3MON4D3/LuaSnip', + 'hrsh7th/nvim-cmp', + lazy = false, + priority = 100, dependencies = { - 'saadparwaiz1/cmp_luasnip', - 'rafamadriz/friendly-snippets', + -- 'onsails/lspkind.nvim', + -- 'hrsh7th/cmp-path', + -- 'hrsh7th/cmp-buffer', + 'hrsh7th/cmp-nvim-lsp', -- lsp source for nvim-cmp + 'saadparwaiz1/cmp_luasnip', -- snippets source for nvim-cmp + { 'L3MON4D3/LuaSnip', build = 'make install_jsregexp' }, -- snippets plugin }, - }, - { - 'hrsh7th/nvim-cmp', - opts = function(_, opts) - -- Setup options for lazydev.nvim - opts.sources = opts.sources or {} - table.insert(opts.sources, { - name = 'lazydev', - group_index = 0, - }) - end, + -- TODO: Move to setup opts config = function() - local cmp = require('cmp') - require('luasnip.loaders.from_vscode').lazy_load() - - cmp.setup({ - snippet = { - expand = function(args) - require('luasnip').lsp_expand(args.body) - end, - }, - window = { - completion = cmp.config.window.bordered(), - documentation = cmp.config.window.bordered(), - }, - mapping = cmp.mapping.preset.insert({ - ['<C-b>'] = cmp.mapping.scroll_docs(-4), - ['<C-f>'] = cmp.mapping.scroll_docs(4), - ['<C-Space>'] = cmp.mapping.complete(), - ['<C-k>'] = cmp.mapping.abort(), - ['<CR>'] = cmp.mapping.confirm({ select = true }), - }), - sources = cmp.config.sources({ - { name = 'nvim_lsp' }, - { name = 'luasnip' }, - }, { { name = 'buffer' } }), - }) + require('custom.completion') end, }, } |
