formatting changes for vim config,
added nvimdiff as default difftool for git.
This commit is contained in:
		
							parent
							
								
									18eb063667
								
							
						
					
					
						commit
						8a08599322
					
				
					 2 changed files with 360 additions and 320 deletions
				
			
		| 
						 | 
				
			
			@ -8,3 +8,9 @@
 | 
			
		|||
	defaultBranch = trunk
 | 
			
		||||
[push]
 | 
			
		||||
	autoSetupRemote = true
 | 
			
		||||
[difftool]
 | 
			
		||||
	prompt = false
 | 
			
		||||
[diff]
 | 
			
		||||
    tool = nvimdiff
 | 
			
		||||
[difftool "nvimdiff"]
 | 
			
		||||
    cmd = "nvim -d \"$LOCAL\" \"$REMOTE\""
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,11 +2,11 @@
 | 
			
		|||
local fn = vim.fn
 | 
			
		||||
local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
 | 
			
		||||
if fn.empty(fn.glob(install_path)) > 0 then
 | 
			
		||||
	Packer_Bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
 | 
			
		||||
	Packer_Bootstrap = fn.system({ 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim',
 | 
			
		||||
		install_path })
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
return require('packer').startup(function(use)
 | 
			
		||||
 | 
			
		||||
	--startup speed
 | 
			
		||||
	use 'lewis6991/impatient.nvim'
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -16,12 +16,38 @@ return require('packer').startup(function(use)
 | 
			
		|||
 | 
			
		||||
	use { 'nvim-treesitter/nvim-treesitter',
 | 
			
		||||
		run = ':TSUpdate',
 | 
			
		||||
		config=function() require('nvim-treesitter').setup{
 | 
			
		||||
			ensure_installed='maintained',
 | 
			
		||||
		config = function()
 | 
			
		||||
			require('nvim-treesitter').setup {
 | 
			
		||||
				ensure_installed = {
 | 
			
		||||
					'c',
 | 
			
		||||
					'lua',
 | 
			
		||||
					'vim',
 | 
			
		||||
					'vimdoc',
 | 
			
		||||
					'query',
 | 
			
		||||
					'bash',
 | 
			
		||||
					'comment',
 | 
			
		||||
					'cpp',
 | 
			
		||||
					'diff',
 | 
			
		||||
					'git_config',
 | 
			
		||||
					'git_rebase',
 | 
			
		||||
					'gitattributes',
 | 
			
		||||
					'gitcommit',
 | 
			
		||||
					'gitignore',
 | 
			
		||||
					'json',
 | 
			
		||||
					'jsonc',
 | 
			
		||||
					'latex',
 | 
			
		||||
					'make',
 | 
			
		||||
					'python',
 | 
			
		||||
					'regex',
 | 
			
		||||
					'rust',
 | 
			
		||||
					'toml',
 | 
			
		||||
				},
 | 
			
		||||
				auto_install = true,
 | 
			
		||||
				highlight = { enable = true },
 | 
			
		||||
				indent = { enable = true },
 | 
			
		||||
				incremental_selection = { enable = true }
 | 
			
		||||
		}end,
 | 
			
		||||
			}
 | 
			
		||||
		end,
 | 
			
		||||
	}
 | 
			
		||||
	use {
 | 
			
		||||
		{
 | 
			
		||||
| 
						 | 
				
			
			@ -125,13 +151,15 @@ return require('packer').startup(function(use)
 | 
			
		|||
		requires = {
 | 
			
		||||
			'kyazdani42/nvim-web-devicons', -- optional, for file icon
 | 
			
		||||
		},
 | 
			
		||||
		config = function() require'nvim-tree'.setup {
 | 
			
		||||
		config = function()
 | 
			
		||||
			require 'nvim-tree'.setup {
 | 
			
		||||
 | 
			
		||||
				on_attach = function(bufnr)
 | 
			
		||||
					local api = require('nvim-tree.api')
 | 
			
		||||
 | 
			
		||||
					local function opts(desc)
 | 
			
		||||
					return { desc = 'nvim-tree: ' .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
 | 
			
		||||
						return { desc = 'nvim-tree: ' .. desc, buffer = bufnr, noremap = true, silent = true,
 | 
			
		||||
							nowait = true }
 | 
			
		||||
					end
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -234,10 +262,10 @@ return require('packer').startup(function(use)
 | 
			
		|||
					vim.keymap.set('n', 'q', api.tree.close, opts('Close'))
 | 
			
		||||
					vim.keymap.set('n', 'g?', api.tree.toggle_help, opts('Help'))
 | 
			
		||||
					vim.keymap.set('n', 'W', api.tree.collapse_all, opts('Collapse'))
 | 
			
		||||
 | 
			
		||||
				end,
 | 
			
		||||
				-- on_attach = on_attach
 | 
			
		||||
		} end
 | 
			
		||||
			}
 | 
			
		||||
		end
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	--UI stuff
 | 
			
		||||
| 
						 | 
				
			
			@ -273,7 +301,8 @@ end
 | 
			
		|||
 | 
			
		||||
	use { 'nvim-lualine/lualine.nvim',
 | 
			
		||||
		requires = { 'kyazdani42/nvim-web-devicons', opt = true },
 | 
			
		||||
	config=function() require('lualine').setup{
 | 
			
		||||
		config = function()
 | 
			
		||||
			require('lualine').setup {
 | 
			
		||||
				options = {
 | 
			
		||||
					icons_enabled = true,
 | 
			
		||||
					theme = 'auto',
 | 
			
		||||
| 
						 | 
				
			
			@ -299,7 +328,8 @@ end
 | 
			
		|||
					lualine_z = {}
 | 
			
		||||
				},
 | 
			
		||||
				extensions = {}
 | 
			
		||||
	} end,
 | 
			
		||||
			}
 | 
			
		||||
		end,
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	use { 'kdheepak/tabline.nvim',
 | 
			
		||||
| 
						 | 
				
			
			@ -329,7 +359,8 @@ requires = { { 'hoob3rt/lualine.nvim', opt=true }, {'kyazdani42/nvim-web-devicon
 | 
			
		|||
 | 
			
		||||
	use { 'folke/trouble.nvim',
 | 
			
		||||
		requires = "kyazdani42/nvim-web-devicons",
 | 
			
		||||
	config = function() require("trouble").setup {
 | 
			
		||||
		config = function()
 | 
			
		||||
			require("trouble").setup {
 | 
			
		||||
				position = "bottom", -- position of the list can be: bottom, top, left, right
 | 
			
		||||
				height = 10,       -- height of the trouble list when position is top or bottom
 | 
			
		||||
				width = 50,        -- width of the list when position is left or right
 | 
			
		||||
| 
						 | 
				
			
			@ -339,7 +370,8 @@ requires = { { 'hoob3rt/lualine.nvim', opt=true }, {'kyazdani42/nvim-web-devicon
 | 
			
		|||
				fold_closed = "", -- icon used for closed folds
 | 
			
		||||
				group = true,      -- group results by file
 | 
			
		||||
				padding = true,    -- add an extra new line on top of the list
 | 
			
		||||
		action_keys = { -- key mappings for actions in the trouble list
 | 
			
		||||
				action_keys = {
 | 
			
		||||
				                   -- key mappings for actions in the trouble list
 | 
			
		||||
					-- map to {} to remove a mapping, for example:
 | 
			
		||||
					-- close = {},
 | 
			
		||||
					close = "q",          -- close the list
 | 
			
		||||
| 
						 | 
				
			
			@ -381,7 +413,8 @@ requires = { { 'hoob3rt/lualine.nvim', opt=true }, {'kyazdani42/nvim-web-devicon
 | 
			
		|||
 | 
			
		||||
	use { 'romgrk/nvim-treesitter-context',
 | 
			
		||||
		requires = 'nvim-treesitter/nvim-treesitter',
 | 
			
		||||
	config=function() require('treesitter-context').setup{
 | 
			
		||||
		config = function()
 | 
			
		||||
			require('treesitter-context').setup {
 | 
			
		||||
				enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
 | 
			
		||||
				max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
 | 
			
		||||
				trim_scope = 'outer', -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
 | 
			
		||||
| 
						 | 
				
			
			@ -391,7 +424,8 @@ requires = { { 'hoob3rt/lualine.nvim', opt=true }, {'kyazdani42/nvim-web-devicon
 | 
			
		|||
				-- Separator between context and content. Should be a single character string, like '-'.
 | 
			
		||||
				-- When separator is set, the context will only show up when there are at least 2 lines above cursorline.
 | 
			
		||||
				separator = nil,
 | 
			
		||||
	} end
 | 
			
		||||
			}
 | 
			
		||||
		end
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	use { 'lewis6991/gitsigns.nvim',
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue