Open thawk opened 3 years ago
We can report that information, but it would be a big change. Also, the paths would not take symlinks into account because of Vim limitations.
What are you using the property for? Maybe there is a different way to solve your problem. An EditorConfig plug-in hook is not always the best choice.
I want to implement the c_include_path
property for C/C++ files.
In a large project, there're tens of modules, and tens of paths to search header files in. I want to:
&path
, so I can easily use gf
to open header files.Because some modules can be reused in difference project, placed into difference directory, it's better to config c_include_path
in module specified .editorconfig
file. So it's not enough to know the location of root .editorconfig file.
c_include_path
is a language specified property, and not a standard property, I don't know whether it's suitable to put in plugin. I think we can have an API to use the property name to lookup .editorconfig
file path should be enough to implement it with hook, and it doesn't break the old API. It's better if we have more common way to solve the problem, as I'm wondering maybe similar property is need for other language.
I want to implement
c_include_path
property from my hook. Since I don't know the exactly directory everybody checkouts the project, so the path in.editorconfig
can only be relative paths. And since editorconfig may be nested, the relative path should be relative to the exactily.editorconfig
file which defines the property. By now, we can only get property value ofc_include_path
, can translates it into absolute path. So I think it's neccesary to let the hooks know which file the property is defined.