Skip to content

fix formatter for html and error in rest.run()#165

Closed
udayvir-singh wants to merge 3 commits intorest-nvim:mainfrom
udayvir-singh:main
Closed

fix formatter for html and error in rest.run()#165
udayvir-singh wants to merge 3 commits intorest-nvim:mainfrom
udayvir-singh:main

Conversation

@udayvir-singh
Copy link
Copy Markdown
Contributor

@udayvir-singh udayvir-singh commented Dec 29, 2022

Fixes error caused by html formatter running even when tidy is not available on the system. Also fixes docs related to disabling formatters.

fixes #164

Fixes error caused by html formatter running even when tidy is not
available on the system. Also fixes docs related to disabling
formatters.
Adds debug<boolean> opt in config to show optionally show debug messages.

Fixes rest.run showing errors because it was passing an argument of type
<boolean> to rest.run_request instead of the expected <table>.
@udayvir-singh udayvir-singh changed the title config: fix formatter for html config: fix formatter for html and error in rest.run() Dec 29, 2022
@udayvir-singh udayvir-singh changed the title config: fix formatter for html and error in rest.run() fix formatter for html and error in rest.run() Dec 29, 2022
@udayvir-singh
Copy link
Copy Markdown
Contributor Author

udayvir-singh commented Dec 29, 2022

Now this PR also fixes #165 and nasty errors on rest.run() due to incorrect handling of opts.

Copy link
Copy Markdown

@ray-x ray-x left a comment

Choose a reason for hiding this comment

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

Thanks. the changes fix #164

Comment thread lua/rest-nvim/init.lua Outdated
Copy link
Copy Markdown

@ray-x ray-x left a comment

Choose a reason for hiding this comment

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

LGTM

@teto
Copy link
Copy Markdown
Collaborator

teto commented Dec 29, 2022

you can drop the second commit. I think it's best to throw an error if tidy is not available, so nothing to change on that side, what I am curious about is why html = nil didn't work (that's the way to remove entries from lua arrays). I believe it might be due to how tbl_deep_extend works in config = vim.tbl_deep_extend("force", config, user_configs) but I haven't investigated. Will do if you dont know.

NB: Sry for the close, my browser focused the closed button before I typed Enter :s

@teto teto closed this Dec 29, 2022
@teto teto reopened this Dec 29, 2022
@udayvir-singh udayvir-singh closed this by deleting the head repository Dec 30, 2022
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.

Disable debug logs?

3 participants