-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinit.lua
62 lines (56 loc) · 1.44 KB
/
init.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
-- ~/.config/nvim/init.lua
-- require module
require "bootstrap"
require "gale.globals"
require "gale.usercmds"
require "gale.autocmds"
require "gale.aliases"
-- require "gale.wsl"
-- require "gale.linux"
require "gale.wezterm"
require "gale.macos"
require "gale.vim"
require "gale.filetypes"
require "options"
require "gale.material-ui"
require "gale.LSP.main"
require "mappings"
require "helpers"
require "help_floating"
require "floating_term"
require "configs.keymaps"
require "configs.autocmd"
require "functions"
-- end require
-- Autocommand to reload config on save
vim.cmd "source ~/.config/nvim/lua/chadrc.lua"
vim.cmd [[
autocmd BufRead,BufNewFile *.pl
\ if search(':-', 'nw') |
\ let b:filetype = 'prolog' |
\ else |
\ let b:filetype = 'perl' |
\ endif
]]
-- Autocommand to reload Lua files on save
vim.api.nvim_create_autocmd("BufWritePost", {
pattern = "*.lua",
callback = function()
vim.cmd "luafile %"
end,
})
-- Lazygit command
vim.api.nvim_create_user_command("Lazygit", function()
require("lazygit").lazygit()
end, {})
-- Notify configuration
local original_notify = vim.notify or function() end
vim.notify = function(msg, level, opts)
if not msg:match "Re-sourcing your config is not supported with lazy.nvim" then
original_notify(msg, level, opts)
end
end
-- Slime configuration
vim.g.slime_target = "tmux"
vim.g.slime_bracketed_paste = 1
vim.g.base47_cache = vim.fn.stdpath "cache" .. "/base47/"