|
|
|
@ -1,3 +1,21 @@
|
|
|
|
|
vim.o.autoread = true
|
|
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd({ 'FocusGained', 'BufEnter', 'CursorHold', 'CursorHoldI' }, {
|
|
|
|
|
pattern = { '*' },
|
|
|
|
|
callback = function()
|
|
|
|
|
if vim.fn.mode() ~= 'c' then
|
|
|
|
|
vim.cmd 'checktime'
|
|
|
|
|
end
|
|
|
|
|
end,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd('FileChangedShellPost', {
|
|
|
|
|
pattern = { '*' },
|
|
|
|
|
callback = function()
|
|
|
|
|
vim.cmd [[echohl WarningMsg | echo "File changed on disk. Buffer reloaded." | echohl None]]
|
|
|
|
|
end,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
-- Set <space> as the leader key
|
|
|
|
|
-- See `:help mapleader`
|
|
|
|
|
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
|
|
|
|
@ -5,7 +23,7 @@ vim.g.mapleader = ' '
|
|
|
|
|
vim.g.maplocalleader = ' '
|
|
|
|
|
|
|
|
|
|
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
|
|
|
|
vim.g.have_nerd_font = false
|
|
|
|
|
vim.g.have_nerd_font = true
|
|
|
|
|
|
|
|
|
|
-- [[ Setting options ]]
|
|
|
|
|
-- See `:help vim.opt`
|
|
|
|
|