Write creates or replaces the contents of the file for the given URI. True will be returned if the document's syntax tree has changed.
(ctx context.Context, u uri.URI, identifier protocol.LanguageIdentifier, version int32, input []byte)
| 171 | // Write creates or replaces the contents of the file for the given URI. |
| 172 | // True will be returned if the document's syntax tree has changed. |
| 173 | func (m *Manager) Write(ctx context.Context, u uri.URI, identifier protocol.LanguageIdentifier, version int32, input []byte) (bool, error) { |
| 174 | m.mu.Lock() |
| 175 | defer m.mu.Unlock() |
| 176 | return m.write(ctx, u, identifier, version, input) |
| 177 | } |
| 178 | |
| 179 | func (m *Manager) write(ctx context.Context, u uri.URI, identifier protocol.LanguageIdentifier, version int32, input []byte) (bool, error) { |
| 180 | changed, err := m.parse(ctx, u, identifier, version, input) |