Open cemoktra opened 4 weeks ago
Do you have an .editorconfig
in that repo?
no
Do you have the "Proto" extension installed?
Is the file being identified as a Proto
language file and setting the Language mode appropriately?
What do you mean when you say "language server is not running" (e.g. is the extension uninstalled? Or...). Is there a setting you can change which causes indent to work properly (e.g. running the language server)?
Yes i have the proto extension installed. It used to work without installing/running the proto language server manually. But not i saw that in the logs zed was complaining about not finding language server
I updated to newest version today. The problem still exists. Additionally when i misformat the file and select formatting, it won't fix it. It does not produce any trace/log messages.
I'm using language server protols
Protols uses clang-format under the hood. Can you confirm you have clang-format
installed?
I couldn't actually get protols working at all, so as a workaround I am invoking clang-format
directly and it works for me:
"Proto": {
"tab_size": 4,
"formatter": {
"external": {
"command": "clang-format",
"arguments": ["-style={IndentWidth: 4, ColumnLimit: 0}"]
}
}
},
Alternatively, you can create a .clang-format
with your clang-format style options instead of providing them as CLI arguments.
Oh yeah then it formats, but not in the way the CI likes it. Our CI uses https://buf.build/ and i'm not able to configure it as external formatter, also it is very slow and times out.
What kind of of protobuf language server do you use? i had problems using lasorda/protobuf-language-server
Ok, well i think i found a ocompatible clang-format config. Anyway it used to work and suddenly stopped working without messing with the config
Our CI uses https://buf.build/ and i'm not able to configure it as external formatter, also it is very slow and times out.
buf format
does not support formatting handling single files via stdin yet.
There is an upstream issue here:
Ok, well i think i found a ocompatible clang-format config.
Could you paste your buf
compatible .clange-format
? I would love to include that it in the docs until the above support is added to buf.
"-style={IndentWidth: 2, ColumnLimit: 0, Language: Proto, BasedOnStyle: Google}"
, at least for now it did not create any differences
Check for existing issues
Describe the bug / provide steps to reproduce it
The following configuration is ignored in latest version when language server is not running:
Environment
Zed: v0.159.5 (Zed) OS: Linux X11 ubuntu 24.04 Memory: 31.1 GiB Architecture: x86_64 GPU: Intel(R) UHD Graphics (TGL GT1) || Intel open-source Mesa driver || Mesa 24.0.9-0ubuntu0.2
If applicable, add mockups / screenshots to help explain present your vision of the feature
Pressing tab adds 4 spaces despite 2 being configured
If applicable, attach your Zed.log file to this issue.
Zed.log