vim-settings/neovim/lua/init.lua

32 lines
780 B
Lua
Raw Normal View History

2024-07-18 00:36:44 +00:00
if vim.fn.has("nvim-0.9.0") ~= 1 then
print("ERROR: Requires nvim >= 0.9.0")
2023-06-13 23:47:03 +00:00
end
2021-08-24 16:55:37 +00:00
-- Helpers
2024-09-19 18:07:44 +00:00
require("default_settings")
require("default_bindings")
2021-08-24 16:55:37 +00:00
-- Use better grep programs
if vim.fn.executable("rg") == 1 then
2024-09-19 18:01:47 +00:00
vim.o.grepprg = "rg --vimgrep --no-heading --color=never"
vim.o.grepformat = "%f:%l:%c:%m,%f:%l:%m"
elseif vim.fn.executable("ag") == 1 then
2024-09-19 18:01:47 +00:00
vim.o.grepprg = "ag --vimgrep --nogroup --nocolor"
elseif vim.fn.executable("ack") == 1 then
2024-09-19 18:01:47 +00:00
vim.o.grepprg = "ack"
2021-08-24 16:55:37 +00:00
end
2024-09-19 18:55:58 +00:00
if vim.g.neovide then
require("neovide")
end
-- Disable polyglot for langauges I've added special support for
-- TODO: Can this be moved somewhere better?
vim.g.polyglot_disabled = { "go", "rust" }
-- Plugins
require("lazy_init")
2024-09-17 20:16:25 +00:00
-- Load colors after plugins
2024-09-19 18:07:44 +00:00
require("colors")