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

lsp-xref: Add user-configurable control over expansion #8

Closed
jacobdufault opened this issue Dec 5, 2017 · 2 comments
Closed

lsp-xref: Add user-configurable control over expansion #8

jacobdufault opened this issue Dec 5, 2017 · 2 comments

Comments

@jacobdufault
Copy link

It'd be great if I could define a defun to control the auto-expansion for files in lsp-xref; ie, if there are only 20 refs, I want every file expanded, but if there are 300 refs I want files collapsed by default.

@sebastiencs
Copy link
Member

@jacobdufault Thanks for your feedback

What about a function that take a list as parameter, with each element is a cons with the filename and the number of references in that file.
The function should return a list of filename to expand.

@jacobdufault
Copy link
Author

sgtm

sebastiencs added a commit that referenced this issue Dec 6, 2017
Add the variable 'lsp-xref-expand-function' which take the value of a
function.
The function should returns a list of files to expand.
See the variable's docstring  for more info.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants