Commit Graph

3 Commits

Author SHA1 Message Date
7a126af17a
Refactored main init.lua file
File has undergone refactor to reduce overall expected responsibility
which was temporary for kickstarting the extension.

The presser/init.lua script will now, and only now, be responsible for
handling and setting up configuration of presser itself (extensibility
to be concluded in future). Now, the script defines presser@setup()
which is to be called by a user in their Neovim config script. This
function currently defines one user command which allows for executing
the builtins@find_replace.

Most functions which were defined in table@presser have been migrated to
a new location presser/actions, defined in table@actions.

The function definition presser@find_replace has been migrated to
presser.builtins (in builtins@find_replace).

Consult other commits related to migrations for more info about specific
refactors.
2023-01-13 16:04:04 +00:00
4d40f43a73
Updated presser/init.lua
File has been moved to subdirectory.
Note: TBR = To Be Refactored/Restructured.

- changed `ctx` to `gcm` as import for context manager module.
	- gcm/GCM = global context manager
	- all associations with this variable have been updated
	  respectfully.
- func@new is no longer responsible for creating a new context in the
  GCM. This is now handled per built-in.
	- call to gcm@update now respects newly modified GCM structure.
- Added presser@move_next_buffer:
	- temporary function to experiment moving between buffers which
	  are marked as `allowed = true` in the GCM.
	- TBR.
- Added func@read_buffer:
	- reads the contents of all buffers in the GCM.
	- returns a table storing all collected buffer contents.
	- TBR.
- Added presser@execute:
	- temporary function which calls func@read_buffer and performs a
	  vim substitute as per the built-in presser@find_replace.
	 - TBR.
- Added func@start_buffer:
	- place the cursor in an initial buffer by name.
	- TBR. Should be func@put_cursor_in_buf (or similar).
- Updated keymap to store more keys for experimenting.
- Calculate the centre of the current window height (should check for
  split windows in future, or determine terminal size).
- Changed ordering of window creation. Windows created in order they are
  rendered.
2023-01-10 22:17:30 +00:00
8f88af8d69
Renamed modules
Files were moved from top-level space into presser sub-directory.
2023-01-09 19:46:12 +00:00