diff options
| author | Nanderty <psopka@sopka.ch> | 2023-03-15 23:36:14 +0100 |
|---|---|---|
| committer | Nanderty <psopka@sopka.ch> | 2023-03-15 23:36:14 +0100 |
| commit | fba8830826fa88ef43d84fb051f90f11e4ae939b (patch) | |
| tree | 4fc0bbae7e49c9b670fc34505a8352400c0ffa8d /lua/Nanderty/Plugins/cmp.lua | |
| parent | 59bd3aeee04b6ff559c51a324234a5100db0b2e1 (diff) | |
| download | neovim-config-fba8830826fa88ef43d84fb051f90f11e4ae939b.tar.gz neovim-config-fba8830826fa88ef43d84fb051f90f11e4ae939b.tar.bz2 neovim-config-fba8830826fa88ef43d84fb051f90f11e4ae939b.zip | |
cleanup
Diffstat (limited to 'lua/Nanderty/Plugins/cmp.lua')
| -rw-r--r-- | lua/Nanderty/Plugins/cmp.lua | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/lua/Nanderty/Plugins/cmp.lua b/lua/Nanderty/Plugins/cmp.lua deleted file mode 100644 index b9f2095..0000000 --- a/lua/Nanderty/Plugins/cmp.lua +++ /dev/null @@ -1,82 +0,0 @@ -require('mason').setup() - -require('mason-lspconfig').setup({ - ensure_installed = { - } -}) - -local lsp_capabilities = require('cmp_nvim_lsp').default_capabilities() -local lsp_attach = function(client, bufnr) -end - -local lspconfig = require('lspconfig') -require('mason-lspconfig').setup_handlers({ - function(server_name) - lspconfig[server_name].setup({ - on_attach = lsp_attach, - capabilities = lsp_capabilities, - }) - end, -}) - -local cmp = require'cmp' - -cmp.setup({ - snippet = { - expand = function(args) - vim.fn["UltiSnips#Anon"](args.body) - end, - }, - window = { - }, - mapping = cmp.mapping.preset.insert({ - ["<Tab>"] = cmp.mapping(function(fallback) - if vim.fn.pumvisible() == 1 then - feedkey("<C-n>", "n") - elseif cmp.visible() then - cmp.select_next_item() - else - fallback() - end - end, { - "i", - }), - ["<S-Tab>"] = cmp.mapping(function(fallback) - if vim.fn.pumvisible() == 1 then - feedkey("<C-p>", "n") - elseif cmp.visible() then - cmp.select_prev_item() - else - fallback() - end - end, { - "i", -}), -['<C-b>'] = cmp.mapping.scroll_docs(-4), -['<C-f>'] = cmp.mapping.scroll_docs(4), -['<C-Space>'] = cmp.mapping.complete(), -['<C-e>'] = cmp.mapping.abort(), -['<CR>'] = cmp.mapping.confirm({ select = true }), - }), - sources = cmp.config.sources({ - { name = 'nvim_lsp' }, - { name = 'ultisnips' }, - { name = 'omni' }, - { name = 'buffer' }, - }) -}) - -local lsp_capabilities = require('cmp_nvim_lsp').default_capabilities() -local lsp_attach = function(client, bufnr) - -- Create your keybindings here... -end - -local lspconfig = require('lspconfig') -require('mason-lspconfig').setup_handlers({ - function(server_name) - lspconfig[server_name].setup({ - on_attach = lsp_attach, - capabilities = lsp_capabilities, - }) - end, -}) |
