2018-05-15  João Távora  <joaotavora@gmail.com>

	Bump version and slightly improve doc

	* eglot.el: Bump version. Add nicer Commentary header.
	(eglot): Improve docstring.

	* README.md: Update

2018-05-15  João Távora  <joaotavora@gmail.com>

	Merge remote-tracking branch 'elpa/externals/eglot'

2018-05-14  Stefan Monnier  <monnier@iro.umontreal.ca>

	* eglot-tests.el: Fix copyright

2018-05-14  João Távora  <joaotavora@gmail.com>

	More quietly report request timeouts as events

	* eglot.el (eglot--sync-request): Use eglot--log-event

2018-05-14  João Távora  <joaotavora@gmail.com>

	Shutdown server if connection initialization fails

	Also tweak autoreconnection logic

	* eglot.el (eglot--connect): Immediately `eglot-shutdown` if connection
	initialization failed. Don't treat interactive calls specially.
	(eglot--process-sentinel): Tweak messages.

2018-05-14  João Távora  <joaotavora@gmail.com>

	Fix a ridiculous bug when generating transient projects

	* eglot.el (eglot--find-current-process, eglot--interactive): Fix 
	horrible bug.

2018-05-14  João Távora  <joaotavora@gmail.com>

	Support didChangeWatchedFiles with dynamic registration

	RLS uses this, presumaly for knowing about Cargo.toml changes and stuff.

	* README.md: Update protocol compliance.

	* eglot.el (filenotify): Require it.
	(eglot--file-watches): New process-local var.
	(eglot--process-sentinel): Kill all watches
	(eglot--register-unregister): New helper.
	(eglot--server-client/registerCapability): Simplify.
	(eglot--server-client/unregisterCapability): New method.
	(eglot--register-workspace/didChangeWatchedFiles)
	(eglot--unregister-workspace/didChangeWatchedFiles): New capability.
	(eglot--client-capabilities): Update.

2018-05-14  João Távora  <joaotavora@gmail.com>

	Remove an unused variable

	* eglot.el (eglot--expect-carriage-return): Get rid of this.

2018-05-14  João Távora  <joaotavora@gmail.com>

	Now send willSaveWaitUntil

	* eglot.el (eglot--client-capabilities): Report willSaveWaitUntil.
	(eglot--server-workspace/applyEdit): Fix docstring.
	(eglot--signal-textDocument/willSave): Send willSaveWaitUntil
	(eglot--signal-textDocument/didOpen)
	(eglot--signal-textDocument/didClose): Don't eglot--obj.
	(eglot--apply-text-edits): Simplify. Use current buffer.
	(eglot--apply-workspace-edit): Use new eglot--apply-text-edits.

2018-05-14  João Távora  <joaotavora@gmail.com>

	Don't define a menu if nothing to show there for now

	* eglot.el (eglot-menu): Remove it.
	(eglot--mode-line-format): Don't define a menu.

2018-05-14  João Távora  <joaotavora@gmail.com>

	Use RLS in Travis CI and add actual tests

	Also run a hook when connected

	* eglot-tests.el (eglot--with-dirs-and-files)
	(eglot--make-file-or-dirs, eglot--call-with-dirs-and-files)
	(eglot--find-file-noselect): New helpers.
	(auto-detect-running-server, auto-reconnect): New actual tests.

	* eglot.el (eglot-connect): Run hook when connected
	(eglot-connect-hook): New variable

	* .travis.yml: Use rust stable and install rls

	* README.md: Update mention of automated tests

2018-05-14  João Távora  <joaotavora@gmail.com>

	Fix automatic project creation

	* eglot.el (eglot): Take PROJECT arg. Return process.
	(eglot--interactive): Returns a project.

2018-05-13  João Távora  <joaotavora@gmail.com>

	Work with any old directory, no formal project needed

	Actually, uses a "transient project" which project-current returns if 
	desperate.

	* README.md: Update

	* eglot.el (eglot--current-process)
	(eglot--current-process-or-lose): Simplify.
	(eglot): Maybe prompt user for project.

2018-05-13  João Távora  <joaotavora@gmail.com>

	Ask server for textDocument/signatureHelp if it supports it

	* eglot.el (eglot--client-capabilities): Capable of signature Help.
	(eglot--sig-info): Helper for eglot-eldoc-function.
	(eglot-eldoc-function): Send textDocument/signatureHelp

	* README.md: Update to mention textDocument/signatureHelp

2018-05-13  João Távora  <joaotavora@gmail.com>

	Fix copyright header. Obviously not since 2003

2018-05-13  João Távora  <joaotavora@gmail.com>

	Reinstate the catch/loop/throw idiom in eglot-request

	This reverts parts of commit 29f58a6514aec28e4e6df9611e4f58c7289e3cc6.

	Unfortunately, this may cause problems when calling the error callbacks
	directly as in the process sentinel. In that particular scenario the
	accept-process-output won't have return, because no output has is being
	handled. Consequently, if we're unlucky, we have another 30 seconds to
	way before the flag is tested and the loop exits.

	* eglot.el (eglot-request): Use catch/loop/throw again

2018-05-12  João Távora  <joaotavora@gmail.com>

	Tweak README.md

	* README.md (Commands and keybindings): New section.

2018-05-12  João Távora  <joaotavora@gmail.com>

	New command eglot-help-at-point and a README update

	* README.md (Commands and keybindings): New section.

	* eglot.el (eglot-eldoc-function): Use eglot--hover-info. Don't care
	about kind in highlightSymbol
	(eglot--hover-info): New helper.
	(eglot-help-at-point): New command.

2018-05-11  João Távora  <joaotavora@gmail.com>

	Get rid of catch/loop/throw idiom (suggested by Thien-Thi Nguyen)

	* eglot.el (eglot--process-filter)
	(eglot--request): Replace catch/loop/throw idiom with let/test/loop/set

