refractalize / oil-git-status.nvim

55 stars 6 forks source link

Failed to install with Packer #1

Closed korsmakolnikov closed 9 months ago

korsmakolnikov commented 9 months ago

Hi, I cannot install it with packer. Do you ever try?

refractalize commented 9 months ago

Hi @korsmakolnikov I've just updated the readme with setup instructions for packer, it seems to work for me. Can you try?

korsmakolnikov commented 9 months ago

Fixed!

Anyway, it does not work, maybe is conflicting with some autogroup of mine

Error detected while processing BufWriteCmd Autocommands for "oil://*":
Error executing lua callback: ...re/nvim/site/pack/packer/start/oil.nvim/lua/oil/init.lua:993: BufWriteCmd Autocommands for "oil://*"..BufWritePost Autocommands for "<buffer=8>": Vim(append)
:Error executing lua callback: .../packer/start/oil-git-status.nvim/lua/oil-git-status.lua:109: attempt to call field 'system' (a nil value)
stack traceback:
        .../packer/start/oil-git-status.nvim/lua/oil-git-status.lua:109: in function 'fn'
        .../packer/start/oil-git-status.nvim/lua/oil-git-status.lua:92: in function 'concurrent'
        .../packer/start/oil-git-status.nvim/lua/oil-git-status.lua:107: in function 'load_git_status'
        .../packer/start/oil-git-status.nvim/lua/oil-git-status.lua:165: in function <.../packer/start/oil-git-status.nvim/lua/oil-git-status.lua:164>
        [C]: in function 'doautocmd'
        ...re/nvim/site/pack/packer/start/oil.nvim/lua/oil/init.lua:993: in function <...re/nvim/site/pack/packer/start/oil.nvim/lua/oil/init.lua:970>
stack traceback:
        [C]: in function 'doautocmd'
        ...re/nvim/site/pack/packer/start/oil.nvim/lua/oil/init.lua:993: in function <...re/nvim/site/pack/packer/start/oil.nvim/lua/oil/init.lua:970>
refractalize commented 9 months ago

Looks like vim.system() is a v0.10 feature... I'll fix shortly

refractalize commented 9 months ago

@korsmakolnikov this should be fixed in latest :+1:.

korsmakolnikov commented 9 months ago

Sorry for the late. I'll try immediately

korsmakolnikov commented 9 months ago

Ok, it works but. I've installed it, no errors, but also no signs of life. Icons appear neither in the standard window nor in the float.

refractalize commented 9 months ago

Have you set signcolumn=yes:2?:

require("oil").setup({
  win_options = {
    signcolumn = "yes:2",
  },
})

Any messages or notifications? Could you share a screenshot?

korsmakolnikov commented 9 months ago

This is the actual configuration. I have no clues on startup. All seems working.

require('oil').setup({
  default_file_explorer = true,
  delete_to_trash = true,
  columns = {
    "icon",
  },
  win_options = {
    signcolumn = "yes:2",
  },
  view_options = {
    -- Show files and directories that start with "."
    show_hidden = true,
  },
  float = {
    padding = 10,
  }
})

require('oil-git-status').setup({
  show_ignored = true -- show files that match gitignore with !!
})

image you see init.lua has ben changed here but no icons

refractalize commented 9 months ago

Ok - a few more questions:

  1. Which version of vim are you running?
  2. Which version of git?
  3. Can you run this in vim :!git -c status.relativePaths=true st . --short and show the results?
refractalize commented 9 months ago

Actually i think i've just spotted the issue and fixed. Can you try again?

korsmakolnikov commented 9 months ago

It works. It was that issue for sure. Thank you very much!

refractalize commented 9 months ago

Thanks for your help @korsmakolnikov