Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I'm not that well versed in Lua, but the previous check if fname:sub(1, #item) == item didn't really work as expected and I was still experiencing high CPU usage when using the `go to definition` functionality. After adding some print statements for debugging, I noticed that only a few strings were removed from the base dir and thus the comparison was failing. Perhaps it might work differently in other operating systems, but my Linux machine it did not work correctly. I replaced this check with `util.path.is_descendant` which now works correctly, as well as added another path to check when git repositories are used as cargo dependencies.
- Loading branch information