nvim-cmp source for symfony translations.
The source is using ./var/cache/dev/translations/catalog.fr.SHA1.php
file.
This plugin the autocomplete won't work if the above file doesn't exist.
Routes are refreshed every 60 seconds.
- completes translation domains
- documentation displays full french translation value
->addFlash
only displaysflashes_messages
translationsmessage
attribute only displaysvalidators
translations
require('cmp').setup({
sources = {
{ name = 'symfony_translations' },
},
})
The plugin is activated for php
and twig
filetypes.
The trigger character is a single quote, and the line must contains
trans
, addflash
or message:
. This covers most of Symfony and twig
translation functions:
- PHP
- $translation->trans
- $this->addFlash
- message attribute for validators
- Twig
- ''|trans({}, '')
There is no configuration at the moment.
- Configure catalog locale