Added harpoon, telescope, undotree
This commit is contained in:
27
init.lua
27
init.lua
@@ -33,12 +33,35 @@ vim.opt.cindent = true
|
|||||||
-- use language‐specific plugins for indenting (better):
|
-- use language‐specific plugins for indenting (better):
|
||||||
vim.cmd("filetype plugin indent on")
|
vim.cmd("filetype plugin indent on")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
vim.cmd("syntax on")
|
vim.cmd("syntax on")
|
||||||
|
|
||||||
vim.keymap.set('n', 'p', '<Cmd>pu<CR>')
|
vim.keymap.set('n', 'p', '<Cmd>pu<CR>')
|
||||||
|
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
vim.keymap.set("n", "<leader>ll", vim.cmd.Ex)
|
||||||
|
|
||||||
|
-- Telescope
|
||||||
|
local builtin = require('telescope.builtin')
|
||||||
|
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
|
||||||
|
vim.keymap.set('n', '<leader>fg', builtin.git_files, { desc = 'Telescope find git files' })
|
||||||
|
vim.keymap.set('n', '<leader>fG', function()
|
||||||
|
builtin.grep_string({ search = vim.fn.input("grep > ") } );
|
||||||
|
end )
|
||||||
|
|
||||||
|
-- Harpoon
|
||||||
|
local mark = require("harpoon.mark")
|
||||||
|
local ui = require("harpoon.ui")
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>a", mark.add_file)
|
||||||
|
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
|
||||||
|
vim.keymap.set("n", "<C-h>", function() ui.nav_file(1) end)
|
||||||
|
vim.keymap.set("n", "<C-t>", function() ui.nav_file(2) end)
|
||||||
|
vim.keymap.set("n", "<C-n>", function() ui.nav_file(3) end)
|
||||||
|
vim.keymap.set("n", "<C-s>", function() ui.nav_file(4) end)
|
||||||
|
|
||||||
|
-- UndoTree
|
||||||
|
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
|
||||||
|
|
||||||
-- Reserve a space in the gutter
|
-- Reserve a space in the gutter
|
||||||
vim.opt.signcolumn = 'yes'
|
vim.opt.signcolumn = 'yes'
|
||||||
|
|
||||||
|
|||||||
6
lua/plugins/harpoon.lua
Normal file
6
lua/plugins/harpoon.lua
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"theprimeagen/harpoon",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
8
lua/plugins/lsp_lines.lua
Normal file
8
lua/plugins/lsp_lines.lua
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"https://git.sr.ht/~whynothugo/lsp_lines.nvim",
|
||||||
|
config = function()
|
||||||
|
require("lsp_lines").setup()
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
}
|
||||||
5
lua/plugins/telescope.lua
Normal file
5
lua/plugins/telescope.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
return {
|
||||||
|
'nvim-telescope/telescope.nvim', tag = '0.1.8',
|
||||||
|
-- or , branch = '0.1.x',
|
||||||
|
dependencies = { 'nvim-lua/plenary.nvim' }
|
||||||
|
}
|
||||||
5
lua/plugins/undotree.lua
Normal file
5
lua/plugins/undotree.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"mbbill/undotree"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user