vim-settings/neovim/lua/init.lua

29 lines
865 B
Lua
Raw Normal View History

2021-09-16 01:13:17 +00:00
local o = vim.o
2021-08-24 16:55:37 +00:00
-- Helpers
2021-12-15 17:37:51 +00:00
require("_settings")
require("_bindings")
require("_colors")
2021-08-24 16:55:37 +00:00
-- Create commands
2021-12-15 17:37:51 +00:00
vim.cmd("command! TagsUpdate !ctags -R .")
vim.cmd("command! Todo grep TODO")
2021-08-24 16:55:37 +00:00
-- Use better grep programs
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
-- Disable polyglot for langauges I've added special support for
vim.g.polyglot_disabled = { "go", "rust" }
-- Plugins
-- Packer auto installs and then lazy loads itself on PackerCommand and require the plugins module
-- This command should only really be needed to bootstrap a new system
2021-12-15 17:37:51 +00:00
vim.cmd([[command! PackerBootstrap lua require("plugins")]])