Skip to content

Commit 0aeb586

Browse files
committed
refactoring
1 parent a2ed2a8 commit 0aeb586

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

init.lua

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,29 @@
1+
vim.o.autoread = true
2+
3+
vim.api.nvim_create_autocmd({ 'FocusGained', 'BufEnter', 'CursorHold', 'CursorHoldI' }, {
4+
pattern = { '*' },
5+
callback = function()
6+
if vim.fn.mode() ~= 'c' then
7+
vim.cmd 'checktime'
8+
end
9+
end,
10+
})
11+
12+
vim.api.nvim_create_autocmd('FileChangedShellPost', {
13+
pattern = { '*' },
14+
callback = function()
15+
vim.cmd [[echohl WarningMsg | echo "File changed on disk. Buffer reloaded." | echohl None]]
16+
end,
17+
})
18+
119
-- Set <space> as the leader key
220
-- See `:help mapleader`
321
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
422
vim.g.mapleader = ' '
523
vim.g.maplocalleader = ' '
624

725
-- Set to true if you have a Nerd Font installed and selected in the terminal
8-
vim.g.have_nerd_font = false
26+
vim.g.have_nerd_font = true
927

1028
-- [[ Setting options ]]
1129
-- See `:help vim.opt`

lazy-lock.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"mini.nvim": { "branch": "main", "commit": "c8d4b45745b9c05217d33c7841230af4d03a5f1b" },
1717
"nvim-lspconfig": { "branch": "master", "commit": "8c5efd1269160fc2fdf61e3d7176be5015860a8f" },
1818
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
19+
"nvim-web-devicons": { "branch": "master", "commit": "0422a19d9aa3aad2c7e5cca167e5407b13407a9d" },
1920
"oil.nvim": { "branch": "master", "commit": "bbad9a76b2617ce1221d49619e4e4b659b3c61fc" },
2021
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
2122
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },

lua/custom/plugins/oil.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ return {
77
view_options = {
88
show_hidden = true,
99
},
10+
watch_for_changes = true,
1011
},
1112
dependencies = { { 'echasnovski/mini.icons', opts = {} } },
1213
lazy = false,

0 commit comments

Comments
 (0)