Skip to content

Commit

Permalink
Fix crash and allow all ymllls configs
Browse files Browse the repository at this point in the history
  • Loading branch information
qvalentin committed Nov 12, 2023
1 parent fb302a7 commit 9d50cb7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions internal/adapter/yamlls/documentSync.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ import (
)

func (yamllsConnector YamllsConnector) InitiallySyncOpenDocuments() {
if yamllsConnector.Conn == nil {
return
}
for _, doc := range yamllsConnector.documents.GetAllDocs() {
yamllsConnector.DocumentDidOpen(doc.Ast, lsp.DidOpenTextDocumentParams{
TextDocument: lsp.TextDocumentItem{
Expand Down
4 changes: 2 additions & 2 deletions internal/util/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ type YamllsConfiguration struct {
// if set to false diagnostics will only be shown after saving the file
// otherwise writing a template will cause a lot of diagnostics to be shown because
// the structure of the document is broken during typing
ShowDiagnosticsDirectly bool `json:"showDiagnosticsDirectly,omitempty"`
YamllsSettings YamllsSettings `json:"config,omitempty"`
ShowDiagnosticsDirectly bool `json:"showDiagnosticsDirectly,omitempty"`
YamllsSettings interface{} `json:"config,omitempty"`
}

var DefaultConfig = HelmlsConfiguration{
Expand Down

0 comments on commit 9d50cb7

Please sign in to comment.