Skip to content

Commit aa26910

Browse files
committed
initalization stub
1 parent 3fc7b27 commit aa26910

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

internal/lsp/server.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616
"syscall"
1717
"time"
1818

19-
"github.com/go-json-experiment/json"
2019
"github.com/microsoft/typescript-go/internal/collections"
2120
"github.com/microsoft/typescript-go/internal/core"
2221
"github.com/microsoft/typescript-go/internal/ls"
@@ -712,13 +711,16 @@ func (s *Server) handleInitialized(ctx context.Context, params *lsproto.Initiali
712711
})
713712

714713
// request userPreferences if not provided at initialization
715-
if s.session.UserPreferences() == nil {
714+
if s.initializeParams.InitializationOptions == nil {
716715
userPreferences, err := s.RequestConfiguration(ctx)
717716
if err != nil {
718717
return err
719718
}
720719
s.session.Configure(userPreferences)
720+
} else {
721+
// !!! handle userPreferences from initalization
721722
}
723+
722724
// !!! temporary; remove when we have `handleDidChangeConfiguration`/implicit project config support
723725
if s.compilerOptionsForInferredProjects != nil {
724726
s.session.DidChangeCompilerOptionsForInferredProjects(ctx, s.compilerOptionsForInferredProjects)

0 commit comments

Comments
 (0)