Releases: ph1losof/ecolog.nvim
🏗️ Major Update: Monorepo Support & Multi-line Variables
✨ New Features
🏗 Monorepo Support
- Complete monorepo implementation - ecolog.nvim now works seamlessly in monorepo setups
- Automatically detects and manages environment files across multiple projects
- Improved file detection and autoswitch functionality for monorepo environments
- Provider-based approach with performance optimizations for large repositories
📝 Multi-line Environment Variable Support
- Revolutionary multi-line values support - Handle complex environment variables spanning multiple lines
- Enhanced shelter mode with multi-line masking capabilities
- Improved line peek functionality with proper indentation for multi-line variables
- Advanced multi-line engine with performance optimizations and caching
⚡ Performance Improvements
- Significant startup performance boost via lazy-loading architecture
- Enhanced caching system with LRU cache for improved read speeds
- Optimized file watcher with better performance for large codebases
- Reduced memory footprint and faster environment file processing
🎯 Enhanced Picker Integration
- Custom actions support - Configure custom actions in picker integrations
- Edit functionality - Direct editing of environment variables from picker
- Improved picker architecture with better base class patterns
- Enhanced sorting capabilities with
sort_var_fnoption
🛡 Security & Interpolation
- Optional security disable for shell command interpolation
- Enhanced variable interpolation with better error handling
- Improved security controls for sensitive operations
🔧 Commands & API
New Commands
EcologShellToggle- Toggle ecolog shell variables on/offEcologSelect- Now supports optional arguments for loading specific env filesEcologEnvGetandEcologEnvSet- Enhanced environment variable management
Enhanced Features
- Statusline improvements with better shelter icon management and race condition fixes
- Skip comments option now available across all integrations
- Custom sort functions for environment variables in completion and picker features
- Better handling of duplicate keys in shelter mode
🐛 Bug Fixes
- Fixed line peek navigation issues in multi-line variables
- Resolved shelter mode switch problems
- Fixed file watcher notifications and autodetection
- Improved LSP integration compatibility with Neovim v0.11
- Fixed various race conditions in statusline functionality
- Better handling of nil values in picker integrations
🏃♂️ Performance & Refactoring
- Massive code refactoring for better performance optimization
- Improved provider patterns and reduced code duplication
- Enhanced test coverage with better multi-line testing
- Cleanup of unnecessary patterns and improved architecture
⚠️ Breaking Changes
sort_fnis now deprecated in favor ofsort_var_fn- Updated env file loader architecture may require configuration updates for advanced setups
What's Changed
- sync beta by @ph1losof in #40
- sync beta by @ph1losof in #45
- sync beta by @ph1losof in #46
- fix(statusline): add a fix for potential recursion by @ph1losof in #47
- sync with beta by @ph1losof in #48
- refactor: vim.validate(spec) deprecated by @real-LiHua in #50
- sync by @ph1losof in #51
- Fix repository reference in README.md by @timrydefalk in #52
- sync by @ph1losof in #53
- Optimizations + Refactoring + Monorepo feature + file_watcher by @ph1losof in #54
- feat(multi-line): adds support for multi-line values by @ph1losof in #55
- sync by @ph1losof in #56
- sync by @ph1losof in #57
New Contributors
- @real-LiHua made their first contribution in #50
- @timrydefalk made their first contribution in #52
Full Changelog: 0.8.6...0.9.0
🔥🗞️ Public announcement and hotfixes
🚀 Release Notes
🐛 Bugs
- Restored custom providers functionality that was accidentally removed
- Improved handling of
env_file_patternsfor better environment file detection
If you were using custom providers, they should now work again as expected.
Please upgrade to the latest version!
📢 Announcement
In the nearest time I will go over each feature that we have in the plugin to verify that they work 100%. Unfortunately tests cannot verify a lot of behaviors 😔. I have relied too much on them, sorry for the troubles caused.
I you have spotted anything that looks abnormal to you, feel free to open an issue, this contributes to the plugin development. I will be responding as fast as I can.
⚠️ Breaking changes update: env_file_patterns and mask_length
💥 Breaking Changes (Please read)
- Renamed
env_file_pattern→env_file_patterns(now an array) - Switched from Lua patterns to glob patterns
- Custom patterns now replace defaults instead of supplementing
✨ New Features
- Directory-specific patterns support (e.g.,
config/.env.*) - Added
.envrcto default patterns - Real-time file watching for custom directories
- Multiple directory patterns in single config
- mask_length property in shelter configuration lets you decide static mask length to hide actual value length
🐛 Bug Fixes
- Fixed glob pattern matching in file finder and watcher
- Fixed environment file selection and sorting
- Fixed test suite for new pattern system
📚 Documentation
- Added pattern matching guide with examples
- Updated config examples for glob syntax
- Added default patterns reference
🔧 Internal
- Using
vim.fn.globfor pattern matching - Improved test coverage and error handling
- Optimized file watching system
Minor Update: value pasting in shelter mode
Even though it is a minor update, it still provides important improvement in security features of shelter module.
ecolog.nvim has implemented an unique solution for value copy-pasting which avoids flashing the real values unlike cloak.nvim when masking is enabled.
I highly recommended to update plugin once again to the latest version to avoid security issues.
WARNING HOTFIX
hotfix for disable_cmp feature please use latest release
Major Update: Variable Interpolation, Omnifunc, and Secret Manager Integrations
In this release I have focused a lot on stability and refactoring, but I have added a lot of features that are worth mentioning, some of them I consider in alpha state (aws and vault integration) but you can try them out and share your opinions. I personally think that the plugin is closer being stable, so I suggest existing users to upgrading to the new version.
🎉 New Features
🔄 Variable Interpolation
- Added support for shell-like variable interpolation in environment files
- Supports basic variables (
$VAR,${VAR}), default values (${VAR:-default}), and alternate values (${VAR-alternate}) - Command substitution support (
$(command)) - Configurable features including nested interpolation, escape sequences, and safety limits
- Customizable through
interpolationconfiguration option
⌨️ Omnifunc Integration
- Added native Vim omni-completion support (
<C-x><C-o>) - Automatic setup for filetypes without existing omnifunc
- Rich preview window showing variable type, value, and metadata
- Respects shelter mode settings for sensitive data protection
- Manual configuration options for advanced users
🔐 AWS Secrets Manager Integration (Alpha)
- Load secrets directly from AWS Secrets Manager
- Interactive configuration via
:EcologAWSConfig - Support for both JSON and plain text secrets
- AWS profile and region selection
- Automatic credential validation
- Real-time configuration changes
- Integration with shelter mode for sensitive data protection
🗝️ HashiCorp Vault Secrets Integration (Alpha)
- Load secrets from HCP Vault Secrets
- Interactive configuration via
:EcologVaultConfig - Organization and project selection
- Application-based secret loading
- Real-time configuration updates
- Integration with shelter mode
- Support for service principal authentication
🛠️ Configuration Examples
Variable Interpolation
require('ecolog').setup({
interpolation = {
enabled = true,
max_iterations = 10,
warn_on_undefined = true,
fail_on_cmd_error = false,
features = {
variables = true,
defaults = true,
alternates = true,
commands = true,
escapes = true,
}
}
})AWS Secrets Manager
require('ecolog').setup({
integrations = {
secret_managers = {
aws = {
enabled = true,
region = "us-west-2",
profile = "default",
secrets = {
"my-app/dev/database",
"my-app/dev/api"
}
}
}
}
})HashiCorp Vault
require('ecolog').setup({
integrations = {
secret_managers = {
vault = {
enabled = true,
apps = {
"sample-app",
"database"
}
}
}
}
})📝 Notes
- AWS Secrets Manager integration requires AWS CLI v2
- Vault integration requires HCP CLI
- Variable interpolation is disabled by default
- Omnifunc integration is opt-in via configuration
🐛 Bug Fixes
- Fixed various edge cases in shelter mode
- Improved error handling in secret manager integrations
- Enhanced performance for large environment files
🔮 Future Plans
Upcoming Features and Improvements
- add more cmp integrations mainly with
coc.nvimandcoq.nvim - add more tests for main tooling
- focus on stability of aws and vault integrations
- add infisical integration?
Community Feedback
I'm always looking to improve ecolog.nvim based on community needs. Some areas I'm particularly interested in:
- 📊 Usage patterns and common workflows
- 🎯 Pain points in environment management
- 💡 Integration requests with other tools
- 🔧 Performance optimization opportunities
- 🐛 Bugs that you encounter
Contributing
If you're interested in helping with any of these features:
- Check the GitHub issues for related discussions
- Share your opinion and submit enhancements in GitHub issues
- I you are willing to help submit PRs with implementations or suggestions
Public announcement
Hi 👋
Starting release notes from 0.7.3, because I feel like this plugin is 73% ready. Still needs bits of polishing here and there, but I feel like it is ready to be used as a daily driver.
In this announcement I will go over what was added, since the last unfairly deleted reddit posts. This will be helpful for existing and new users.
Previewers:
Picker Support
ecolog.nvim now supports masking in all three main picker preview windows: fzf-lua, telescope.nvim, snacks.nvim picker
CleanShot.2025-01-18.at.21.15.58.mp4
Configuration
You can configure it however you want it to work as for example in this configuration (as for example disable masking in file buffers, but enable in previewer buffers):
shelter = {
modules = {
snacks_previewer = true,
fzf_previewer = true,
telescope_previewer = true,
files = false,
},
},Performance changes 🚀:
Now ecolog.nvim utilizes LRU caching for previewu buffers in all of these pickers so in comparison to cloak.nvim it is much more performant on this side.
Snacks.nvim picker support
ecolog.nvim now supports snacks.nvim picker just like the one from fzf-lua and telescope.nvim
Shelter in file buffers
Shelter on leave
Just like cloak.nvim, ecolog.nvim now supports shelter_on_leave feature:
CleanShot.2025-01-18.at.21.28.16.mp4
It is enabled by default, when files module is enabled, but can be configured with following:
opts = {
shelter = {
modules = {
files = {
shelter_on_leave = true,
},
},
},
},Completion disabling
Again just like cloak.nvim, ecolog.nvim now supports disabling cmp in configured .env files.
However, unlike cloak.nvim it supports both nvim-cmp and blink-cmp.
As well as shelter_on_leave It is enabled by default, but can also be configured as following
opts = {
shelter = {
modules = {
files = {
cmp = true,
},
},
},
},Improved highlights
Now ecolog.nvim properly handles highlights for un-masked variables in masked file buffers.
Shelter changes
Custom mask highlight
Now you can define your own highlights for masked values, as following:
shelter = {
configuration = {
highlight_group = "NonText" -- Use a different highlight group for masked values
}
}Source-based patterns
A configuration option to set a specific shelter modes for specific files or sources as default mode.
shelter = {
configuration = {
-- Pattern-based rules take precedence
souces = {
["*.production"] = "full", -- Always fully mask environment variables in any file ending in .production
["shell"] = "none", -- Never mask shell variables
},
}
}Variable-based patterns
Allows to configure shelter mode variable name patterns, overrides masking modes for source-based patterns and default masking mode.
shelter = {
configuration = {
-- Pattern-based rules take precedence
patterns = {
["*_KEY"] = "full", -- Always fully mask API keys
["TEST_*"] = "none", -- Never mask test variables
},
}
}Providers
Usage configuration
ecolog.nvim introduces new configuration option - provider_patterns, it controls how environment variables are extracted from your code and how completion works. It can be configured in two ways:
-
As a boolean (for backward compatibility):
provider_patterns = true -- Enables both extraction and completion with language patterns -- or provider_patterns = false -- Disables both, falls back to word under cursor and basic completion
-
As a table for fine-grained control:
provider_patterns = { extract = true, -- Controls variable extraction from code cmp = true -- Controls completion behavior }
Extract Mode
The extract field controls how variables are extracted from code for features like peek, goto definition, etc:
-
When
true(default): Only recognizes environment variables through language-specific patterns- Example: In JavaScript, only matches
process.env.MY_VARorimport.meta.env.MY_VAR - Example: In Python, only matches
os.environ.get('MY_VAR')oros.environ['MY_VAR']
- Example: In JavaScript, only matches
-
When
false: Falls back to the word under cursor if no language provider matches- Useful when you want to peek at any word that might be an environment variable
- Less strict but might give false positives
Completion Mode
The cmp field controls how completion behaves:
-
When
true(default):- Uses language-specific triggers (e.g.,
process.env.in JavaScript) - Only completes in valid environment variable contexts
- Formats completions according to language patterns
- Uses language-specific triggers (e.g.,
-
When
false:- Uses a basic trigger (any character)
- Completes environment variables anywhere
- Useful for more flexible but less context-aware completion
vim.env integration
ecolog.nvim now supports adding environment variables to vim.env this is useful when running tests with neotest or when your neovim needs to access something from .env file
Statusline integration
Allows to integrate with any statusline or specifically with lualine, displays currently selected .env file, number of currently loaded environment variables and whether any of shelter modules are currently enabled or disabled
You can configure by setting following option in your ecolog.nvim configuration:
integrations = {
statusline = true
},And this option in your lualine configuration:
sections = {
lualine_x = {
require('ecolog').get_lualine(),
},
}This section is always displayed, if there is no .env file selected it will just print that there is no file, there is also hidden_mode which doesn't show this section if there is no file. It can be configured as following:
integrations = {
statusline = {
hidden_mode = true,
}
},PS
I have highlighted only the most important feature set.
There have been other updates, fixes and performance optimizations. However, I decided to not include it, to make it more shorter and concise.
I know that it is not that place to discuss it, but I want to explain plugin promotion situation a bit. To summarize I have been disliked personally by a single reddit moderator with power complex. The reason of this, was because I have posted new and important features for this plugin "too much" as he says. However, there isn't a single rule that I have broken. Additionally my initially, approved posts by moderators team have been deleted. All because I tried to to appeal it.
I write this to inform that currently I don't have a way to promote this plugin and get people to use it to enhance it's quality. Writing this to update current stargazers about the new features and current plugin state(that it has much less bugs). Although, I will be continuing to support it and release new features as previously. If you can share it with your friends thanks in advance.
I want to first of all thank all contributors, also everyone for jumping on the train early and for using it currently!


