about summary refs log tree commit diff
path: root/.config/nvim/lua/plugins/cmp.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/plugins/cmp.lua')
-rw-r--r--.config/nvim/lua/plugins/cmp.lua103
1 files changed, 0 insertions, 103 deletions
diff --git a/.config/nvim/lua/plugins/cmp.lua b/.config/nvim/lua/plugins/cmp.lua
deleted file mode 100644
index 7728d19..0000000
--- a/.config/nvim/lua/plugins/cmp.lua
+++ /dev/null
@@ -1,103 +0,0 @@
-return {
-  'hrsh7th/nvim-cmp',
-  dependencies = {
-    'neovim/nvim-lspconfig',
-    'hrsh7th/cmp-nvim-lsp',
-    'hrsh7th/cmp-buffer',
-    'hrsh7th/cmp-path',
-    'lukas-reineke/cmp-rg',
-    'onsails/lspkind.nvim'
-  },
-  config = function()
-    local cmp = require('cmp')
-    local lspkind = require('lspkind')
-    cmp.setup({
-      -- preselect = cmp.PreselectMode.None,
-      completion = {
-        completeopt = "menu,menuone,noinsert",
-        callSnippet = "Replace",
-        keywordSnippet = "Replace",
-      },
-      window = {
-        completion = cmp.config.window.bordered({}),
-        documentation = cmp.config.window.bordered({}),
-      },
-      snippet = {
-        expand = function(arg)
-          vim.snippet.expand(arg.body)
-        end
-      },
-      mapping = cmp.mapping.preset.insert({
-        ['<Tab>'] = cmp.mapping.confirm({ select = true }),
-        ['<C-n>'] = cmp.mapping.select_next_item(),
-        ['<C-p>'] = cmp.mapping.select_prev_item(),
-        ['<C-g>'] = cmp.mapping.abort(),
-      }),
-      sources = cmp.config.sources(
-        {
-          { name = 'nvim_lsp' },
-        },
-        {
-          { name = 'path' },
-        }
-        -- {
-        --   { name = 'buffer' },
-        --   { name = 'rg',    keyword_length = 3 }
-        -- }
-      ),
-      formatting = {
-        format = lspkind.cmp_format({
-          mode = 'symbol'
-        })
-      },
-      -- view = {
-      --   entries = 'native'
-      -- },
-    })
-
-    local capabilities = require('cmp_nvim_lsp').default_capabilities()
-    vim.lsp.config('lua_ls', {
-      cmd = { '/home/venomade/.local/share/lua-language-server/bin/lua-language-server' },
-      capabilities = capabilities,
-      root_markers = {
-        ".luarc.json",
-        ".luarc.jsonc",
-        ".git",
-      },
-      settings = {
-        Lua = {
-          runtime = {
-            version = 'Lua 5.4',
-            -- luarocks path --lr-path | tr ';' '\n' | sed 's/?.*//' | sort -u
-            path = {
-              '?.lua',
-              '?/init.lua',
-              '/home/venomade/.luarocks/share/lua/5.4/?.lua',
-              '/home/venomade/.luarocks/share/lua/5.4/?/init.lua',
-              '/usr/share/lua/5.4/?.lua',
-              '/usr/share/lua/5.4/?/init.lua',
-              './stubs/?.lua',
-              './stubs/?/init.lua'
-            },
-          },
-          workspace = {
-            library = {
-              '/home/venomade/.luarocks/share/lua/5.4',
-              '/usr/share/lua/5.4',
-              './stubs'
-            },
-          },
-          diagnostics = {
-            enable = true,
-          },
-        },
-      },
-    })
-
-    vim.lsp.enable('lua_ls')
-    vim.lsp.config('clangd', {
-      capabilities = capabilities
-    })
-    vim.lsp.enable('clangd')
-  end
-}