Compare commits
	
		
			No commits in common. "df5be57d75a7b3c5e2444694d5f9ccc2ce214b8b" and "f21a29d247cae3c0f9b55332024eecaa9b50ec10" have entirely different histories.
		
	
	
		
			df5be57d75
			...
			f21a29d247
		
	
		
| 
						 | 
				
			
			@ -5,7 +5,3 @@ Here is my config of neovim.
 | 
			
		|||
## Usage
 | 
			
		||||
 | 
			
		||||
Just clone this repository into directory `~/.config/nvim/` and start neovim. [lazy.nvim](https://github.com/folke/lazy.nvim) will auto install itself and other plugins at startup.
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
git clone <url of this repo> ~/.config/nvim
 | 
			
		||||
```
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,16 +10,23 @@ return {
 | 
			
		|||
    {
 | 
			
		||||
        "karb94/neoscroll.nvim",
 | 
			
		||||
        main = "neoscroll",
 | 
			
		||||
        config = true,
 | 
			
		||||
        opts = { },
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "lukas-reineke/indent-blankline.nvim",
 | 
			
		||||
        main = "indent_blankline",
 | 
			
		||||
        config = true,
 | 
			
		||||
        opts = {
 | 
			
		||||
            show_current_context = true,
 | 
			
		||||
            show_current_context_start = true,
 | 
			
		||||
        },
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "lewis6991/gitsigns.nvim",
 | 
			
		||||
        main = "gitsigns",
 | 
			
		||||
        opts = { },
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "akinsho/bufferline.nvim",
 | 
			
		||||
        main = "bufferline",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,43 +0,0 @@
 | 
			
		|||
return {
 | 
			
		||||
    "lewis6991/gitsigns.nvim",
 | 
			
		||||
    main = "gitsigns",
 | 
			
		||||
    opts = {
 | 
			
		||||
        on_attach = function(bufnr)
 | 
			
		||||
            local gs = package.loaded.gitsigns
 | 
			
		||||
            local function m(mode, l, r, opts)
 | 
			
		||||
                opts = opts or {}
 | 
			
		||||
                opts.buffer = bufnr
 | 
			
		||||
                vim.keymap.set(mode, l, r, opts)
 | 
			
		||||
            end
 | 
			
		||||
 | 
			
		||||
            m("n", "]h", function()
 | 
			
		||||
                if vim.wo.diff then return "]c" end
 | 
			
		||||
                vim.schedule(function() gs.next_hunk() end)
 | 
			
		||||
                return "<Ignore>"
 | 
			
		||||
            end, {expr=true})
 | 
			
		||||
 | 
			
		||||
            m('n', '[h', function()
 | 
			
		||||
                if vim.wo.diff then return '[c' end
 | 
			
		||||
                vim.schedule(function() gs.prev_hunk() end)
 | 
			
		||||
                return '<Ignore>'
 | 
			
		||||
            end, {expr=true})
 | 
			
		||||
 | 
			
		||||
            m('n', '<leader>hs', gs.stage_hunk)
 | 
			
		||||
            m('n', '<leader>hr', gs.reset_hunk)
 | 
			
		||||
            m('v', '<leader>hs', function() gs.stage_hunk {vim.fn.line("."), vim.fn.line("v")} end)
 | 
			
		||||
            m('v', '<leader>hr', function() gs.reset_hunk {vim.fn.line("."), vim.fn.line("v")} end)
 | 
			
		||||
            m('n', '<leader>hS', gs.stage_buffer)
 | 
			
		||||
            m('n', '<leader>hu', gs.undo_stage_hunk)
 | 
			
		||||
            m('n', '<leader>hR', gs.reset_buffer)
 | 
			
		||||
            m('n', '<leader>hp', gs.preview_hunk)
 | 
			
		||||
            m('n', '<leader>hb', function() gs.blame_line{full=true} end)
 | 
			
		||||
            m('n', '<leader>tb', gs.toggle_current_line_blame)
 | 
			
		||||
            m('n', '<leader>hd', gs.diffthis)
 | 
			
		||||
            m('n', '<leader>hD', function() gs.diffthis('~') end)
 | 
			
		||||
            m('n', '<leader>td', gs.toggle_deleted)
 | 
			
		||||
        end,
 | 
			
		||||
    },
 | 
			
		||||
    config = function (lazyplug, opts)
 | 
			
		||||
        require(lazyplug.main).setup(opts)
 | 
			
		||||
    end,
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,6 +1,7 @@
 | 
			
		|||
return {
 | 
			
		||||
    "nvim-treesitter/nvim-treesitter",
 | 
			
		||||
    main = "nvim-treesitter.configs",
 | 
			
		||||
    config = true,
 | 
			
		||||
    build =  ":TSUpdate",
 | 
			
		||||
    opts = {
 | 
			
		||||
        indent = { enable = true },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue