fix: remove unused completion

This commit is contained in:
Ryan 2024-05-09 14:32:32 +08:00
parent fa186c0c09
commit e54bdaa524
4 changed files with 16 additions and 40 deletions

View File

@ -7,34 +7,33 @@
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"crates.nvim": { "branch": "main", "commit": "8437522d12a8c523da2aee9db2979d070b2ecc33" },
"dressing.nvim": { "branch": "master", "commit": "5162edb1442a729a885c45455a07e9a89058be2f" },
"friendly-snippets": { "branch": "main", "commit": "fa36367422da5a38560892e3db6d090a635d9d41" },
"gitsigns.nvim": { "branch": "main", "commit": "9cafac31a091267838e1e90fd6e083d37611f516" },
"friendly-snippets": { "branch": "main", "commit": "3e9a3f5a0cfcef1741e352c37bda4e82e5eb846a" },
"gitsigns.nvim": { "branch": "main", "commit": "805610a9393fa231f2c2b49cb521bfa413fadb3d" },
"gruvbox-material": { "branch": "master", "commit": "80331fbbec9ba18590a17bc6b7d277d96c05c2b6" },
"killersheep.nvim": { "branch": "master", "commit": "506823c47b854df02e78d5fec9468ab0e542dcf5" },
"lazy.nvim": { "branch": "main", "commit": "3f13f080434ac942b150679223d54f5ca91e0d52" },
"lazy.nvim": { "branch": "main", "commit": "d3974346b6cef2116c8e7b08423256a834cb7cbc" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "273fdde8ac5e51f3a223ba70980e52bbc09d9f6f" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "05744f0f1967b5757bd05c08df4271ab8ec990aa" },
"mason-null-ls.nvim": { "branch": "main", "commit": "de19726de7260c68d94691afb057fa73d3cc53e7" },
"mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" },
"mini.surround": { "branch": "main", "commit": "0f528eb2e1bab420c0569d9e52615144c51db920" },
"neogen": { "branch": "main", "commit": "0daffcec249bf42275e322361fe55b89a05ff278" },
"none-ls.nvim": { "branch": "main", "commit": "f5632db2491fbe02b54f1a321a98548a8ba2bd15" },
"nvim-bqf": { "branch": "main", "commit": "52703d7adc3be3f7c09eea9a80c5b8caa615fb25" },
"nvim-cmp": { "branch": "main", "commit": "8f3c541407e691af6163e2447f3af1bd6e17f9a3" },
"nvim-bqf": { "branch": "main", "commit": "7751b6ef9fbc3907478eaf23e866c4316a2ed1b4" },
"nvim-cmp": { "branch": "main", "commit": "cd2cf0c124d3de577fb5449746568ee8e601afc8" },
"nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" },
"nvim-lspconfig": { "branch": "master", "commit": "aa5f4f4ee10b2688fb37fa46215672441d5cd5d9" },
"nvim-treesitter": { "branch": "master", "commit": "4ae2b452e9bd67ff618e3bb0e3488e49c98465e9" },
"nvim-lspconfig": { "branch": "master", "commit": "a3d9395455f2b2e3b50a0b0f37b8b4c23683f44a" },
"nvim-treesitter": { "branch": "master", "commit": "9e1cda4e71a763ba1f1ac099498c7ce40edc6dd2" },
"nvim-treesitter-context": { "branch": "master", "commit": "2650e6431f7daba5d9c2c64134fa5eb2312eb3d7" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "23b820146956b3b681c19e10d3a8bc0cbd9a1d4c" },
"nvim-web-devicons": { "branch": "master", "commit": "475fbcfcb6ee7c35aa33a6b6207ebd4032791d87" },
"nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" },
"plenary.nvim": { "branch": "master", "commit": "08e301982b9a057110ede7a735dd1b5285eb341f" },
"range-highlight.nvim": { "branch": "master", "commit": "8b5e8ccb3460b2c3675f4639b9f54e64eaab36d9" },
"rustaceanvim": { "branch": "master", "commit": "6f1aedaa387c87768da3c16c295b3431c8a94c61" },
"rustaceanvim": { "branch": "master", "commit": "2eb8776df1aab03f514b38ddc39af57efbd8970b" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
"telescope.nvim": { "branch": "master", "commit": "fac83a556e7b710dc31433dec727361ca062dbe9" },
"ultimate-autopair.nvim": { "branch": "v0.6", "commit": "6ecf7461d44513af89f8257f057fcc99e9297612" },
"ultimate-autopair.nvim": { "branch": "v0.6", "commit": "042587c63b2b2776a83337748d53dba8b67ec545" },
"vim-fugitive": { "branch": "master", "commit": "ce882460cf3db12e99f8bf579cbf99e331f6dd4f" },
"vim-matchup": { "branch": "master", "commit": "2d660e4aa7c566014c667af2cda0458043527902" }
}

View File

@ -20,6 +20,7 @@ vim.opt.diffopt = { "internal", "filler", "closeoff", "iwhite" }
-- controlling
global.mapleader = ' '
o.autoindent = true
o.complete = nil
o.ignorecase = true
o.smartcase = true
o.smartindent = true

View File

@ -144,27 +144,6 @@ local plugins = {
vim.keymap.set('n', '<leader>rr', ':RustLsp runnables<cr>'),
}
},
{
'saecki/crates.nvim',
tag = 'stable',
event = { "BufRead Cargo.toml" },
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
require('crates').setup({
null_ls = {
enabled = true,
},
})
-- setup cmp completion
vim.api.nvim_create_autocmd("BufRead", {
group = vim.api.nvim_create_augroup("CmpSourceCargo", { clear = true }),
pattern = "Cargo.toml",
callback = function()
require('cmp').setup.buffer({ sources = { { name = "crates" } } })
end,
})
end,
},
-- Code editing
{
@ -200,6 +179,7 @@ local plugins = {
event = "CmdlineEnter",
keys = {
vim.keymap.set('n', '<leader>f/', ':Telescope lsp_dynamic_workspace_symbols<cr>'),
vim.keymap.set('n', '<leader>f?', ':Telescope lsp_document_symbols<cr>'),
vim.keymap.set('n', '<leader>fg', ':Telescope live_grep<cr>'),
vim.keymap.set('n', '<leader>fb', ':Telescope buffers<cr>'),
vim.keymap.set('n', '<leader>ff', ':Telescope find_files<cr>'),

View File

@ -16,8 +16,6 @@ cmp.setup({
["<C-n>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.locally_jumpable(1) then
luasnip.jump(1)
else
fallback()
end
@ -38,23 +36,21 @@ cmp.setup({
if luasnip.expandable() then
luasnip.expand()
else
cmp.confirm({
select = true,
})
cmp.confirm({ select = true })
end
elseif luasnip.locally_jumpable(1) then
luasnip.jump(1)
else
fallback()
end
end),
end, { "i", "s" }),
['<S-Tab>'] = cmp.mapping(function(fallback)
if luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end),
end, { "i", "s" }),
},
sources = cmp.config.sources({
{ name = "luasnip", max_item_count = 4 }, -- For luasnip users.