Skip to content

Commit

Permalink
document fzf-lua menu
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Dec 15, 2024
1 parent 1a37439 commit b916d66
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 deletions.
9 changes: 4 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,10 @@ Please read the docs over there if you are every working on debugging related
stuff with as they are pretty thorough and insightful. Mathias does a great job
at making sure his stuff is stable and documented.

The metals commands are also available as a
[telescope](https://github.com/nvim-telescope/telescope.nvim) extension. The
code for this is pretty self contained and can be found in
`https://github.com/scalameta/nvim-metals/tree/main/lua/telescope/_extensions`.

The metals commands are also available as
[extensions](https://github.com/scalameta/nvim-metals/tree/main/lua/telescope/_extensions)
for [telescope](https://github.com/nvim-telescope/telescope.nvim)
and [fzf-lua](https://github.com/ibhagwan/fzf-lua).

## Logging

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ To see the full details on the available configurations, checkout out `:help
metals-integrations`. The currently available integrations are:
- [nvim-dap](https://github.com/mfussenegger/nvim-dap)
- [Telescope](https://github.com/nvim-telescope/telescope.nvim)

- [fzf-lua](https://github.com/ibhagwan/fzf-lua)

[^no-lspconfig]: If you're familiar with nvim and LSP you'll probably know of
[`nvim-lspconfig`](https://github.com/neovim/nvim-lspconfig) which also has a
Expand Down
23 changes: 16 additions & 7 deletions doc/metals.txt
Original file line number Diff line number Diff line change
Expand Up @@ -865,11 +865,11 @@ commands() *commands()
utilizing |vim.ui.select()|. If you're a telescope
user you can choose to use this with something like
https://github.com/stevearc/dressing.nvim or feel
free to use the built-in telescope extension
|metals-telescope| which just displays things a bit
better since we have more control over using
|vim.ui.select()|. If you're not a telescope user,
then you'll want to use this.
free to use the built-in extensions
|metals-telescope| or |metals-fzf-lua| which just displays
things a bit better since we have more control over using
|vim.ui.select()|. If you're not a telescope or
fzf-lua user, then you'll want to use this.

*compile_cancel()*
compile_cancel() Use to execute a |metals.compile-cancel| command.
Expand Down Expand Up @@ -1370,7 +1370,7 @@ https://github.com/nvim-telescope/telescope.nvim which allows you to easily
choose any of the |metals-commands|. You can trigger the picker by using the
following function in a mapping: >
lua require("telescope").extensions.metals.commands()
:lua require("telescope").extensions.metals.commands()
<

If this is the only way you'll trigger the picker, then there is no need to
Expand All @@ -1387,8 +1387,17 @@ longer be lazy loaded. >
require("telescope").extensions.metals.commands()
<
*metals-fzf-lua*

NOTE: If you'd rather utilize |vim.ui.select| for this a more generate
Metals provides a custom picker from
https://github.com/ibhagwan/fzf-lua which allows you to easily
choose any of the |metals-commands|. You can trigger the picker by using the
following function in a mapping: >
:lua require("metals").fzf_menu()
<

NOTE: If you'd rather utilize |vim.ui.select| for this, a more generic
|commands()| is available in the |metals-lua-api|.

vim:tw=80:ts=2:ft=help:

0 comments on commit b916d66

Please sign in to comment.