2018-05-11  João Távora  <joaotavora@gmail.com>

	Rework autoreconnection logic

	Can't be a global var, has to be a per process thing.

	* eglot.el (eglot-autoreconnect): New defcustom
	(eglot--inhibit-autoreconnect): Renamed from
	eglot--inhibit-autoreconnect
	(eglot--connect): Run autoreconnect timer here.
	(eglot--inhibit-auto-reconnect): Removed.
	(eglot--process-sentinel): Don't run timer here. Rework.
	(eglot, eglot-reconnect): Pass INTERACTIVE to eglot--connect.

2018-05-11  João Távora  <joaotavora@gmail.com>

	Duh, json.el is in Emacs, and json-mode.el is useless here

	* eglot.el (Package-Requires): Don't require json-mode

2018-05-10  João Távora  <joaotavora@gmail.com>

	Prepare to sumbit to GNU ELPA

	* eglot.el: Update headers.

2018-05-10  João Távora  <joaotavora@gmail.com>

	(eglot--xref-make): Fix Use of cl-destructuring-bind.

2018-05-10  João Távora  <joaotavora@gmail.com>

	Misc little adjustments for readability

	* eglot.el (eglot--log-event, eglot--process-receive)
	(eglot--xref-make, xref-backend-apropos): Use cl-destructuring-bind.
	(eglot--server-window/showMessageRequest): Compact.

2018-05-10  João Távora  <joaotavora@gmail.com>

	Support :completionItem/resolve

	This is quite handy with company and company-quickhelp

	* eglot.el (eglot-completion-at-point): Send
	:completionItem/resolve

	* README.md: Mention completionItem/resolve

2018-05-10  João Távora  <joaotavora@gmail.com>

	Rename functions. eglot--request is now the synchronous one

	* eglot.el (eglot--connect, eglot-shutdown)
	(xref-backend-identifier-completion-table)
	(xref-backend-definitions, xref-backend-references)
	(xref-backend-apropos, eglot-completion-at-point, eglot-rename): Call
	eglot--request.
	(eglot--async-request): Renamed from eglot--request.
	(eglot--request): Renamed from eglot--sync-request.
	(eglot--TextDocumentIdentifier)
	(eglot--VersionedTextDocumentIdentifier)
	(eglot--TextDocumentPositionParams, eglot--TextDocumentItem): Renamed
	from the more verbose eglot--current-buffer-* variante.
	(eglot-rename, eglot-imenu, eglot-eldoc-function)
	(eglot-completion-at-point, xref-backend-definitions)
	(xref-backend-identifier-at-point)
	(eglot--signal-textDocument/didSave)
	(xref-backend-identifier-completion-table)
	(eglot--signal-textDocument/didClose)
	(eglot--signal-textDocument/didOpen)
	(eglot--signal-textDocument/didChange): Use new function names.

2018-05-10  João Távora  <joaotavora@gmail.com>

	Friendlier M-x eglot

	* eglot.el (eglot-server-programs): Renamed from eglot-executables
	(eglot--interactive): Redesign
	(eglot): Docstring.
	(eglot--connect): Now a synchronous gig.
	(eglot--interactive): Friendlier.
	(eglot): Improve docstring, rework a bit.
	(eglot-reconnect): Rework a bit.
	(eglot--process-sentinel): Insert "byebye" ruler here.

	* README.md: Update

2018-05-10  João Távora  <joaotavora@gmail.com>

	Improve eglot-eldoc-function

	Use the :range key if the server provided it. Also simplify code with a
	new eglot--with-lsp-range macro.

	* eglot.el (eglot--format-markup): Tweak comment.
	(eglot--with-lsp-range): New helper macro.
	(eglot--server-textDocument/publishDiagnostics)
	(eglot--apply-text-edits): Use it.
	(eglot-eldoc-function): Use range if server provides it.

2018-05-10  João Távora  <joaotavora@gmail.com>

	Reduce log chatter

	* eglot.el (eglot--process-sentinel, eglot--request): Use 
	eglot--log-event.
	(eglot--log-event): Print "message" if type unknown.
	(eglot--debug, eglot--log): Remove.
	(eglot--server-window/logMessage, eglot--server-telemetry/event): Make
	noops.
	(eglot--call-deferred): Also reduce chatter here.

2018-05-10  João Távora  <joaotavora@gmail.com>

	Only call deferred actions after a full message has been received

	Otherwise it can be quite wasteful.

	* eglot.el (eglot--process-filter): Don't eglot--call-deferred here.
	(eglot--process-receive): Do it here.

2018-05-10  João Távora  <joaotavora@gmail.com>

	Resist server failure during synchronous requests

	Calling the error handler unprotected could lead to the rest of the 
	sentinel not running at all. This defeated the auto-reconnection in 
	Rust, for example.

	* eglot.el (eglot--process-sentinel): Rework.

2018-05-10  João Távora  <joaotavora@gmail.com>

	Simplify mode-line updating logic

	* eglot.el (eglot--define-process-var): Simplify.
	(eglot--short-name, eglot--spinner, eglot--status): Don't auto-update
	mode-line.
	(eglot--process-receive): Update it here.

2018-05-10  João Távora  <joaotavora@gmail.com>

	More RLS-specifics: update Flymake diags when indexing done

	RLS could/should report diagnostics for every opened file, even if there
	aren't any problems. Because it doesn't, loop for every buffer managed
	by the process and call eglot--current-flymake-report-fn

	* eglot.el
	(eglot--server-window/progress): Call eglot--current-flymake-report-fn

