refactor(cmp): add optional where necessary

Makes it easier to disable it for users who want to try other completion
engines, without it being pulled back by some Extra.
This commit is contained in:
Iordanis Petkakis 2024-10-08 23:57:38 +03:00
parent 13a4a84e34
commit 0f15ef90e9
5 changed files with 6 additions and 0 deletions

View file

@ -85,6 +85,7 @@ return {
-- snippets
{
"nvim-cmp",
optional = true,
dependencies = {
{
"garymjr/nvim-snippets",
@ -209,6 +210,7 @@ return {
-- Add lazydev source to cmp
{
"hrsh7th/nvim-cmp",
optional = true,
opts = function(_, opts)
table.insert(opts.sources, { name = "lazydev", group_index = 0 })
end,

View file

@ -2,6 +2,7 @@ return {
-- Tabnine cmp source
{
"nvim-cmp",
optional = true,
dependencies = {
{
"tzachar/cmp-tabnine",

View file

@ -133,6 +133,7 @@ return {
{
"hrsh7th/nvim-cmp",
optional = true,
opts = function(_, opts)
opts.auto_brackets = opts.auto_brackets or {}
table.insert(opts.auto_brackets, "python")

View file

@ -9,6 +9,7 @@ return {
-- Extend auto completion
{
"hrsh7th/nvim-cmp",
optional = true,
dependencies = {
{
"Saecki/crates.nvim",

View file

@ -59,6 +59,7 @@ return {
},
{
"hrsh7th/nvim-cmp",
optional = true,
dependencies = {
{ "roobert/tailwindcss-colorizer-cmp.nvim", opts = {} },
},