Replies: 1 comment 1 reply
-
- doc = indent(doc)
+ doc = indent([line, doc]) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
LorNtz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm creating a plugin to format some javascript code with custom indentation and I'm getting started by making a demo. For example I have a snippet like this:
(looks ugly because I want to make sure that I'm leveraging the default printer)
I want the function call statement
func()
to indent by an extra level. After formatting I should get the following output:So I came up with some code like this:
But I'm not getting the
func()
indented as I expected. What I got is:Formatted, but no extra indentation for
func()
. I'm pretty sure that theindent()
command was called, since I got 'calling indent command' printed out in my console. I have no idea whether I'm doing wrong withindent()
. How could I fix the problem?Beta Was this translation helpful? Give feedback.
All reactions