2021-09-16 01:13:17 +00:00
|
|
|
local o = vim.o
|
2021-08-24 16:55:37 +00:00
|
|
|
|
|
|
|
-- Helpers
|
2021-08-24 17:38:14 +00:00
|
|
|
require "_settings"
|
|
|
|
require "_bindings"
|
2021-09-01 17:03:05 +00:00
|
|
|
require "_colors"
|
2021-08-24 16:55:37 +00:00
|
|
|
|
|
|
|
-- Create commands
|
|
|
|
vim.cmd "command! TagsUpdate !ctags -R ."
|
|
|
|
vim.cmd "command! Todo grep TODO"
|
|
|
|
|
|
|
|
-- Use better grep programs
|
2021-09-01 17:03:05 +00:00
|
|
|
if vim.fn.executable("rg") == 1 then
|
|
|
|
o.grepprg = "rg --vimgrep --no-heading --color=never"
|
|
|
|
o.grepformat = "%f:%l:%c:%m,%f:%l:%m"
|
|
|
|
elseif vim.fn.executable("ag") == 1 then
|
|
|
|
o.grepprg = "ag --vimgrep --nogroup --nocolor"
|
|
|
|
elseif vim.fn.executable("ack") == 1 then
|
|
|
|
o.grepprg = "ack"
|
2021-08-24 16:55:37 +00:00
|
|
|
end
|
|
|
|
|
2021-09-01 17:03:05 +00:00
|
|
|
-- Plugins
|
2021-08-24 17:38:14 +00:00
|
|
|
require("plugins")
|