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

Move import sorting to JuliaFormatter.jl?

Open MilesCranmer opened this issue 1 year ago • 2 comments

@fredrikekre @pfitzseb I was wondering if the code action implemented in https://github.com/julia-vscode/LanguageServer.jl/pull/1076 could instead be moved to JuliaFormatter.jl, and then called via LanguageServer.jl? Having it implemented in LanguageServer directly makes it a bit tricky to automate things – like using that feature it in a pre-commit hook or in CI testing.

MilesCranmer avatar Jan 06 '24 17:01 MilesCranmer

I thought that was already part of the formatter (too).

fredrikekre avatar Jan 06 '24 17:01 fredrikekre

I don't think so, sadly. It's in a few of the style guides but you still need to perform the sorting manually. As far as I can tell you have written the only implementation of an import sorter.

MilesCranmer avatar Jan 06 '24 17:01 MilesCranmer