Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple text document changes when setting the entire content #289

Closed
wants to merge 1 commit into from
Closed

Commits on Sep 1, 2017

  1. Multiple text document changes when setting the entire content

    It's unclear how a language server should react when multiple changes to the text document are sent, and one or more set the content of the entire document.
    
    The convention so far among the language servers I've seen has been to apply the changes from the bottom of the document to the top. However, there is no obvious ordering for the whole-document changes. Should we apply the changes in the order that they are received (so that earlier whole-document changes are overridden by later whole-document changes), except that within consecutive subsequences of range-changes we apply them in bottom-to-top order?
    
    This is a non-trivial amount of complexity for a situation that probably never arises in practice. Most likely the editor will either set the entire text of the document, or set ranges for the changes to the document (where, in some cases, the range may be the whole document). This commit clarifies this by forbidding whole-document changes in conjunction with other changes. It's also in line with the idea of forbidding overlapping edits as per #279.
    arxanas committed Sep 1, 2017
    Configuration menu
    Copy the full SHA
    37f86c0 View commit details
    Browse the repository at this point in the history