Avoid "aligned" indentations
goerz opened this issue · 2 comments
Using the current master
of julia-vim
(no other plugins/configuration), I get the following indent behavior:
problem = ControlProblem(
X
where X
marks the position of the cursor after hitting Enter after the first line.
That is, the indent plugin aligns the indentation with the opening bracket. This is not a style of indentation I wish to use, and not one that is recommended by any of the styles supported by JuliaFormatter. Instead, I'd like to have the second line indented with 4 spaces.
Is there any way to tweak the plugin to achieve this?
Ah, I found that
let g:julia_indent_align_brackets = 0
solves this.
Two comments:
-
Since the README for this plugin has quite a lot of information, it didn't occur to me to look at the help file (where
g:julia_indent_align_brackets
is documented). I would maybe recommend either keeping the README minimal and linking to the help file, or alternatively, make sure that everything is documented in the README (and potentially get rid of the help file). -
I feel like the defaults for the indentation should match what
JuliaFormatter
would do. Maybe I'm wrong, but I'm assuming that's what everyone is / should be using. The extra indentation for funcargs is another example where this plugin does not matchJuliaFormatter
(and that one isn't even configurable, see #259)
Feel free to close this issue, unless you want to keep it open for the above two comments
Of course, the README actually says that it's incomplete, but I missed that part, skimming through ;-)