-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
fzf integration as an alternative to telescope - closes #701 #702
Conversation
ec3089c
to
b916d66
Compare
lThanks for sending this in @ornicar! However, I wonder if it's even needed. A while back I added the require("metals").commands() which will actually give you all of the commands metals knows about (minus the ones that are nvim-metals specific). A quick glance at the |
You're right! I overlooked that. I'll close the PR then, let's not add unnecessary code. It was a good learning experience for me nonetheless 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ornicar !
:lua require("metals").fzf_menu() | ||
< | ||
|
||
NOTE: If you'd rather utilize |vim.ui.select| for this, a more generic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhh I see what I wrote before you probably know since you touched this.
end | ||
|
||
return function(opts) | ||
opts = opts or {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see one looking through the docs, but I wish there was a way to also include the description that would be shown but not considered when you search. Either way, maybe an improvement for later on if someone knows how to add that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only way I see is through a preview, as the fzf-lua menu entries are simple strings.
It seems to work. This is the most lua I have ever written, so it's probably all sorts of wrong.
For #701