mirror of
				https://github.com/WarrenHood/dotfiles.git
				synced 2025-11-04 07:58:41 +00:00 
			
		
		
		
	Add which key and ToggleTerm
This commit is contained in:
		
							parent
							
								
									bc7e0a5247
								
							
						
					
					
						commit
						cf4ebea204
					
				| 
						 | 
					@ -1,13 +1,13 @@
 | 
				
			||||||
-- Ensure packer in installed
 | 
					-- Ensure packer in installed
 | 
				
			||||||
local ensure_packer = function()
 | 
					local ensure_packer = function()
 | 
				
			||||||
	local fn = vim.fn
 | 
					    local fn = vim.fn
 | 
				
			||||||
	local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
 | 
					    local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
 | 
				
			||||||
	if fn.empty(fn.glob(install_path)) > 0 then
 | 
					    if fn.empty(fn.glob(install_path)) > 0 then
 | 
				
			||||||
		fn.system({ "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path })
 | 
					        fn.system({ "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path })
 | 
				
			||||||
		vim.cmd([[packadd packer.nvim]])
 | 
					        vim.cmd([[packadd packer.nvim]])
 | 
				
			||||||
		return true
 | 
					        return true
 | 
				
			||||||
	end
 | 
					    end
 | 
				
			||||||
	return false
 | 
					    return false
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
local packer_bootstrap = ensure_packer()
 | 
					local packer_bootstrap = ensure_packer()
 | 
				
			||||||
| 
						 | 
					@ -17,51 +17,63 @@ local packer_bootstrap = ensure_packer()
 | 
				
			||||||
local use = require("packer").use
 | 
					local use = require("packer").use
 | 
				
			||||||
 | 
					
 | 
				
			||||||
require("packer").startup(function()
 | 
					require("packer").startup(function()
 | 
				
			||||||
	-- Packer package manager
 | 
					    -- Packer package manager
 | 
				
			||||||
	use("wbthomason/packer.nvim")
 | 
					    use("wbthomason/packer.nvim")
 | 
				
			||||||
	
 | 
					 | 
				
			||||||
	-- OneDark color scheme
 | 
					 | 
				
			||||||
	use("navarasu/onedark.nvim")
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	-- LSP Stuff
 | 
					    -- OneDark color scheme
 | 
				
			||||||
	use({
 | 
					    use("navarasu/onedark.nvim")
 | 
				
			||||||
		"williamboman/mason.nvim",
 | 
					 | 
				
			||||||
		"williamboman/mason-lspconfig.nvim",
 | 
					 | 
				
			||||||
		"neovim/nvim-lspconfig",
 | 
					 | 
				
			||||||
	})
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	-- Autocomplete
 | 
					    -- LSP Stuff
 | 
				
			||||||
	use("hrsh7th/cmp-nvim-lsp")
 | 
					    use({
 | 
				
			||||||
	use("hrsh7th/cmp-buffer")
 | 
					        "williamboman/mason.nvim",
 | 
				
			||||||
	use("hrsh7th/cmp-path")
 | 
					        "williamboman/mason-lspconfig.nvim",
 | 
				
			||||||
	use("hrsh7th/cmp-cmdline")
 | 
					        "neovim/nvim-lspconfig",
 | 
				
			||||||
	use("hrsh7th/nvim-cmp")
 | 
					    })
 | 
				
			||||||
	use("hrsh7th/cmp-vsnip")
 | 
					 | 
				
			||||||
	use("hrsh7th/vim-vsnip")
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	-- Treesitter
 | 
					    -- Autocomplete
 | 
				
			||||||
	use("nvim-treesitter/nvim-treesitter")
 | 
					    use("hrsh7th/cmp-nvim-lsp")
 | 
				
			||||||
 | 
					    use("hrsh7th/cmp-buffer")
 | 
				
			||||||
 | 
					    use("hrsh7th/cmp-path")
 | 
				
			||||||
 | 
					    use("hrsh7th/cmp-cmdline")
 | 
				
			||||||
 | 
					    use("hrsh7th/nvim-cmp")
 | 
				
			||||||
 | 
					    use("hrsh7th/cmp-vsnip")
 | 
				
			||||||
 | 
					    use("hrsh7th/vim-vsnip")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    -- Treesitter
 | 
				
			||||||
 | 
					    use("nvim-treesitter/nvim-treesitter")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	-- Telescope
 | 
					    -- Telescope
 | 
				
			||||||
	use {
 | 
					    use {
 | 
				
			||||||
		'nvim-telescope/telescope.nvim', tag = '0.1.0',
 | 
					        'nvim-telescope/telescope.nvim', tag = '0.1.0',
 | 
				
			||||||
		requires = { { 'nvim-lua/plenary.nvim' } }
 | 
					        requires = { { 'nvim-lua/plenary.nvim' } }
 | 
				
			||||||
	}
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	-- nvim-tree (File Explorer)
 | 
					    -- nvim-tree (File Explorer)
 | 
				
			||||||
	use {
 | 
					    use {
 | 
				
			||||||
  'nvim-tree/nvim-tree.lua',
 | 
					        'nvim-tree/nvim-tree.lua',
 | 
				
			||||||
  requires = {
 | 
					        requires = {
 | 
				
			||||||
    'nvim-tree/nvim-web-devicons', -- file icons
 | 
					            'nvim-tree/nvim-web-devicons', -- file icons
 | 
				
			||||||
  },
 | 
					        },
 | 
				
			||||||
  tag = 'nightly'
 | 
					        tag = 'nightly'
 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	-- Automatically set up configuration after cloning packer.nvim
 | 
					    }
 | 
				
			||||||
	if packer_bootstrap then
 | 
					
 | 
				
			||||||
		require("packer").sync()
 | 
					    -- ToggleTerm
 | 
				
			||||||
	end
 | 
					    use { "akinsho/toggleterm.nvim", tag = '*', config = function()
 | 
				
			||||||
 | 
					        require("toggleterm").setup()
 | 
				
			||||||
 | 
					    end }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    -- Which key for command suggestions
 | 
				
			||||||
 | 
					    use {
 | 
				
			||||||
 | 
					        "folke/which-key.nvim",
 | 
				
			||||||
 | 
					        config = function()
 | 
				
			||||||
 | 
					            require("which-key").setup()
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    -- Automatically set up configuration after cloning packer.nvim
 | 
				
			||||||
 | 
					    if packer_bootstrap then
 | 
				
			||||||
 | 
					        require("packer").sync()
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
end)
 | 
					end)
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -32,3 +32,7 @@ g.mapleader = " "
 | 
				
			||||||
-- Disable netrw
 | 
					-- Disable netrw
 | 
				
			||||||
g.loaded_netrw = 1
 | 
					g.loaded_netrw = 1
 | 
				
			||||||
g.loaded_netrwPlugin = 1
 | 
					g.loaded_netrwPlugin = 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- Timeout length (Time in milliseconds to wait for a mapped sequence to complete.)
 | 
				
			||||||
 | 
					o.timeoutlen = 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue