Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: show paths relative to lsp root #330

Open
1 task done
fent opened this issue Aug 26, 2023 · 0 comments
Open
1 task done

feature: show paths relative to lsp root #330

fent opened this issue Aug 26, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@fent
Copy link

fent commented Aug 26, 2023

Did you check the docs?

  • I have read all the trouble.nvim docs

Is your feature request related to a problem? Please describe.

when opening nvim from outside project folders, it would be useful if the paths shown in the Trouble window would be relative to the lsp root. for example, below i opened nvim from just outside of dotfiles/, a git repo

image

Describe the solution you'd like

i would like the path to remove dotfiles/ since it's a git repo and my lsp root is dotfiles/. i can see how others may prefer showing a relative path to the pwd, which is what Trouble current does. so maybe this can be an option?

Describe alternatives you've considered

a path_display option as a function for further customization like telescope.nvim has

path_display = function(_, path)
  local tail = require("telescope.utils").path_tail(path)
  return string.format("%s (%s)", tail, path)
end

Additional context

i work in a large codebase with many projects and subprojects. i often open nvim from any directory

@fent fent added the enhancement New feature or request label Aug 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant