Skip to content

feat(api): support for configuring several filetypes in one go #18

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

Closed
wants to merge 3 commits into from
Closed

feat(api): support for configuring several filetypes in one go #18

wants to merge 3 commits into from

Conversation

xiaoshihou514
Copy link
Collaborator

Resolves #14
But it basically doubles the code in filetype.lua, so I'm not sure if it should be merged, if it does I will update the README.

…pes in one go

Resolves #14
But it basically doubles the code in filetype.lua, so I'm not sure if it should be merged.
I also changed the behaviour of GuardDisable so that it will not complain when ran several times for the same filetype
@@ -37,7 +37,7 @@ end


local function box_for_group(fts)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am very confuse on there. can we reuse exist function instead of create box_for_group lots of things are duplicated

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well yes and no.
The object returned by ft({"foo", "bar"}) would have to use a different set of logic. But the fmt, lint and append methods are really just calling the respective methods on ft("foo") and ft("bar") (in this case). I don't know if the logic could be simplified further.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the metatable related logic could be abstracted tho.

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.

accept array for filetype
2 participants