2018-05-10  João Távora  <joaotavora@gmail.com>

	Adjust flymake integration

	When opening a new file (signalling textDocument/didOpen) it makes sense
	to call the flymake callback (if it exists) with no diagnostics, just to
	get rid of that "Wait", since we don't know if later in this callback
	cycle the server will ever report new diagnostics.

	* eglot.el (eglot--managed-mode): Don't call flymake-mode or eldoc-mode
	(eglot--managed-mode-hook): Add them here.
	(eglot--maybe-activate-editing-mode): Call flymake callback.
	(eglot--server-textDocument/publishDiagnostics): Set unreported 
	diagnostics to nil if invoking callback.

2018-05-10  João Távora  <joaotavora@gmail.com>

	Shorten summary line to appease package-lint.el

2018-05-10  João Távora  <joaotavora@gmail.com>

	More correctly setup rust-mode-related autoloads

	By autoloading the add-hook form and the eglot--setup-rls-idiosyncrasies 
	definition, a user can start rust-mode without loading eglot.el along 
	with it.

	* eglot.el (rust-mode-hook)
	(eglot--setup-rls-idiosyncrasies): Wrap in autoloaded progn.

2018-05-09  João Távora  <joaotavora@gmail.com>

	Add minimal headers, commentary and autoloads

2018-05-09  João Távora  <joaotavora@gmail.com>

	Fancier RLS spinner

	* eglot.el (eglot--mode-line-format): Use (nth 3) of eglot--spinner.
	(eglot--server-window/progress): Save detail message in spinner.

