From 7a27c66676ccc057c4ab1f6a025b1aec61b533ce Mon Sep 17 00:00:00 2001 From: mattn Date: Wed, 10 Nov 2021 16:39:46 +0900 Subject: [PATCH] fix: enable DocumentFormattingProvider (#32) --- cmd/templ/lspcmd/handler.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/templ/lspcmd/handler.go b/cmd/templ/lspcmd/handler.go index 846a785ba..085f8e9dd 100644 --- a/cmd/templ/lspcmd/handler.go +++ b/cmd/templ/lspcmd/handler.go @@ -241,6 +241,7 @@ func (p *Proxy) proxyInitialize(ctx context.Context, conn *jsonrpc2.Conn, req *j resp.Capabilities.ExecuteCommandProvider = &lsp.ExecuteCommandOptions{} } resp.Capabilities.ExecuteCommandProvider.Commands = []string{} + resp.Capabilities.DocumentFormattingProvider = true // Reply to the client. err = conn.Reply(ctx, req.ID, &resp) if err != nil {