Problem
Currently, cmp-dotenv appears to support .env* files through regex matching, but it would be beneficial to have more explicit support for custom environment file naming conventions that don't follow the standard .env* pattern.
Requested Feature
Add configuration options to explicitly specify custom environment file patterns beyond the default .env* files. This would include support for:
.envrc (used by direnv)
env.prod, env.dev, env.staging
- Custom user-defined environment file names
- Project-specific environment file conventions
Use Cases
Many projects use different environment file naming conventions:
- direnv users: Often use
.envrc files
- Production deployments: May use
env.prod, env.production
- Custom workflows: Teams may have their own naming conventions
Suggested Implementation
Consider adding a configuration option like:
require('cmp').setup({
sources = {
{
name = 'dotenv',
option = {
path = '.',
custom_patterns = { '.envrc', 'env.*', 'environment.*' },
-- or
file_patterns = { '.env*', '.envrc', 'env.{prod,dev,staging}' }
}
}
}
})
Alternative Solution
For users who need custom environment file patterns support immediately, ecolog.nvim provides a nearly drop-in replacement for cmp-dotenv which additionally includes context awareness via provider-patterns feature and solves #3
Problem
Currently, cmp-dotenv appears to support
.env*files through regex matching, but it would be beneficial to have more explicit support for custom environment file naming conventions that don't follow the standard.env*pattern.Requested Feature
Add configuration options to explicitly specify custom environment file patterns beyond the default
.env*files. This would include support for:.envrc(used by direnv)env.prod,env.dev,env.stagingUse Cases
Many projects use different environment file naming conventions:
.envrcfilesenv.prod,env.productionSuggested Implementation
Consider adding a configuration option like:
Alternative Solution
For users who need custom environment file patterns support immediately, ecolog.nvim provides a nearly drop-in replacement for
cmp-dotenvwhich additionally includes context awareness via provider-patterns feature and solves #3