Giter VIP home page Giter VIP logo

Comments (4)

fdschmidt93 avatar fdschmidt93 commented on May 27, 2024

The relevant segment to look at would be here:

on_input_filter_cb = function(prompt)
if prompt:sub(-1, -1) == os_sep then
local prompt_bufnr = vim.api.nvim_get_current_buf()
if vim.bo[prompt_bufnr].filetype == "TelescopePrompt" then
local current_picker = action_state.get_current_picker(prompt_bufnr)
if current_picker.finder.files then
fb_actions.toggle_browser(prompt_bufnr, { reset_prompt = true })
current_picker:set_prompt(prompt:sub(1, -2))
end
end
end
end,

which goes to show that there already is an input callback to trigger the folder browser.

similarly, if the user types / the cwd is changed to root

Your approach to input callbacks conflicts with the currently undocumented default that / triggers the folder browser right now. Note that there is also an action (only merged just now :) for this in <C-w>/w

if the user types ~/, the cwd is changed to ${HOME}

I think that's an interesting idea.

What do you think of making these available as input callbacks only in folder browser mode? I'm not sure, I kind of have to think about what the most ergonomic approach here is.

from telescope-file-browser.nvim.

steve-lorimer avatar steve-lorimer commented on May 27, 2024

Thanks for creating this issue!

Let me play around with the current functionality and I'll come back with some comments

from telescope-file-browser.nvim.

steve-lorimer avatar steve-lorimer commented on May 27, 2024

I've created a PR here - marked as draft so you can comment on the approach I took

It takes effect in both file and folder browser mode.

As a consequence I removed the / toggle to folder browser mode. Since it's already available in C-f I thought it would be acceptable?

from telescope-file-browser.nvim.

fdschmidt93 avatar fdschmidt93 commented on May 27, 2024

Closing this as we've since agreed this should rather be a config recipe than global default.

from telescope-file-browser.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.