generated from nvimdev/nvim-plugin-template
-
-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Details
No response
Enhance :HurlManageVariable with persistence and env file integration
Description:
The :HurlManageVariable command currently lacks persistence between sessions and doesn't load initial values from the configured env files. This needs to be fixed to improve variable management functionality.
Tasks:
-
In
lua/hurl/main.lua:- Modify
HurlManageVariablecommand to load variables from env files on initialization - Add persistence functionality to save variables between sessions
- Update variable management popup to reflect both env file and persisted variables
- Modify
-
In
lua/hurl/lib/hurl_runner.lua:- Add function to parse env files and extract variables
- Modify variable injection logic to handle both persisted and env file variables
-
In
test/plugin_spec.lua:- Add test cases for variable persistence
- Add test cases for env file variable loading
- Add test cases for variable management popup
Test:
- Add the following test cases to
test/plugin_spec.lua:it('should load variables from env file', function() -- Test env file loading end) it('should persist variables between sessions', function() -- Test variable persistence end) it('should show both env file and persisted variables in popup', function() -- Test popup display end)
Add persistence and env file integration to HurlManageVariable
Description:
Enhance the :HurlManageVariable command to persist variables between sessions and load initial values from configured env files.
Tasks:
-
In
lua/hurl/main.lua:- Add function to load variables from env files into
_HURL_GLOBAL_CONFIG.global_vars - Modify
HurlManageVariablecommand to:- Read from
vim.fn.stdpath('data')/hurl-nvim/variables.json - Display both env file and persisted variables
- Save changes to persistence file
- Read from
- Add function to load variables from env files into
-
In
lua/hurl/utils.lua:- Add functions for reading/writing persistent storage
- Add function to parse env files into variable format
-
In
test/plugin_spec.lua:describe('HurlManageVariable', function() it('loads variables from env files') it('persists variables between sessions') it('displays combined env and persisted variables') end)
Implementation Notes:
- Store persistent variables in JSON format
- Load env file variables on plugin initialization
- Merge env file variables with persisted variables in display
- Handle variable conflicts with user notification
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers