anchor.diff:          (jsonrpc:jsonrpc-error-message e)))))
   
   (defun on-change (point arg)
  -  (let ((buffer (lem:point-buffer point)))
  +  (let* ((buffer (lem:point-buffer point))
  +         (workspace (buffer-workspace buffer)))
       (incf (buffer-file-version buffer))
       (text-document-did-change buffer
  -                              (list (text-document-content-change-event
  -                                     point
  -                                     (if (characterp arg)
  -                                         (string arg)
  -                                         arg))))))
  +                              (if (eql 1
  +                                       (text-document-sync-change
  +                                        (workspace-text-document-sync workspace)))
  +                                  (list (text-document-content-change-event
  +                                         point
  +                                         (if (characterp arg)
  +                                             (string arg)
  +                                             arg)))
  +                                  (list ({} "text" (buffer-text buffer)))))))
   
   (defun initialize-hooks (buffer)
     (lem:add-hook (lem:variable-value 'lem:before-change-functions :buffer buffer) 'on-change)
  
positive.code:       "textDocument" (text-document-client-capabilities)
        #|"experimental"|#))
  
  (defun initialize (workspace)
    (let* ((root (workspace-root workspace))
           (response (jsonrpc:call (workspace-connection workspace)
  
negative.code: (defstruct workspace
    connection
    server-capabilities
    text-document-sync
    root
    language-id
    (file-version-table (make-hash-table)))
  
  (defstruct text-document-sync
    open-close
    change
    will-save
    will-save-wait-until
    save)
  
  (lem:define-minor-mode language-client-mode
      (:name "Language Client")
    (setf (lem:variable-value 'lem.language-mode:completion-function) 'completion)
    ;(uiop:run-program "go-langserver -mode tcp -gocodecompletion &")
    (let ((buffer (lem:current-buffer)))
      (start (lem:buffer-major-mode buffer) buffer)))
  
  (defun get-language-id (language)
    (ecase language
  