NeogitOrg / neogit

An interactive and powerful Git interface for Neovim, inspired by Magit
MIT License
4.03k stars 239 forks source link

Can't stage file.. #200

Closed kiuKisas closed 3 years ago

kiuKisas commented 3 years ago

When I press s on a untracked files or unstaged chagnes, I got:

E21: Cannot make chagnes, 'modifiable' is off

Did I miss something ? Staging all the files with S work though..

TimUntersberger commented 3 years ago

What other plugins are you using?

kiuKisas commented 3 years ago

here is my plugins.lua:

----------
-- Plugins
----------
vim.cmd 'packadd paq-nvim'               -- load the package manager
local paq = require('paq-nvim').paq  -- a convenient alias

paq {'savq/paq-nvim', opt = true}    -- paq-nvim manages itself

-- Theme
paq 'folke/tokyonight.nvim' -- colorscheme
-- paq 'akinsho/nvim-bufferline.lua' -- tabs
 paq 'karb94/neoscroll.nvim' -- smooth scrolling
-- paq {'glepnir/galaxyline.nvim', branch='main'} -- status line
paq 'hoob3rt/lualine.nvim'
paq 'lukas-reineke/indent-blankline.nvim'

-- Notify
paq 'rcarriga/nvim-notify'

-- LSP
paq 'neovim/nvim-lspconfig'
paq 'onsails/lspkind-nvim' -- nice icons
paq 'kabouzeid/nvim-lspinstall' -- LSP Server Installer
paq 'alexaandru/nvim-lspupdate' -- LSP Updater
paq 'folke/lsp-trouble.nvim' -- lSP help and resume
paq 'glepnir/lspsaga.nvim' -- LSP in nice UI
paq 'ray-x/lsp_signature.nvim' -- Show LSP signature as I type

-- Reference
paq 'simrat39/symbols-outline.nvim' -- LSP Symbol management

-- Treesitter
paq {'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' }

-- Telescope
paq 'nvim-lua/popup.nvim'
paq 'nvim-lua/plenary.nvim'
paq 'nvim-telescope/telescope.nvim'
paq 'nvim-telescope/telescope-fzy-native.nvim'

-- Debugging
paq 'mfussenegger/nvim-dap'

-- Autocomplete
paq 'hrsh7th/nvim-compe'

-- Snippets
paq 'honza/vim-snippets'
paq 'SirVer/ultisnips'
paq 'hrsh7th/vim-vsnip'
paq 'rafamadriz/friendly-snippets'
paq 'fivethree-team/vscode-svelte-snippets' -- Svelte

-- Explorer
paq 'kyazdani42/nvim-web-devicons'
paq 'kyazdani42/nvim-tree.lua'

-- Git
paq 'lewis6991/gitsigns.nvim'
paq 'tpope/vim-fugitive'
paq 'TimUntersberger/neogit'
paq 'sindrets/diffview.nvim'

-- TOdo Comments
paq 'folke/todo-comments.nvim'

-- Terminal
paq 'akinsho/nvim-toggleterm.lua'

-- autopairs, sandwiches
paq 'windwp/nvim-autopairs' -- (), {}, []
paq 'machakann/vim-sandwich'
paq 'windwp/nvim-ts-autotag' -- html/xml

-- Match-up - extended matchit
paq 'andymass/vim-matchup'

-- Colorized
paq 'norcalli/nvim-colorizer.lua'
--
-- Languages specifif
--

-- Go
paq {'ray-x/go.nvim'}

-- R
paq {'jalvesaq/Nvim-R', branch = 'stable'}

-- Rescript
paq 'rescript-lang/vim-rescript'
paq 'nkrkv/nvim-treesitter-rescript'

I try to disable vim-sandwich as it seems to be the one that trigger s key, with no luck..

TimUntersberger commented 3 years ago

That is a hard one. Does this also occur for you when you only have neogit installed?

abusch commented 3 years ago

I have the exact same problem... I'll see if I can track down which other plugin might be causing this.

abusch commented 3 years ago

Yeah, ok, so I blindly copied the example config from the README like a moron, which includes this 🤦‍♂️:

  mappings = {
    -- modify status buffer mappings
    status = {
      -- Adds a mapping with "B" as key that does the "BranchPopup" command
      ["B"] = "BranchPopup",
      -- Removes the default mapping of "s"
      ["s"] = "",
    }
  }
TimUntersberger commented 3 years ago

@kiuKisas do you have the same problem as @abusch ?

kiuKisas commented 3 years ago

ho.. yes, it was the same problem.. oopsy ^^'