diff options
| author | srdusr <trevorgray@srdusr.com> | 2023-08-11 22:55:20 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2023-08-11 22:55:20 +0200 |
| commit | da19dad2906121c01c973b7502872137a8ce75dc (patch) | |
| tree | e67aa75e1a9d54a83dcb6e84d6583567c3301e31 /lua | |
| parent | a679b99e0938d185d390ffc47252d29cc2bbf4f7 (diff) | |
| download | dotfiles-da19dad2906121c01c973b7502872137a8ce75dc.tar.gz dotfiles-da19dad2906121c01c973b7502872137a8ce75dc.zip | |
Fix weird closing error message
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/user/mods.lua | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/lua/user/mods.lua b/lua/user/mods.lua index 49d3065..191d5ab 100644 --- a/lua/user/mods.lua +++ b/lua/user/mods.lua @@ -46,6 +46,9 @@ require("null-ls").setup({ end, }) +vim.cmd([[autocmd BufWritePre <buffer> lua vim.lsp.buf.format()]]) +--vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.format()]] + -------------------------------------------------- ---Determine if a value of any type is empty @@ -247,11 +250,6 @@ vim.cmd([[augroup END]]) -------------------------------------------------- -vim.cmd([[autocmd BufWritePre <buffer> lua vim.lsp.buf.format()]]) ---vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.format()]] - --------------------------------------------------- - --- Update Tmux Status Vi-mode function M.update_tmux_status() local mode = vim.api.nvim_eval("mode()") @@ -300,6 +298,7 @@ vim.cmd([[ --autocmd FocusGained * lua require("user.mods").update_tmux_status() --autocmd FocusLost * lua require("user.mods").update_tmux_status() --autocmd CmdwinEnter,CmdwinLeave * lua require("user.mods").update_tmux_status() + -------------------------------------------------- -- function OpenEmulatorList() @@ -445,4 +444,15 @@ end -- Bind a keymap to the update_neovim function (optional) vim.api.nvim_set_keymap("n", "<leader>U", '<cmd> lua require("user.mods").Update_neovim()<CR>', { noremap = true, silent = true }) +-------------------------------------------------- + +-- Fix closing nvim error message (/src/unix/core.c:147: uv_close: Assertion `!uv__is_closing(handle)' failed.) +vim.api.nvim_create_autocmd({ "VimLeave" }, { + callback = function() + vim.fn.jobstart('notify-send "hello"', { detach = true }) + end, +}) + +-------------------------------------------------- + return M |
