Closed malteseduck closed 11 years ago
Here is the case. Trying to type this:
"test" , "case" , "for" , "you"
Actually results in this:
"test" , "case" , "for" , "you"
Hi,
Thanks for raising this issue. I'm still trying to find out a good resource on xquery code style (I'll probably try to make formatter rules to resemble http://xqdoc.org/xquery-style.pdf in the future). I tried to follow the typical formatting behaviour of IntelliJ for java code to have "the feeling" similar but in case of xquery specific constructs I'll have to fix that.
Have you got any suggestions around formatting style or a good resources?
Thanks
Please re-open if similar problem happens for similar expressions. In case of any other formatter issues (there might be plenty), please raise separate issues. Thanks for using the plugin and for the feedback :) It's invaluable!
I have usually used that document you mention for code style. Here is one by Micah Dubinko: http://developer.marklogic.com/blog/xquery-coding-guidelines. Those two are the main ones I have seen.
I don't know if this is a bug or not, but it seems that many times when I cut and paste XQuery code to various places the format of the XQuery is lost. Here is a simple example:
If I type a comma after the closing ")" for the fn:concat() function and hit the return key then the cursor moves to beginning of the line on the new line instead of being indented to match the current indentation.
When I cut and paste this over itself (or anywhere else) then the "fn:concat(" and the closing ")" for that function lose their indentation. I had a whole block of XQuery I pasted somewhere and had to re-indent it all (not your fault, that is what I get for using the working version).
There are some cases where I move the the cursor to the new line and it adds another indentation level when you wouldn't think it should. I will try to reproduce it and create another issue if I can.