Skip to content

Commit

Permalink
fix: not open files should not be sent to yamlls
Browse files Browse the repository at this point in the history
  • Loading branch information
qvalentin committed May 8, 2024
1 parent d634a7a commit f47e51b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 3 additions & 0 deletions internal/adapter/yamlls/documentSync.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ func (yamllsConnector Connector) InitiallySyncOpenDocuments(docs []*lsplocal.Doc
return
}
for _, doc := range docs {
if !doc.IsOpen {
continue
}
yamllsConnector.DocumentDidOpen(doc.Ast, lsp.DidOpenTextDocumentParams{
TextDocument: lsp.TextDocumentItem{
URI: doc.URI,
Expand Down
3 changes: 0 additions & 3 deletions internal/language_features/template_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ func NewTemplateContextFeature(genericDocumentUseCase *GenericDocumentUseCase) *
}

func (f *TemplateContextFeature) AppropriateForNode() bool {
nodeContent := f.NodeContent()
println(nodeContent)

if f.NodeType == gotemplate.NodeTypeDot || f.NodeType == gotemplate.NodeTypeDotSymbol {
return true
}
Expand Down
2 changes: 1 addition & 1 deletion internal/lsp/document_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (s *DocumentStore) Store(uri uri.URI, helmlsConfig util.HelmlsConfiguration
Content: string(content),
Ast: ast,
DiagnosticsCache: NewDiagnosticsCache(helmlsConfig),
IsOpen: true,
IsOpen: false,
SymbolTable: NewSymbolTable(ast, content),
},
)
Expand Down

0 comments on commit f47e51b

Please sign in to comment.