cxw42 / toolconfig-core-py

ToolConfig core in Python
https://github.com/editorconfig/editorconfig/issues/482
Other
0 stars 0 forks source link

LSP Config #5

Closed benjamin-kirkbride closed 1 year ago

benjamin-kirkbride commented 1 year ago

Is configuring Language Servers in scope for toolconfig? If so, can I get an example of how that might look?

cxw42 commented 1 year ago

Toolconfig is use-case agnostic, restricted only by the fact that settings are determined per file path. Therefore, I don't see any reason why you couldn't configure a language server in a toolconfig file.

However, I have never actually used any language servers! Therefore, I cannot give an example. Do you have an example or link of the way it's currently done?

benjamin-kirkbride commented 1 year ago

Here is the documentation for it (including an example for EditorConfig, which is interesting): https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_configuration

I am not an expert on EditorConfig, nor LSP, but given that EditorConfig is called out by name and ToolConfig will not be a radical change in paradigm, seems like it should be possible?

cxw42 commented 1 year ago

Took a glance through it --- looks like workspace/configuration might be an arbitrary key-value store, in which case using TC as a backend would be no problem!

benjamin-kirkbride commented 1 year ago

Yes, that was my conclusion as well. Awesome!