SpartanJ / ecode

Lightweight multi-platform code editor designed for modern hardware with a focus on responsiveness and performance.
MIT License
941 stars 13 forks source link

[SUGGESTION] $FILEPATH etc. in LSP Client #284

Closed NullPlane closed 4 months ago

NullPlane commented 5 months ago

For jdtls specifically they do not enforce but kindly ask to have a project-respective dir in your current working dir or elsewhere. I think some vars in there may be helpful to some LSPs but maybe there are already such and I just did not find them.

SpartanJ commented 5 months ago

For the moment we only use $FILENAME which is actually the file path and not the name 😅, I guess I can add $PROJECTPATH, I cannot think any other though. I don't like I used $ALLCAPS, I might add the alternative that we use for the build system, they look like: ${project_root}.

NullPlane commented 5 months ago

Ya I actually meant that. The problem is that some lsps want to store data in a given path individual to the project itself and it would be nice to have some kind of way to tell whether there is a single file opened or a folder as a project etc.

SpartanJ commented 5 months ago

Added ${project_root} (or $PROJECTPATH) as keywords for commands in LSP, Formatter and Linter.