Juno.jl icon indicating copy to clipboard operation
Juno.jl copied to clipboard

[BUG] formatting using cmd-J cmd-F does not look into .JuliaFormatter file

Open TsurHerman opened this issue 4 years ago • 4 comments

  1. place a .JuliaFormatter file somewhere in the root of a test file A.jl with margin = 10000
  2. place a very long julia line in A.jl
  3. Format using JuliaFormatter.format("A.jl")
  4. Undo
  5. Format using cmd-J cmd-F
  6. Behold the difference

TsurHerman avatar May 21 '20 08:05 TsurHerman

] up and update your JuliaFormatter to .5.4 will solve this

aviatesk avatar May 22 '20 02:05 aviatesk

It did not solve it for me...

TsurHerman avatar May 22 '20 17:05 TsurHerman

can you share your environment, exact example, etc ?

aviatesk avatar May 22 '20 17:05 aviatesk

Atom v0.12.11 Juno v0.8.2 JuliaFormatter v0.5.4

Julia Version 1.3.1 Commit 2d5741174c (2019-12-30 21:36 UTC) Platform Info: OS: macOS (x86_64-apple-darwin18.6.0) CPU: Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-6.0.1 (ORCJIT, skylake) Environment: JULIA_EDITOR = atom -a JULIA_NUM_THREADS = 4

my setup is that I have .JuliaFormatter.toml in Work\ directory with

margin = 100
remove_extra_newlines = true

under Work I have another directory A with a filename named A.jl with:

A = 5


B =       6

notice the two-line space between the first and second statements and the offset spaces before the 6 If I use cmj-j cmd-f , the 6 pops into place, If I use

using JuliaFormatter
JuliaFormatter.format("A.jl");

The 6 pops into place and the extra newline is removed as-well

TsurHerman avatar May 22 '20 20:05 TsurHerman