adding my first pass at editting in what I want
This commit is contained in:
parent
b7d5cc8f42
commit
6bc5009eb3
22
init.lua
22
init.lua
|
|
@ -102,7 +102,7 @@ vim.g.have_nerd_font = false
|
|||
vim.opt.number = true
|
||||
-- You can also add relative line numbers, to help with jumping.
|
||||
-- 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!
|
||||
vim.opt.mouse = 'a'
|
||||
|
|
@ -154,6 +154,13 @@ vim.opt.cursorline = true
|
|||
-- Minimal number of screen lines to keep above and below the cursor.
|
||||
vim.opt.scrolloff = 10
|
||||
|
||||
-- Settings from lifted from Prime
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.smartindent = true
|
||||
|
||||
-- [[ Basic Keymaps ]]
|
||||
-- See `:help vim.keymap.set()`
|
||||
|
||||
|
|
@ -176,10 +183,10 @@ vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagn
|
|||
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
|
||||
|
||||
-- TIP: Disable arrow keys in normal mode
|
||||
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
|
||||
-- vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
|
||||
-- vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
|
||||
-- vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
|
||||
vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
|
||||
vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
|
||||
vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
|
||||
vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
|
||||
|
||||
-- Keybinds to make split navigation easier.
|
||||
-- Use CTRL+<hjkl> to switch between windows
|
||||
|
|
@ -190,6 +197,9 @@ vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right win
|
|||
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
|
||||
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
|
||||
|
||||
-- Keybinds borrowing from Prime
|
||||
vim.keymap.set('n', '<leader>pv', vim.cmd.Ex, { desc = 'Open Explorer [P]roject [V]iew' })
|
||||
|
||||
-- [[ Basic Autocommands ]]
|
||||
-- See `:help lua-guide-autocommands`
|
||||
|
||||
|
|
@ -885,7 +895,7 @@ require('lazy').setup({
|
|||
--
|
||||
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
||||
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
|
||||
-- { import = 'custom.plugins' },
|
||||
{ import = 'custom.plugins' },
|
||||
}, {
|
||||
ui = {
|
||||
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
||||
|
|
|
|||
|
|
@ -0,0 +1,65 @@
|
|||
return {
|
||||
{
|
||||
'ThePrimeagen/harpoon',
|
||||
branch = 'harpoon2',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'nvim-telescope/telescope.nvim',
|
||||
},
|
||||
config = function()
|
||||
local harpoon = require 'harpoon'
|
||||
harpoon:setup()
|
||||
|
||||
vim.keymap.set('n', '<leader>a', function()
|
||||
harpoon:list():add()
|
||||
end)
|
||||
--[[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-j>', function()
|
||||
harpoon:list():select(2)
|
||||
end)
|
||||
vim.keymap.set('n', '<C-k>', function()
|
||||
harpoon:list():select(3)
|
||||
end)
|
||||
vim.keymap.set('n', '<C-l>', function()
|
||||
harpoon:list():select(4)
|
||||
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)
|
||||
|
||||
local conf = require('telescope.config').values
|
||||
local function toggle_telescope(harpoon_files)
|
||||
local file_paths = {}
|
||||
for _, item in ipairs(harpoon_files.items) do
|
||||
table.insert(file_paths, item.value)
|
||||
end
|
||||
|
||||
require('telescope.pickers')
|
||||
.new({}, {
|
||||
prompt_title = 'Harpoon',
|
||||
finder = require('telescope.finders').new_table {
|
||||
results = file_paths,
|
||||
},
|
||||
previewer = conf.file_previewer {},
|
||||
sorter = conf.generic_sorter {},
|
||||
})
|
||||
:find()
|
||||
end
|
||||
|
||||
vim.keymap.set('n', '<C-e>', function()
|
||||
toggle_telescope(harpoon:list())
|
||||
end, { desc = 'Open harpoon window' })
|
||||
end,
|
||||
},
|
||||
}
|
||||
Loading…
Reference in New Issue