From 441b6176c04ada532e6ed8ee32e2f727b53aae60 Mon Sep 17 00:00:00 2001 From: xvw Date: Mon, 6 Jan 2025 16:56:41 +0100 Subject: [PATCH] Add configuration note in the README --- README.md | 3 +++ ocaml-eglot.el | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1649cfc..aa17fd2 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,9 @@ are provided: - `ocaml-eglot-find-definition-in-current-window` - `ocaml-eglot-find-declaration-in-current-window` +The default behavior can also be configured using the +`ocaml-eglot-open-window-strategy` variable. + ### Jump to type definition of an expression You can also jump to the type definition of the expression at point. diff --git a/ocaml-eglot.el b/ocaml-eglot.el index 9fc2c3f..aa9386b 100644 --- a/ocaml-eglot.el +++ b/ocaml-eglot.el @@ -159,7 +159,8 @@ Otherwise, `merlin-construct' only includes constructors." (ocaml-eglot--find-declaration 'new)) (defun ocaml-eglot-find-declaration-in-current-window () - "Find the declaration of the identifier at point and show it the current window." + "Find the declaration of the identifier at point. +Show it the current window." (interactive) (ocaml-eglot--find-declaration 'current)) @@ -182,12 +183,14 @@ Otherwise, `merlin-construct' only includes constructors." (ocaml-eglot--find-type-definition ocaml-eglot-open-window-strategy)) (defun ocaml-eglot-find-type-definition-in-new-window () - "Find the definition of the type of the expression at point and show it in a new window." + "Find the definition of the type of the expression at point. +Show it in a new window." (interactive) (ocaml-eglot--find-type-definition 'new)) (defun ocaml-eglot-find-type-definition-in-current-window () - "Find the definition of the type of the expression at point and show it in the current window." + "Find the definition of the type of the expression at point. +Show it in the current window." (interactive) (ocaml-eglot--find-type-definition 'current))