diff options
Diffstat (limited to '.config/nvim/lua/setup/nvim-lsp-installer.lua')
-rw-r--r-- | .config/nvim/lua/setup/nvim-lsp-installer.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/.config/nvim/lua/setup/nvim-lsp-installer.lua b/.config/nvim/lua/setup/nvim-lsp-installer.lua index bd3496e..de086f0 100644 --- a/.config/nvim/lua/setup/nvim-lsp-installer.lua +++ b/.config/nvim/lua/setup/nvim-lsp-installer.lua @@ -3,7 +3,12 @@ local lsp_installer = require("nvim-lsp-installer") -- Register a handler that will be called for each installed server when it's ready (i.e. when installation is finished -- or if the server is already installed). lsp_installer.on_server_ready(function(server) - local opts = {} + local opts = { + on_attach = function() + vim.cmd('doautocmd User lspAttached') + vim.cmd('autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_sync()') + end, + } -- (optional) Customize the options passed to the server -- if server.name == "tsserver" then |