vscode-proto3 icon indicating copy to clipboard operation
vscode-proto3 copied to clipboard

clang-format.style is shown as unknown configuration setting

Open smnbbrv opened this issue 5 years ago • 5 comments
trafficstars

Hi, thanks for your plugin! I use it every day.

There is a small issue with settings: clang-format.style is not recognized by the vscode.

image

I assume some registration of plugin configuration is required...

smnbbrv avatar Sep 11 '20 12:09 smnbbrv

I can not reproduce this on my macBook :(

zxh0 avatar Sep 12 '20 03:09 zxh0

should you be passing in valid json instead of a string? eg remove the quotes around {} ?

hamidzr avatar Oct 02 '20 20:10 hamidzr

That's the only way I made it work at the moment I was trying... just did not work as object

smnbbrv avatar Oct 02 '20 20:10 smnbbrv

@zxh0 looks like I found the reason.

Today with new vscode formatting got completely broken and I searched for what's missing and found out that Clang-Format plugin was not installed in my VSCode.

After installation, this issue gets resolved. However, this is weird because now I need to enable the formatter from Clang-Format with the following:

  "[proto3]": {
        "editor.defaultFormatter": "xaver.clang-format"
    },

which actually gives another warning

Value is not accepted. Valid values: null, "vscode.configuration-editing", ..., "zxh404.vscode-proto3".

but properly formats the files.

After VSCode restart the warning is gone. So, all fine

What is unclear to me is:

  • if this plugin depends on the Clang-Format, why isn't it automatically installed
  • if this plugin depends on the Clang-Format, why it also offers the second formatter
  • if it does not depend on Clang-Format plugin, well, then it's unclear why it is referred in the docs as a solution :)

With the latter I mean this

image

smnbbrv avatar Oct 14 '20 19:10 smnbbrv

Just posted a comment in https://github.com/zxh0/vscode-proto3/pull/39#issuecomment-729070753. I cannot make the formatting work either and I am not sure what I am missing.

xh3b4sd avatar Nov 17 '20 17:11 xh3b4sd