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

[Feature request] Pass formatter data to autocommands #256

Open
gegoune opened this issue Jul 13, 2023 · 0 comments
Open

[Feature request] Pass formatter data to autocommands #256

gegoune opened this issue Jul 13, 2023 · 0 comments

Comments

@gegoune
Copy link

gegoune commented Jul 13, 2023

Hey Mike,

I would like to notify myself when formatting takes place, it's easily done using FormatterPre/Post autocommands, but I would like to be able to display formatter that has been used to perform formatting. Would you be willing to accept PR for that? I think there is an option to pass arbitrary data from nvim_exec_autocmds, so I replaced https://github.com/mhartington/formatter.nvim/blob/master/lua/formatter/util.lua#L124 with that api call and tried to pass cmd used in formatter from https://github.com/mhartington/formatter.nvim/blob/master/lua/formatter/format.lua#L222, but would have to be returning cmd from run() function.

Is that something you would be interesting on merging should I get it to work?

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

No branches or pull requests

1 participant