# HG changeset patch # User Zeger Van de Vannet # Date 1620651752 -7200 # Node ID 82155064643e35e52e34a3ddcbc9b086c63e7035 # Parent b89d28b332535748f6951df07ef70efcd344d6f6 Apply formatting synchronously diff -r b89d28b33253 -r 82155064643e dot_config/nvim/config.lua --- a/dot_config/nvim/config.lua Wed Apr 28 14:45:44 2021 +0200 +++ b/dot_config/nvim/config.lua Mon May 10 15:02:32 2021 +0200 @@ -105,8 +105,6 @@ } -- Tmux - function test_tmux() return os.getenv('TMUX') ~= nil end - use { 'tmux-plugins/vim-tmux-focus-events', cond = test_tmux } use { 'numtostr/navigator.nvim', config = function() @@ -359,7 +357,7 @@ nnoremap { '1gD', vim.lsp.buf.type_definition, silent = true } nnoremap { 'gr', vim.lsp.buf.references, silent = true } nnoremap { 'g0', vim.lsp.buf.document_symbol, silent = true } - nnoremap { '', vim.lsp.buf.formatting, silent = true } + nnoremap { '', function () vim.lsp.buf.formatting_sync({}, 5000) end, silent = true } nnoremap { 'gp', require'lspsaga.provider'.preview_definition, silent = true } inoremap { '', vim.lsp.buf.signature_help, silent = true }