2018-05-09  João Távora  <joaotavora@gmail.com>

	New "deferred requests" that wait until server is ready

	Calling textDocument/hover or textDocument/documentHighlight before the
	server has had a chance to process a textDocument/didChange is normally
	useless. The matter is worse for servers like RLS which only become
	ready much later and send a special notif for it (see 
	https://github.com/rust-lang-nursery/rls/issues/725).

	So, keeping the same coding style add a DEFERRED arg to eglot--request 
	that makes it maybe not run the function immediately. Add a bunch of 
	logic for probing readiness of servers.

	* README.md: Update

	* eglot.el (eglot--deferred-actions): New process-local var.
	(eglot--process-filter): Call deferred actions.
	(eglot--request): Rewrite.
	(eglot--sync-request): Rewrite.
	(eglot--call-deferred, eglot--ready-predicates)
	(eglot--server-ready-p): New helpers.
	(eglot--signal-textDocument/didChange): Set spinner and call deferred
	actions.
	(eglot-completion-at-point): Pass DEFERRED to eglot-sync-request.
	(eglot-eldoc-function): Pass DEFERRED to eglot-request
	(eglot--rls-probably-ready-for-p): New helper.
	(rust-mode-hook): Add eglot--setup-rls-idiosyncrasies
	(eglot--setup-rls-idiosyncrasies): New helper.

2018-05-09  João Távora  <joaotavora@gmail.com>

	Call eglot-eldoc-function after completion finishes

	* eglot.el (eglot-completion-at-point): Call eglot-eldoc-function after
	completion finishes.

2018-05-09  João Távora  <joaotavora@gmail.com>

	Simplify `eglot-shutdown`

	* eglot.el (eglot, eglot-reconnect)
	(eglot--managed-mode): Call new eglot-shutdown.
	(eglot-shutdown): Simplify.
	(eglot--process-sentinel): Also call error functions.
	(eglot--process-filter): Reindent.

2018-05-09  João Távora  <joaotavora@gmail.com>

	Get rid of eglot-mode

	* eglot.el (eglot--managed-mode): Don't call eglot-mode. When shutting
	down, offer to kill server.
	(mode-line-misc-info): Update to use eglot--managed-mode

2018-05-09  João Távora  <joaotavora@gmail.com>

	Simplify eglot--signal-textDocument/didChange

	* eglot.el (eglot--recent-before-changes)
	(eglot--recent-after-changes): Delete.
	(eglot--recent-changes): New var.
	(eglot--outstanding-edits-p, eglot--before-change)
	(eglot--after-change): Rewrite.
	(eglot--signal-textDocument/didChange): Rewrite.
	(eglot--signal-textDocument/didOpen): Initialize buffer-local
	eglot--recent-changes here.

2018-05-09  João Távora  <joaotavora@gmail.com>

	Fix odd bugs and tweak stuff

	* eglot.el (eglot--log-event): Insert before markers.
	(eglot--process-receive): Shave lines.
	(xref-backend-references): Use cl-return-from.
	(eglot--log-event): Simplify
	(eglot-completion-at-point): Saner annotation

2018-05-08  João Távora  <joaotavora@gmail.com>

	Update README

2018-05-08  João Távora  <joaotavora@gmail.com>

	Support workspace/applyEdit

	* eglot.el (eglot--reply): Don't send result or error if not provided.
	(eglot--server-workspace/applyEdit): New server method.
	(eglot--apply-text-edits): Rework.
	(eglot--apply-workspace-edit): New helper.
	(eglot-rename): Simplify.

2018-05-08  João Távora  <joaotavora@gmail.com>

	Support textDocument/rename

	* README.md: Mention rename support.

	* eglot.el (eglot--uri-to-path): Handle uri hidden in keywords.
	(eglot--apply-text-edits): New helper.
	(eglot-rename): New interactive command.
	(eglot--client-capabilities): Add rename capability.

2018-05-08  João Távora  <joaotavora@gmail.com>

	Reasonable textDocument/documentHighlight support

	* README.md: Update.

	* eglot.el (eglot--current-buffer-TextDocumentPositionParams): New 
	helper.
	(xref-backend-identifier-completion-table): Refactor a bit.
	(xref-backend-identifier-at-point): Use when-let and 
	eglot--current-buffer-TextDocumentPositionParams
	(xref-backend-definitions, xref-backend-references): Refactor a bit.
	(eglot-completion-at-point): Use 
	eglot--current-buffer-TextDocumentPositionParams
	(eglot-eldoc-function): Rewrite to handle 
	textDocument/documentHighlight.
	(eglot--highlights): New variable.
	(eglot--client-capabilities): Update with support for documentHighlight.

2018-05-08  João Távora  <joaotavora@gmail.com>

	Fix odd bugs

	* eglot.el (eglot--process-receive, eglot--request): Set status to 
	actual error message.
	(eglot--managed-mode): Manage imenu-create-index-function correctly.
	(eglot--mode-line-format): Print error status.

2018-05-08  João Távora  <joaotavora@gmail.com>

	When killing server, always wait 3 seconds

	* eglot.el (eglot--request): Accept TIMEOUT param.

2018-05-08  João Távora  <joaotavora@gmail.com>

	Try to fix some textDocument/completion bugs

	* eglot.el (eglot-completion-at-point): Rework slightly.

2018-05-07  João Távora  <joaotavora@gmail.com>

	Half-decent imenu support via textDocument/documentSymbol

	* README.md: Update capability

	* eglot.el (eglot--lsp-position-to-point): New function.
	(eglot--managed-mode): Handle imenu-create-index-function.
	(eglot--server-textDocument/publishDiagnostics): Use 
	eglot--lsp-position-to-point.
	(eglot-imenu): New function.
	(eglot--client-capabilities): Capable of documentSymbol.

2018-05-07  João Távora  <joaotavora@gmail.com>

	Only request stuff that server says it's capable of

	* eglot.el (eglot--server-capable): New helper.
	(eglot-xref-backend)
	(xref-backend-identifier-completion-table)
	(xref-backend-references, xref-backend-apropos)
	(eglot-completion-at-point, eglot-eldoc-function): Use it.

2018-05-07  João Távora  <joaotavora@gmail.com>

	Simplify mode-line code with a helper.

	* eglot.el (eglot--mdoe-line-props): New helper.
	(eglot--mode-line-format): Use it.

2018-05-07  João Távora  <joaotavora@gmail.com>

	Get rid of eglot--buffer-open-count

	Hasn't really proved useful yet.

	* eglot.el (eglot--buffer-open-count): Remove.
	(eglot--signal-textDocument/didOpen)
	(eglot--signal-textDocument/didClose): Simplify.

2018-05-07  João Távora  <joaotavora@gmail.com>

	Get rid of eglot--special-buffer-process

	Hasn't really proved useful yet.

	* eglot.el (eglot--special-buffer-process): Delete.
	(eglot--current-process): Simplify.
	(eglot--events-buffer): Simplify.

2018-05-07  João Távora  <joaotavora@gmail.com>

	* eglot.el: Reformat to shave off some lines.

2018-05-07  João Távora  <joaotavora@gmail.com>

	Fix bug in hover support

	* eldoc.el (eglot-eldoc-function): Use eglot--format-markup.
	(subr-x): Require it.
	(eglot--format-markup): Pacify byte-compiler.

2018-05-07  João Távora  <joaotavora@gmail.com>

	Clean up client capabilities

	* eglot.el (eglot--client-capabilities): Clean up client capabilities.

2018-05-07  João Távora  <joaotavora@gmail.com>

	Half-baked textDocument/hover support

	* eglot.el (eglot--format-markup): New helper.
	(eglot--managed-mode): Handle eldoc-documentation-function.
	(eglot-eldoc-function): New function.

	* README.md: update

2018-05-07  João Távora  <joaotavora@gmail.com>

	Tweak the async request engine.

	* eglot.el (eglot--request): Return the continuation id.
	(eglot--lambda): Move up in the file.
	(eglot--sync-request): Use a catch-tag.

2018-05-07  João Távora  <joaotavora@gmail.com>

	Explain why didOpen on after-revert-hook is a bad idea

	The reason is that the global find-file-hook is called again, and that 
	already does the didOpen. Too many didOpen's would be bad.

	* eglot.el (eglot--managed-mode): Remove commented lines.

2018-05-07  João Távora  <joaotavora@gmail.com>

	Half-decent completion support

	* README.md: Update.

	* eglot.el (eglot--kind-names): New variable.
	(eglot--managed-mode): Handle completion-at-point-functions.
	(eglot-completion-at-point): New function.

2018-05-07  João Távora  <joaotavora@gmail.com>

	Solve another textDocument/didChange bug

	* eglot.el (eglot--signal-textDocument/didChange): Rework a bit.
	(eglot--after-change): Store the actual after-text in the 
	eglot--recent-after-changes.

2018-05-07  João Távora  <joaotavora@gmail.com>

	Add (dummy) tests and Travis CI integration

	* .travis.yml: New file.

	* Makefile: New file.

	* README.md: Add Travis badge.

	* eglot-tests.el: New file with a dummy test.

2018-05-07  João Távora  <joaotavora@gmail.com>

	Support javascript's javascript-typescript-langserver

	* README.md: Improve a bit

	* eglot.el (eglot--make-process): Take MANAGED-MAJOR-MODE arg
	(eglot-executables): Add basic javascript support.
	(eglot--connect): Pass mode to eglot--make-process
	(eglot--interactive): Check that guessed command is a listp.
	(eglot): Minor improvement to message.
	(eglot--current-buffer-TextDocumentItem): Guess language from mode 
	symbol.

2018-05-07  João Távora  <joaotavora@gmail.com>

	Increase request timeout length to 10 seconds

	* eglot.el (eglot-request-timeout): New var.
	(eglot--request): Use it.

2018-05-07  João Távora  <joaotavora@gmail.com>

	Workaround two suspected Emacs bugs

	* eglot.el (eglot--process-filter): Use a proper unique tag. Use 
	unwind-protect.
	(eglot--sync-request): Rework.
	(eglot--server-client/registerCapability): Use a proper done tag.

2018-05-07  João Távora  <joaotavora@gmail.com>

	ETOOMANYLAMBDAS

	* eglot.el (eglot--sync-request): Remove a lambda.

2018-05-07  João Távora  <joaotavora@gmail.com>

	Fix the odd bug here and there

	* eglot.el (eglot--connect): Activate editing mode where applicable
	here.
	(eglot, eglot-reconnect): Not here or here.
	(eglot--process-sentinel): Catch auto-reconnect errors.
	(eglot--notify): Dont send 'id=null', it messes up js's lsp
	(eglot--reply): Do send id here.
	(eglot--log-event): Simplify protocol. Complexify implementation.
	(eglot--process-receive, eglot--process-send): Simplify eglot--log-event
	call.
	(eglot--request, eglot--notify, eglot--reply): Simplify 
	eglot--process-send call
	(eglot--server-client/registerCapability): Fix bug when replying with
	wrong id.
	(eglot--xref-reset-known-symbols): Take DUMMY arg.

2018-05-07  João Távora  <joaotavora@gmail.com>

	Half-decent xref support

	* eglot.el
	(eglot--xref-known-symbols): New hacky var.
	(eglot--xref-reset-known-symbols): New helper.
	(xref-find-definitions, xref-find-references): Advise after to call the
	new helper.
	(xref-backend-identifier-completion-table): Rework.
	(eglot--xref-make): New helper.
	(xref-backend-definitions): Use it.
	(xref-backend-references, xref-backend-apropos): Implement.
	(eglot--obj): Add a debug spec.
	(eglot--lambda): Add debug spec.

2018-05-05  João Távora  <joaotavora@gmail.com>

	Very basic xref support

	* eglot.el (eglot--pos-to-lisp-position): Move up.
	(eglot--mapply, eglot--lambda): New helpers.
	(eglot--uri-to-path): New helper.
	(eglot--managed-mode): Manage xref-backend-functions.
	(eglot-xref-backend): New function.
	(xref-backend-identifier-completion-table)
	(xref-backend-identifier-at-point)
	(xref-backend-definitions): New methods.
	(xref-backend-references)
	(xref-backend-apropos): New methods, still unimplemented.

2018-05-05  João Távora  <joaotavora@gmail.com>

	New helper eglot--sync-request

	This should help with xref definitions

	* eglot.el (eglot--request): Rework a bit. Continuation is always 
	cleared on timeout, regardless of user-supplied fn.
	(eglot--sync-request): New function.
	(eglot--process-receive): watch out for vector results.

2018-05-05  João Távora  <joaotavora@gmail.com>

	Cleanup mistake with TextDocumentItem and TextDocumentIdentifier

	Also introduce eglot--path-to-uri

	* eglot.el (eglot--path-to-uri): Rename from eglot--uri and rework.
	(eglot--connect): Use it.
	(eglot--current-buffer-TextDocumentIdentifier): New function.
	(eglot--current-buffer-VersionedTextDocumentIdentifier)
	(eglot--signal-textDocument/didChange)
	(eglot--signal-textDocument/didClose)
	(eglot--signal-textDocument/willSave)
	(eglot--signal-textDocument/didSave): Use it.

2018-05-04  João Távora  <joaotavora@gmail.com>

	Handle dynamic registration in general (but nothing specific yet)

	* eglot.el (eglot--server-client/registerCapability): Implement.
	(eglot--register-workspace/didChangeWatchedFiles): Dummy registrator.

2018-05-04  João Távora  <joaotavora@gmail.com>

	Honour textDocumentSync

	* eglot.el (eglot--signal-textDocument/didChange): Honour
	textDocumentSync

2018-05-04  João Távora  <joaotavora@gmail.com>

	Be quite explicit about our lack of capabilities right now

	* eglot.el (eglot--client-capabilities): Spread out.

2018-05-04  João Távora  <joaotavora@gmail.com>

	Use rootUri instead of rootPath

	* eglot.el (eglot--connect)
	(eglot--current-buffer-VersionedTextDocumentIdentifier): Use eglot--uri.
	(eglot--uri): New function.

2018-05-04  João Távora  <joaotavora@gmail.com>

	Make reported capabilities into its own function

	* eglot.el (eglot--client-capabilities): New function.
	(eglot--connect): Use it.

2018-05-04  João Távora  <joaotavora@gmail.com>

	Include source info in diagnostics

	* eglot.el (eglot--server-textDocument/publishDiagnostics): Include
	source info.

2018-05-04  João Távora  <joaotavora@gmail.com>

	Reply to client/registerCapability (don't handle it yet)

	* eglot.el (eglot--server-client/registerCapability): New function.

2018-05-04  João Távora  <joaotavora@gmail.com>

	Handle requests from server correctly

	* eglot.el (eglot--process-receive): Redesign.
	(eglot--process-send): Take REPLY arg. Discover if message is error.
	(eglot--reply): new function
	(eglot--log-event): Tweak docstring.
	(eglot--process-receive): Reply with -32601 if unimplemented.
	(eglot--server-window/showMessageRequest)
	(eglot--server-client/registerCapability): Use eglot--reply

2018-05-04  João Távora  <joaotavora@gmail.com>

	Don't auto-reconnect if last attempt lasted less than 3 seconds

	* eglot.el (eglot--inhibit-auto-reconnect): New var.
	(eglot--process-sentinel): Use it.

2018-05-04  João Távora  <joaotavora@gmail.com>

	Workaround RLS's regusal to treat nil as empty json object

	* eglot.el (eglot--connect): Use dummy params.

2018-05-04  João Távora  <joaotavora@gmail.com>

	eglot-editing-mode becomes eglot--managed-mode

	* eglot.el (eglot--sentinel): Use eglot--managed-mode.
	(eglot--managed-mode-map): Renamed from eglot-editing-mode-map.
	(eglot--managed-mode): Renamed from eglot-editing-mode.
	(eglot-mode): Simplify.
	(eglot--buffer-managed-p): New function.
	(eglot--maybe-activate-editing-mode): Simplify.

2018-05-04  João Távora  <joaotavora@gmail.com>

	Make M-x eglot's interactive spec a separate function

	* eglot.el (eglot--interactive): New function.
	(eglot): Rework a little.

2018-05-04  João Távora  <joaotavora@gmail.com>

	When user declines to reconnect, first quit existing server

	* eglot.el (eglot): Rework reconnection logic.

2018-05-04  João Távora  <joaotavora@gmail.com>

	Connect to LSP server via TCP

	* eglot.el (eglot--make-process): Rename from eglot-make-local-process.
	(eglot): Fix docstring and rework.
	(eglot--bootstrap-fn): Remove
	(eglot--contact): New process-local var.
	(eglot--connect): Take CONTACT arg.
	(eglot--reconnect): Rework.

2018-05-04  João Távora  <joaotavora@gmail.com>

	More correctly keep track of didOpen/didClose per buffer

	* eglot.el (eglot--buffer-open-count): Now a process-local var.
	(eglot--signal-textDocument/didOpen,
	eglot--signal-textDocument/didClose): Use it.

2018-05-04  João Távora  <joaotavora@gmail.com>

	Fix mode-line mouse-clicks from outside selected window

	* eglot.el (eglot--mode-line-call): New helper.
	(eglot--mode-line-format): Use it.

2018-05-04  João Távora  <joaotavora@gmail.com>

	* eglot.el (eglot--process-receive): Skip null method notifs.

2018-05-04  João Távora  <joaotavora@gmail.com>

	Update README.md

2018-05-03  João Távora  <joaotavora@gmail.com>

	Trim some edges and add a bunch of boring RPC methods

	* eglot.el (eglot--connect): Don't call eglot--protocol-initialize.
	(eglot--process-filter): Break long line.
	(eglot--process-receive): Also pass id to handler if a server request.
	(eglot--log): New helper.
	(eglot-editing-mode): Manage before-revert-hook, after-revert-hook,
	before-save-hook, after-save-hook.
	(eglot--protocol-initialize): Removed.
	(eglot--server-window/showMessage): Simplify.
	(eglot--server-window/showMessageRequest)
	(eglot--server-window/logMessage, eglot--server-telemetry/event): New
	handlers.
	(eglot--signal-textDocument/willSave)
	(eglot--signal-textDocument/didSave): New notifications.
	(eglot--signal-textDocument/didOpen)
	(eglot--signal-textDocument/didClose): Check eglot--buffer-open-count.
	(eglot--buffer-open-count): New var.

2018-05-03  João Távora  <joaotavora@gmail.com>

	Fix a couple of Rust-related edge cases

	* eglot.el (eglot--server-window/progress): Allow other keys.
	(eglot--server-textDocument/publishDiagnostics): Allow :group in
	diagnostic spec.

2018-05-03  João Távora  <joaotavora@gmail.com>

	Fix textDocument/didChange

	* eglot.el (eglot-editing-mode): Manage before-change-functions.
	(eglot--recent-changes): Deleted.
	(eglot--recent-before-changes): New var.
	(eglot--recent-after-changes): Renamed from eglot--recent-changes.
	(eglot--pos-to-lsp-position, eglot--before-change): New helpers.
	(eglot--after-change): Rework.
	(eglot--signal-textDocument/didChange): Rework.

2018-05-03  João Távora  <joaotavora@gmail.com>

	Rename RPC methods for clarity

	* eglot.el (eglot--process-receive): Search for RPC server methods under
	`eglot--server-'
	(eglot-editing-mode, eglot--maybe-activate-editing-mode): Use new signal
	names.
	(eglot--server-window/showMessage): Rename from 
	eglot--window/showMessage.
	(eglot--server-textDocument/publishDiagnostics): Renamed from 
	eglot--textDocument/publishDiagnostics.
	(eglot--current-buffer-versioned-identifier): Remove.
	(eglot--current-buffer-VersionedTextDocumentIdentifier): Use 
	eglot--versioned-identifier.
	(eglot--signal-textDocument/didChange): Renamed from 
	eglot--maybe-signal-didChange.
	(eglot--signal-textDocument/didOpen): Renamed from eglot--signalDidOpen.
	(eglot--signal-textDocument/didClose): Rename from 
	eglot--signalDidClose.
	(eglot-flymake-backend): Call eglot--signal-textDocument/didChange.
	(eglot--server-window/progress): Rename from eglot--window/progress.

2018-05-03  João Távora  <joaotavora@gmail.com>

	Reorganize file

	* eglot.el (eglot-mode-line): Move up.
	(eglot-make-local-process, eglot--all-major-modes, eglot--obj)
	(eglot--project-short-name, eglot--all-major-modes)
	(eglot-reconnect, eglot--maybe-activate-editing-mode)
	(eglot--protocol-initialize)
	(eglot--window/showMessage, eglot--current-flymake-report-fn)
	(eglot--unreported-diagnostics)
	(eglot--textDocument/publishDiagnostics, eglot--signalDidOpen)
	(eglot--signalDidClose): Move around.
	(eglot-quit-server): Renamed to eglot-shutdown.
	(eglot-shutdown): New function

2018-05-03  João Távora  <joaotavora@gmail.com>

	Delete two useless forward declarations

	* eglot.el (eglot-mode, eglot-editing-mode-map): Remove forward decls.

2018-05-03  João Távora  <joaotavora@gmail.com>

	Fix Flymake diagnostic positions

	It's better not to use flymake-diag-region here.

	* eglot.el (eglot--textDocument/publishDiagnostics): Calculate position
	by hand.

2018-05-03  João Távora  <joaotavora@gmail.com>

	Must re-announce didOpen after reconnect

	* eglot.el (eglot-reconnect): Also call 
	eglot--maybe-activate-editing-mode for all buffers.

2018-05-03  João Távora  <joaotavora@gmail.com>

	Fix another Flymake sync bug

	* eglot.el (eglot-flymake-backend): Only report unreported sometimes.
	(eglot--maybe-activate-editing-mode): Start flymake explicitly when
	didOpen.
	(eglot--textDocument/publishDiagnostics): No need to set 
	unreported-diagnostics to nil.
	(flymake): Require it.

2018-05-03  João Távora  <joaotavora@gmail.com>

	Make M-x eglot the main entry point

	* eglot.el (eglot-new-process): Removed
	(eglot): Rename from eglot-new-process.
	(eglot-editing-mode): Mention M-x eglot

	* README.md: Use M-x eglot

2018-05-03  João Távora  <joaotavora@gmail.com>

	Fix assorted bugs

	* eglot.el (eglot--special-buffer-process): Must be buffer-local.
	(eglot--define-process-var): Fix disaster waiting to happen.
	(eglot--process-receive): Explicitly pass PROC to 
	eglot--pending-continuations.
	(eglot--textDocument/publishDiagnostics): Clear unreported diagnostics

2018-05-03  João Távora  <joaotavora@gmail.com>

	Watch for files opened under umbrella of existing process

	* eglot.el (eglot--connect): Call success-fn with a proc.
	(eglot-reconnect): Adapt to new eglot--connect.
	(eglot-new-process): Call eglot--maybe-activate-editing-mode
	(eglot--maybe-activate-editing-mode): New function.
	(find-file-hook): Add it here.

2018-05-03  João Távora  <joaotavora@gmail.com>

	Multiple servers per project are possible

	A server manages a specific major-mode within a project.

	* eglot.el (eglot--processes-by-project): Add docstring.
	(eglot--current-process): Search new eglot--processes-by-project format.
	(eglot--major-mode): New variable.
	(eglot--moribund, eglot--project): Update docstring.
	(eglot--project-short-name, eglot--all-major-modes): New helpers.
	(eglot--connect): Rework.
	(eglot-new-process): Rework severely.
	(eglot--command-history): New variable.
	(eglot--process-sentinel): Use new eglot--processes-by-project. Update
	mode line.
	(eglot-editing-mode): Don't start processes, just suggest it.

2018-05-03  João Távora  <joaotavora@gmail.com>

	Appease checkdoc.el

	* eglot.el (eglot--process-send, eglot--next-request-id)
	(eglot--current-buffer-VersionedTextDocumentIdentifier)
	(eglot--current-buffer-TextDocumentItem)
	(eglot--after-change, eglot--signalDidOpen)
	(eglot--signalDidClose, eglot--maybe-signal-didChange): Add docstring.

2018-05-03  João Távora  <joaotavora@gmail.com>

	Simplify flymake integration

	And get rid of the ridiculous environment thingy

	* eglot.el (eglot--process-sentinel): Continuations are triplets.
	(eglot--environment-vars, eglot--environment): Remove.
	(eglot--process-receive): Simplify.
	(eglot--unreported-diagnostics): New variable.
	(eglot--textDocument/publishDiagnostics): Simplify.
	(eglot-flymake-backend): Report unreported diagnostics.

2018-05-03  João Távora  <joaotavora@gmail.com>

	Signal textDocument/didClose

	* eglot.el (eglot-editing-mode): Signal didClose.
	(eglot--signalDidClose): New.

2018-05-03  João Távora  <joaotavora@gmail.com>

	Rework connection restarting again

	Quitting a process removes it from the project.

	* eglot.el (eglot-editing-mode,eglot-mode): Forward declare.
	(eglot--project): New process-local var.
	(eglot--connect): Takes a project.
	(eglot-new-process): Rework.
	(eglot--sentinel): Remove proc from eglot--processes-by-project.

2018-05-03  João Távora  <joaotavora@gmail.com>

	Redesign and simplify parser

	Fix horrible bugs. This is the correct way.

	* eglot.el (eglot--process-filter): Redesign.

2018-05-02  João Távora  <joaotavora@gmail.com>

	Auto-reconnect on unexpected connection loss

	* eglot.el (eglot-reconnect): Only quit if indeed not quit already.
	(eglot-new-process): Burn the command in the bootstrap fn.
	(eglot--process-sentinel): Automatically reconnect if closed 
	unexpectedly.
	(eglot--warn): Also message to *Messages*

2018-05-02  João Távora  <joaotavora@gmail.com>

	Ready to start fixing flymake integration

	* eglot.el (eglot-editing-mode): Turn on flymake-mode.
	(eglot-flymake-backend): Always start by reporting no diagnostics.
	(eglot--textDocument/publishDiagnostics): No annoying message.

2018-05-02  João Távora  <joaotavora@gmail.com>

	Slightly more user friendly start

	* eglot.el (eglot-new-process): signal DidOpen for every file in
	project.
	(eglot-editing-mode): Offer to start process.

2018-05-02  João Távora  <joaotavora@gmail.com>

	Don't clutter UI with warnings

	* eglot.el (warnings): require it.
	(eglot--warn): set warning-minimum-level

2018-05-02  João Távora  <joaotavora@gmail.com>

	Rework commands for connecting and reconnecting

	* eglot.el (eglot--current-process-or-lose): Add doc.
	(eglot--command): Remove.
	(eglot--bootstrap-fn): New process-local variable.
	(eglot--connect): Redesign.
	(eglot-make-local-process): New function.
	(eglot-reconnect): New interactive command.
	(eglot-new-process): Redesign.
	(eglot--process-sentinel): Add doc.
	(eglot--protocol-initialize): Rework.
	(eglot--mode-line-format): Use eglot-reconnect.

2018-05-02  João Távora  <joaotavora@gmail.com>

	Less obstrusive flymake stuff for now

	* eglot.el (eglot--after-change, eglot-flymake-backend): Fix.

2018-05-02  João Távora  <joaotavora@gmail.com>

	Events buffer uses eglot-mode, source buffers use eglot-editing-mode

	* eglot.el (eglot--special-buffer-process): New var.
	(eglot--current-process): Consider eglot--special-buffer-process.
	(eglot-events-buffer): Use eglot-mode
	(eglot-editing-mode): New minor mode.
	(eglot-mode): Turns on eglot-editing-mode maybe.

2018-05-02  João Távora  <joaotavora@gmail.com>

	Change status to error everytime an error is found

	* eglot.el (eglot--process-receive): Also set error status.
	(eglot--request): Fix a compilation warning.

2018-05-02  João Távora  <joaotavora@gmail.com>

	Correctly report what we currently are capable of

	Which is almost nothing.

	* eglot.el (eglot--protocol-initialize): Clean up.

2018-05-02  João Távora  <joaotavora@gmail.com>

	Add eglot-clear-status interactive command

	* eglot.el (eglot-clear-status): New
	(eglot-forget-pending-continuations): Fix bug.
	(eglot--mode-line-format): Add link to eglot-clear-status.

2018-05-02  João Távora  <joaotavora@gmail.com>

	Auto update mode-line after setting some process properties

	* eglot.el (eglot--define-process-var): Rework.
	(eglot--short-name, eglot--spinner, eglot--status): Update mode-line 
	after setting it.

2018-05-02  João Távora  <joaotavora@gmail.com>

	Start experimenting with python

	* eglot.el (eglot-executables): Add pyls.

2018-05-02  João Távora  <joaotavora@gmail.com>

	Don't switch to possibly dead buffer in sentinel

	* eglot.el (eglot--process-sentinel): Don't with-current-buffer.

2018-05-02  João Távora  <joaotavora@gmail.com>

	Report server status in the mode-line

	* eglot.el (eglot--status): New var.
	(eglot--log-event): Try to be more useful for other stuff.
	(eglot--protocol-initialize): Set status to nil on successful connect.
	(eglot--window/showMessage): Set status to error if needed.
	(eglot--mode-line-format): Display status if serious.

2018-05-01  João Távora  <joaotavora@gmail.com>

	Implement spinners and RLS's window/progress

	* eglot.el (eglot--window/progress): New.
	(eglot--mode-line-format): Rework.
	(eglot--snpinner): New var.
	(compile): require it.

2018-05-01  João Távora  <joaotavora@gmail.com>

	Fix parser to accept multiple messages in one chunk

	* eglot.el (eglot--process-filter): Redesign slightly.
	(eglot--message-mark): Remove. don't need this.

2018-05-01  João Távora  <joaotavora@gmail.com>

	Lay groundwork for uniform treatment of network connections

	* eglot.el (eglot--connect): New helper.
	(eglot-new-process): Use it.
	(pcase): Require it.

2018-05-01  João Távora  <joaotavora@gmail.com>

	Doc fixes

	* eglot.el (eglot-mode-map): Move up before minor mode.

2018-05-01  João Távora  <joaotavora@gmail.com>

	* eglot.el (eglot-mode-map): Move up before minor mode.

2018-04-30  João Távora  <joaotavora@gmail.com>

	Start working on this again

	* eglot.el (url-util): Require it.
	(eglot--process-sentinel): pending continuations now are quads (added
	env).
	(eglot--process-filter): Unwind message markers correctly if handling
	fails.
	(eglot--obj): Simple macro.
	(eglot--log-event): Add some info to logged event.
	(eglot--environment-vars, eglot--environment): Helper vars.
	(eglot--process-receive): Improve.
	(eglot--process-send): Niver log.
	(eglot--request): Use eglot--obj. Add environment.
	(eglot--notify): New helper.
	(eglot--protocol-initialize): RLS must like file://
	(eglot--current-flymake-report-fn): New var.
	(eglot--textDocument/publishDiagnostics): Use flymake from Emacs 26.
	(eglot-mode): Proper minor mode.
	(eglot--recent-changes, eglot--versioned-identifier): New stuff.
	(eglot--current-buffer-versioned-identifier)
	(eglot--current-buffer-VersionedTextDocumentIdentifier)
	(eglot--current-buffer-TextDocumentItem, eglot--after-change)
	(eglot--signalDidOpen, eglot--maybe-signal-didChange): New stuff.
	(eglot-flymake-backend): More or less a flymake backend function.

2018-04-30  João Távora  <joaotavora@gmail.com>

	Fix mode line

	* eglot.el (mode-line-misc-info): conditionalize to eglot-mode

2018-04-30  João Távora  <joaotavora@gmail.com>

	Fix some byte-compilation warnings

2017-08-16  João Távora  <joaotavora@gmail.com>

	Overhaul async mechanism safety

2017-08-16  João Távora  <joaotavora@gmail.com>

	Simplify `eglot--protocol-initialize`

	* eglot.el (eglot--protocol-initialize): Simplify

2017-08-16  João Távora  <joaotavora@gmail.com>

	Experimental diagnostic overlays

2017-08-16  João Távora  <joaotavora@gmail.com>

	Minor cleanup

2017-08-16  JoÃ£o TÃ¡vora  <joaotavora@gmail.com>

	Cancel timeouts when process dies unexpectedly

2017-08-16  João Távora  <joaotavora@gmail.com>

	Organize a bit

2017-08-16  João Távora  <joaotavora@gmail.com>

	Improve `eglot--current-process'

2017-08-16  João Távora  <joaotavora@gmail.com>

	Handle notifications

2017-08-16  João Távora  <joaotavora@gmail.com>

	Introduce and use `eglot--current-process-or-lose'

2017-08-16  João Távora  <joaotavora@gmail.com>

	Add a mode-line construct and some minor fanciness

2017-08-16  João Távora  <joaotavora@gmail.com>

	Rename eglot--continuations eglot--pending-continuations

2017-08-16  João Távora  <joaotavora@gmail.com>

	Remove a couple of comments

2017-08-16  João Távora  <joaotavora@gmail.com>

	Initial commit

