refactor(cmp): add optional where necessary (#4557)

## Description
Makes it easier to disable it for users who want to try other completion
engines, without it being pulled back by some Extra.

<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)
None
<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
This commit is contained in:
Iordanis Petkakis
2024-10-23 12:44:27 +03:00
committed by GitHub
parent b4eb4e1f4a
commit 0f5fa439e5
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 = {} },
},