Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: init_intercepter to the checkInit method to allow range commands like scratchPad #15

Open
LintaoAmons opened this issue Oct 29, 2023 · 0 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@LintaoAmons
Copy link
Owner

Currently use closure to make each command check the init status firstly, which makes it hard to take args as a lua api

	{
		name = "Scratch",
		callback = config.initConfigInterceptor(scratch.scratch),
	},

But I want to remove the initConfigInterceptor method, instead use the same method in ScratchPad

function M.scratchPad(mode, startLine, endLine)
	if not config.checkInit() then
		config.initConfig()
	end
...

So this should just be a simple refactor~

@LintaoAmons LintaoAmons added help wanted Extra attention is needed good first issue Good for newcomers labels Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant