Skip to content

Commit

Permalink
Add configuration note in the README
Browse files Browse the repository at this point in the history
  • Loading branch information
xvw committed Jan 6, 2025
1 parent 70f2b38 commit 441b617
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 6 additions & 3 deletions ocaml-eglot.el
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand All @@ -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))

Expand Down

0 comments on commit 441b617

Please sign in to comment.