nvim-cmp source for twig.
This plugin autocompletes PHP constants located in src directory for twig.
Output is:
constant('App\\Voter\\MyVoter::CAN_EDIT')
Constants are refreshed every 60 seconds.
- ripgrep to search for PHP constants.
require('cmp').setup({
sources = {
{ name = 'twig_constants' },
},
})
The plugin is activated for twig
filetype only.
The trigger character is a single quote, and the line must contains constant
.
There is no configuration at the moment.
- Make sure cursor is between quotes
- Follow composer autoload