Skip to content

hijack_netrw not working #413

@incrypto32

Description

@incrypto32

Description

In my setup when i do something like nvim . to open nvim in current directory it opens up netrw not the telescope file browser. How do i fix this?

Though the keymaps work like expected and opens up the file browser, so the config is being loaded but just the hijacking netrw is not working. What am i doing wrong?

  "nvim-telescope/telescope.nvim",
  dependencies = {
    "nvim-lua/plenary.nvim",
    "nvim-telescope/telescope-file-browser.nvim"
  },

  config = function()
    require("telescope").setup({
      extensions = {
        file_browser = {
          hijack_netrw = true
        }
      }
    })
    require("telescope").load_extension("file_browser")
  end,


  keys = {
    -- Telescope specific
    { "<leader>ff", "<cmd>Telescope find_files<cr>",           desc = "Find Files" },
    { "<leader>fg", "<cmd>Telescope live_grep<cr>",            desc = "Live Grep" },
    { "<leader>fb", "<cmd>Telescope file_browser<cr>",         desc = "File Browser" },

    -- LSP + utility (command-style)
    { "gd",         "<cmd>Telescope lsp_definitions<cr>",      desc = "Go to definition" },
    { "gr",         "<cmd>Telescope lsp_references<cr>",       desc = "Go to references" },
    { "gi",         "<cmd>Telescope lsp_implementations<cr>",  desc = "Go to implementation" },
    { "gy",         "<cmd>Telescope lsp_type_definitions<cr>", desc = "Go to type definition" },
    { "<leader>km", "<cmd>Telescope keymaps<cr>",              desc = "Show all keymaps" },

  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions