serve-d
serve-d copied to clipboard
dfmt does not use .editorconfig when used with serve-d
I'm using serve-d
with coc.vim
like described in https://github.com/Pure-D/serve-d/issues/104
on the project root I got a .editorconfig
with the following content:
[*.d]
indent_style = space
indent_size = 2
When I format my D file like:
dub run dfmt -- -i source/app.d
It WORKS like charm, the indent style is spaces and only two characters.
So here's what I did then:
- When used by coc-vim
serve-d
it always formats using tabs. - Then however it WORKED using VsCode.
- suddenly it ALSO worked using coc-vim
- Then I changed the
.editorconfig
again by addingdfmt_brace_style = otbs
OR changing theindent_size
to4
- both coc-vim AND VsCode ignore the change in brace style and
indent_size
. BUTdub run dfmt -- -i source/app.d
still works like a charm.
It seems VERY unreliable to me. Like as if the .editorconfig
is getting copied (SOMETIMES) and used somewhere else.
Is there serve-d
way to formatting files? Am I doing something wrong?
Can you reproduce this error, shall I append a (quite verbose) log?
Thanks for your time!
I should also mention that restarted the editors multiple times, after I changed the .editorconfig
.
can you enable the verbose log and just send the request coc-vim does when formatting?
In vscode it works as expected, using the editor settings (see right side of bottom status line), which you want an editorconfig plugin for if you want it applied to every file.
merging into #213