Open jorismak opened 4 months ago
Hi, @jorismak
Please, send example from your composer.json
for debug.
Attached.
I also forked your repo and started hacking, but for me, it was a learning experience in Lua :).
I used a JSON parser to get to the psr-4 block and left the rest to your code. (And I removed the final keyword from the class, but that's just my preference). https://github.com/jorismak/php.easy.nvim/blob/main/lua/php-easy-nvim/any/entities/object.lua#L19
you can make pull request, if you want
When trying out the init functions (which I miss the most from other environments), I noticed the initial namespace was wrong. (
src
used for the directory instead ofApp
as in composer.json).When diving in the source, I'm happy to see there is actually a bit of PSR-4 support for this!
But... it matches the psr-4 lines literally, including spaces.
My composer.json is indented differently (and I didn't touch it up manually or something).
Is it possible to use a regex for this to ignore the amount of whitespace on a line? (Me not knowing anything about lua).