Enable default plugins, add toggleterm, harpoon and lazygit
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
# kickstart.nvim
|
# kickstart.nvim
|
||||||
|
|
||||||
|
This fork of kickstart.nvim has a few plugins added and is used a general base though just cloning it will get you 90% of the way through most of your development in various languages.
|
||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
A starting point for Neovim that is:
|
A starting point for Neovim that is:
|
||||||
|
|||||||
19
init.lua
19
init.lua
@@ -91,7 +91,7 @@ vim.g.mapleader = ' '
|
|||||||
vim.g.maplocalleader = ' '
|
vim.g.maplocalleader = ' '
|
||||||
|
|
||||||
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
||||||
vim.g.have_nerd_font = false
|
vim.g.have_nerd_font = true
|
||||||
|
|
||||||
-- [[ Setting options ]]
|
-- [[ Setting options ]]
|
||||||
-- See `:help vim.opt`
|
-- See `:help vim.opt`
|
||||||
@@ -102,7 +102,7 @@ vim.g.have_nerd_font = false
|
|||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
-- You can also add relative line numbers, to help with jumping.
|
-- You can also add relative line numbers, to help with jumping.
|
||||||
-- Experiment for yourself to see if you like it!
|
-- Experiment for yourself to see if you like it!
|
||||||
-- vim.opt.relativenumber = true
|
vim.opt.relativenumber = true
|
||||||
|
|
||||||
-- Enable mouse mode, can be useful for resizing splits for example!
|
-- Enable mouse mode, can be useful for resizing splits for example!
|
||||||
vim.opt.mouse = 'a'
|
vim.opt.mouse = 'a'
|
||||||
@@ -928,18 +928,17 @@ require('lazy').setup({
|
|||||||
-- Here are some example plugins that I've included in the Kickstart repository.
|
-- Here are some example plugins that I've included in the Kickstart repository.
|
||||||
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
||||||
--
|
--
|
||||||
-- require 'kickstart.plugins.debug',
|
require 'kickstart.plugins.debug',
|
||||||
-- require 'kickstart.plugins.indent_line',
|
require 'kickstart.plugins.indent_line',
|
||||||
-- require 'kickstart.plugins.lint',
|
require 'kickstart.plugins.lint',
|
||||||
-- require 'kickstart.plugins.autopairs',
|
require 'kickstart.plugins.autopairs',
|
||||||
-- require 'kickstart.plugins.neo-tree',
|
require 'kickstart.plugins.neo-tree',
|
||||||
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
||||||
|
|
||||||
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
||||||
-- This is the easiest way to modularize your config.
|
-- This is the easiest way to modularize your config.
|
||||||
--
|
--
|
||||||
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
||||||
-- { import = 'custom.plugins' },
|
{ import = 'custom.plugins' },
|
||||||
--
|
--
|
||||||
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
|
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
|
||||||
-- Or use telescope!
|
-- Or use telescope!
|
||||||
|
|||||||
0
lua/custom/options.lua
Normal file
0
lua/custom/options.lua
Normal file
50
lua/custom/plugins/harpoon.lua
Normal file
50
lua/custom/plugins/harpoon.lua
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
return {
|
||||||
|
'ThePrimeagen/harpoon',
|
||||||
|
branch = 'harpoon2',
|
||||||
|
requires = { { 'nvim-lua/plenary.nvim' } },
|
||||||
|
config = function()
|
||||||
|
local harpoon = require 'harpoon'
|
||||||
|
harpoon:setup()
|
||||||
|
-- Harpoon remaps
|
||||||
|
vim.keymap.set('n', '<leader>bm', function()
|
||||||
|
harpoon:list():append()
|
||||||
|
end, { desc = 'Add buffer to Harpoon list' })
|
||||||
|
vim.keymap.set('n', '<C-e>', function()
|
||||||
|
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||||
|
end)
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<C-h>', function()
|
||||||
|
harpoon:list():select(1)
|
||||||
|
end)
|
||||||
|
vim.keymap.set('n', '<C-t>', function()
|
||||||
|
harpoon:list():select(2)
|
||||||
|
end)
|
||||||
|
vim.keymap.set('n', '<C-s>', function()
|
||||||
|
harpoon:list():select(3)
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- Toggle previous & next buffers stored within Harpoon list
|
||||||
|
vim.keymap.set('n', '<C-S-P>', function()
|
||||||
|
harpoon:list():prev()
|
||||||
|
end)
|
||||||
|
vim.keymap.set('n', '<C-S-N>', function()
|
||||||
|
harpoon:list():next()
|
||||||
|
end)
|
||||||
|
|
||||||
|
harpoon:extend {
|
||||||
|
UI_CREATE = function(cx)
|
||||||
|
vim.keymap.set('n', '<C-v>', function()
|
||||||
|
harpoon.ui:select_menu_item { vsplit = true }
|
||||||
|
end, { buffer = cx.bufnr })
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<C-x>', function()
|
||||||
|
harpoon.ui:select_menu_item { split = true }
|
||||||
|
end, { buffer = cx.bufnr })
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<C-t>', function()
|
||||||
|
harpoon.ui:select_menu_item { tabedit = true }
|
||||||
|
end, { buffer = cx.bufnr })
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
||||||
7
lua/custom/plugins/lazygit.lua
Normal file
7
lua/custom/plugins/lazygit.lua
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
'kdheepak/lazygit.nvim',
|
||||||
|
-- optional for floating window border decoration
|
||||||
|
dependencies = {
|
||||||
|
'nvim-lua/plenary.nvim',
|
||||||
|
},
|
||||||
|
}
|
||||||
27
lua/custom/plugins/toggleterm.lua
Normal file
27
lua/custom/plugins/toggleterm.lua
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
'akinsho/toggleterm.nvim',
|
||||||
|
-- [[ cmd = { "toggleterm", "termexec" }, ]]
|
||||||
|
opts = {
|
||||||
|
highlights = {
|
||||||
|
normal = { link = 'normal' },
|
||||||
|
normalnc = { link = 'normalnc' },
|
||||||
|
normalfloat = { link = 'normalfloat' },
|
||||||
|
floatborder = { link = 'floatborder' },
|
||||||
|
statusline = { link = 'statusline' },
|
||||||
|
statuslinenc = { link = 'statuslinenc' },
|
||||||
|
winbar = { link = 'winbar' },
|
||||||
|
winbarnc = { link = 'winbarnc' },
|
||||||
|
},
|
||||||
|
size = 10,
|
||||||
|
on_create = function()
|
||||||
|
vim.opt.foldcolumn = '0'
|
||||||
|
vim.opt.signcolumn = 'no'
|
||||||
|
end,
|
||||||
|
open_mapping = [[<f12>]],
|
||||||
|
shading_factor = 2,
|
||||||
|
direction = 'float',
|
||||||
|
float_opts = { border = 'rounded' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -11,7 +11,7 @@ return {
|
|||||||
},
|
},
|
||||||
cmd = 'Neotree',
|
cmd = 'Neotree',
|
||||||
keys = {
|
keys = {
|
||||||
{ '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal', silent = true },
|
{ '\\', ':Neotree reveal right<CR>', desc = 'NeoTree reveal', silent = true },
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
filesystem = {
|
filesystem = {
|
||||||
|
|||||||
Reference in New Issue
Block a user