···1010 end
1111end
12121313--- TODO: turn of formatting in htmlls & cssls
1313+-- TODO: turn off formatting in htmlls & cssls
14141515-- Register a handler that will be called for all installed servers.
1616-- Or register handlers on specific server instances.
+10-10
lua/user/lsp/null-ls.lua
···3232 extra_args = { '--no-semi', '--single-quote', '--jsx-single-quote' }
3333 })
3434 },
3535- -- on_attach = function (client)
3636- -- if client.resolved_capabilities.document_formatting then
3737- -- vim.cmd([[
3838- -- augroup LspFormatting
3939- -- autocmd! * <buffer>
4040- -- autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_sync()
4141- -- augroup END
4242- -- ]])
4343- -- end
4444- -- end,
3535+ on_attach = function(client)
3636+ if client.resolved_capabilities.document_formatting then
3737+ vim.cmd([[
3838+ augroup LspFormatting
3939+ autocmd! * <buffer>
4040+ autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_sync()
4141+ augroup END
4242+ ]])
4343+ end
4444+ end,
4545})