config autoload

master
Dominik Madarász 2023-07-15 17:59:46 +02:00
parent 6a54d52c34
commit f9487a7f9a
12 changed files with 32 additions and 7 deletions

View File

@ -1,12 +1,6 @@
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
require("zak.lazy")
require("zak.options")
require("zak.keymap")
require("zak.treesitter")
require("zak.lsp")
require("zak.ale")
require("zak.ocaml")
require("zak")
-- vim: ts=2 sts=2 sw=2 et

View File

@ -0,0 +1 @@
vim.keymap.set('n', '<leader>gs', vim.cmd.Git)

View File

@ -0,0 +1,10 @@
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)

View File

@ -0,0 +1 @@
vim.keymap.set('n', '<leader>u', vim.cmd.UndotreeToggle)

12
lua/zak/init.lua 100644
View File

@ -0,0 +1,12 @@
-- load options
require('configs.lazy')
require('options')
require('keymap')
-- load configs
local config_path = vim.fn.stdpath("config") .. "/lua/zak/configs"
for _, file in ipairs(vim.fn.readdir(config_path, [[v:val =~ '\.lua$']])) do
if file ~= "lazy.lua" then
require("configs."..file:gsub("%.lua$", ""))
end
end

View File

@ -0,0 +1,3 @@
return {
'theprimeagen/harpoon'
}

View File

@ -123,4 +123,8 @@ return {
'dense-analysis/ale'
},
{
'mbbill/undotree'
},
}