Skip to content

Adding 'range' and 'flags' as optional options for specific situations#5

Open
JarKz wants to merge 4 commits intoroobert:mainfrom
JarKz:main
Open

Adding 'range' and 'flags' as optional options for specific situations#5
JarKz wants to merge 4 commits intoroobert:mainfrom
JarKz:main

Conversation

@JarKz
Copy link

@JarKz JarKz commented Apr 14, 2023

I'd read the issue #3 and had thought that make senses.

Now, with this commit, plugins can works normally. And if some peoples want to configure 'range' or 'flags' respectively then they can pass the table like:

require("search-replace.single-buffer").cword({ range = "1,100", flags = "c" })

There is backward compatibility because param opts are optional and gets form overrided default value by user or default if received param don't exists. Also the README updated, added section for configuring using clear lua and updated configuration.

JarKz added 4 commits April 14, 2023 22:08
Changelog:
  - config.lua – refactor unreadable code and adding default range param
  - single-buffer.lua - added optional opts param for every function and
    refactor some code that links to config.lua
  - multi-buffer.lua – same as above (single-buffer.lua)
  - visual-multitype.lua - refactor some code that links to config.lua
Changes:
  - single-buffer.lua - added or statement in string counting (choice
    between opts.flags or config.options.single_buffer.flags). Also
    added parentheses for or statement after concats.
  - multi-buffer.lua - same as above (but
    config.options.multi-buffer.flags)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant