refactoring
This commit is contained in:
parent
a2ed2a85b0
commit
0aeb586f4c
3 changed files with 21 additions and 1 deletions
20
init.lua
20
init.lua
|
|
@ -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`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue