crates.nvim add to cmp sources and fix some typos in config

This commit is contained in:
krolyxon 2023-01-25 23:37:52 +05:30
parent 433f3361a9
commit 4a06eafe98
2 changed files with 7 additions and 2 deletions

View File

@ -76,7 +76,7 @@ M.crates = function()
local options = {
popup = {
style = "minimal",
order = "rounded",
border = "rounded",
show_version_date = false,
show_dependency_version = true,
padding = 1,

View File

@ -99,7 +99,12 @@ local plugins = {
event = { "BufRead Cargo.toml" },
config = function()
require("plugins.configs.others").crates()
end
end,
-- Add crates.nvim to the cmp sources as soon as we load the plugin
init = function()
local cmp = require("cmp");
cmp.setup.buffer({ sources = { { name = "crates" } } })
end,
},
-- load luasnips + cmp related in insert mode only