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

Updated Readme #367

Merged
merged 5 commits into from Mar 24, 2024
Merged

Updated Readme #367

merged 5 commits into from Mar 24, 2024

Conversation

Catacomba
Copy link
Contributor

Added a concrete example of the alternative approach via lua.

README.md Outdated
@@ -182,7 +182,13 @@ vim.api.nvim_set_keymap(
)
```

Alternatively, you can also access the picker as a function via `require "telescope".extensions.file_browser.file_browser` natively in lua.
Alternatively, you can also access the picker as a function via `require "telescope".extensions.file_browser.file_browser()` natively in lua as follows:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe while we're at it, we can standardize the rest of this keymap section to use vim.keymap.set and put it all under one codeblock.

vim.keymap.set("n", "<space>fb", ":Telescope file_browser<CR>")

-- open file_browser with the path of the current buffer
vim.keymap.set("n", "<space>fb", ":Telescope file_browser path=%:p:h select_buffer=true<CR>")

-- Alternatively, using lua API
vim.keymap.set("n", "<space>fb", function()
	require("telescope").extensions.file_browser.file_browser()
end)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've standardized keymaps as you requested

@jamestrew
Copy link
Collaborator

Thanks!

@jamestrew jamestrew merged commit 5ee5002 into nvim-telescope:master Mar 24, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants