Skip to content
Discussion options

You must be logged in to vote

You're right! It was something else in my config. I had assumed from reading the explorer documentation ("Choosing a directory navigates inside it, changing picker's items and current working directory") that this was normal behavior.

I have an autocommand that runs on BufReadPost with the goal of making buffer names relative:

vim.api.nvim_create_autocmd('BufReadPost', {
  pattern = '*',
  group = group,
  callback = function()
    vim.cmd('silent! lcd .')
    print("ran lcd")
  end,
  desc = "Make buffer's name a relative path",
})

That works fine with other pickers and with normal vim file open commands, but when using explorer that autocommand results in the global cwd being changed.

A…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@echasnovski
Comment options

Answer selected by echasnovski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested mini.extra
2 participants