AstroNvim comes with nvim-cmp for powering completion out of the box. This page documents common configuration options such as custom keybindings or adding more sources.
Customize Keybindings
Some overrides require access to the plugin itself that you are overriding. This comes up a lot in things adding custom mappings to cmp. This can be achieved with the following plugin spec:
Customize Source Priority
Similarly to customizing mappings, you can customize and configure your cmp sources as well:
Modify Existing Source Options
You can use this cmp override to also customize the options of the sources:
Add More Sources
To add more sources than the default, you can add other cmp source plugins as dependencies, and then add the new source in the opts:
Advanced Setup For Filetype and Cmdline
You can also use the config function and the provided default configuration function for each plugin to extend the configuration and setup of cmp like adding cmp-cmdline:
Limit Label and Menu Item Length
To limit the label and menu item length and prevent the documentation window from getting too small, you can use the following configuration: