ParthJadhav / Verve

Verve is a lightweight and blazingly fast launcher for accessing and opening applications, files and documents. ⚡
GNU Affero General Public License v3.0
658 stars 25 forks source link

Display Paths from parent git repository in full search #40

Open ParthJadhav opened 1 year ago

ParthJadhav commented 1 year ago

currently only 2 parent folders are displayed: fileParentDir/fileDir/fileName. This is better but for files that are nested deeper, e.g. app/pages/page1/components/index.ts This pattern might have lots of folder named components and lots of files named index.ts. In cases like this there are 2 solutions:

  1. Always display the absoute path from the home directory
  2. Display the absolute path from the git repository root.

Both options are fine but probably option 2 is better. In cases where the total path name is very long, we should truncate the final output to not clutter the UI. E.g.:

some-project/app/pages/feature/componets/edit/state.ts

could become

some-project/.../components/edit/state.ts

otherwise depending on how deeply nested the file is, the full file path might not fit in the results view because it is too wide.

Originally posted by @benediktms in https://github.com/ParthJadhav/Verve/issues/38#issuecomment-1387359465