Skip to content

hijack_directories Not Respected When Not open_on_setup #1664

@alex-courtis

Description

@alex-courtis
Member

c5536db #1618 broke this behaviour.

See #1660 (reply in thread)

Activity

alex-courtis

alex-courtis commented on Oct 17, 2022

@alex-courtis
MemberAuthor

This is messy: the code and the configuration.

I'm tempted to add new configuration and deprecate the old:

on_start = {
    open = {
      always = false,
      directory = true,
      unnamed = false,
      empty = false,
      file = true,
      ignore_filetype = {
        "gitcommit"
      },
    },
    focus_tree = {
      always = true,
      unnamed = false,
      empty = false,
      file = false,
    },
  }

unnamed is a buffer with empty bufname().

empty is a buffer with a name but filereadable(bufname()) 0. Needs a better name.

The new configuration could go in an alternate nvim-tree.on_enter to be used if the user has specified on_start.

changed the title [-]hijack_directories Not Respected When Not `quit_on_open`[/-] [+]hijack_directories Not Respected When Not `open_on_setup`[/+] on Oct 17, 2022
added a commit that references this issue on Oct 17, 2022
added a commit that references this issue on Oct 17, 2022
alex-courtis

alex-courtis commented on Oct 18, 2022

@alex-courtis
MemberAuthor

Unfortunately this change has been reverted due to many regressions: #1668

A new mechanism to control startup behaviour is under way: #1669

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionExisting functionality broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @alex-courtis

      Issue actions

        hijack_directories Not Respected When Not `open_on_setup` · Issue #1664 · nvim-tree/nvim-tree.lua