Pure-D / serve-d

D LSP server (dlang language server protocol server)
MIT License
208 stars 49 forks source link

dfmt does not use .editorconfig when used with serve-d #108

Closed qwertzui11 closed 1 year ago

qwertzui11 commented 3 years ago

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:

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!

qwertzui11 commented 3 years ago

I should also mention that restarted the editors multiple times, after I changed the .editorconfig.

WebFreak001 commented 3 years ago

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.

WebFreak001 commented 1 year ago

merging into #213