-
Notifications
You must be signed in to change notification settings - Fork 31
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
jump to wrong line in ruby #138
Comments
can't reproduce. make sure your are in Or else, add below line into your "~/.emacs", (evilmi-load-plugin-rules '(ruby-mode enh-ruby-mode your-rub-mode) '(simple ruby)) |
Thank you for your reply. I use doom Emacs ;; enable tree sitter highlight
(global-tree-sitter-mode)
(add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode)
;; enable evil-matchit
(global-evil-matchit-mode 1)
|
Only simple regex is used in ruby related code. Code should not be impacted by other plugins. What's the |
I can't reproduce the issue. What's |
I have the similar problem with you. I couldn't jump appropriately in OCaml. And our configuration is exactly the same. (global-tree-sitter-mode)
(add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode)
(global-evil-matchit-mode 1) |
@JohnsonLee-debug , could you give me more details? A sample ocaml file could help a lot |
My environment:
evilmi-version: 3.0.0 open Ordered
module type Heap = sig
module Elt : Comparable
type elt = Elt.t
type t
exception Empty
val empty : t
val is_empty : t -> bool
val insert : elt -> t -> t
val merge : t -> t -> t
val find_min : t -> elt
val delete_min : t -> t
end(* press '%' doesn't trigger any action *)
(* press '%' here, cursor is expected to jump to ')', but it jump to the end of 'module' *)
(*> LeftistHeaps <*)
module LeftistHeaps (Elt : Comparable) = struct
module Elt = ExtendCompare (Elt)
type elt = Elt.t
type t =
| E
| T of int * elt * t * t
exception Empty
let rank = function
| E -> 0
| T (r, _, _, _) -> r
;;
let rec merge a b =
let makeT x a b =
if rank a >= rank b then T (rank b + 1, x, a, b) else T (rank a + 1, x, b, a)
in
match a, b with
| h, E -> h
| E, h -> h
| (T (_, x, l1, r1) as h1), (T (_, y, l2, r2) as h2) ->
if Elt.leq x y then makeT x l1 (merge r1 h2) else makeT y l2 (merge r2 h1)
;;
let is_empty = function
| E -> true
| T _ -> false
;;
let empty = E
let insert x h = merge (T (1, x, E, E)) h
let find_min = function
| E -> raise Empty
| T (_, x, _, _) -> x
;;
let delete_min = function
| E -> raise Empty
| T (_, _, a, b) -> merge a b
;;
end |
Can't reproduce the issue. I've tried to toggle ocaml algorithm was not written by me. But looks code is straight forward, |
Maybe it is caused by something in doom emacs. I use doom like @leateng did. |
Please note I use If the api fails, it might be the bug of unstable tree-sitter or major mode. |
Try the new hook 2715515 add evilmi-jump-hook (Chen Bin) |
+1 – I'm having the same issue as @leateng & @JohnsonLee-debug. Similarly, I am using Doom Emacs. @redguardtoo I've tried the new |
Could you give me more details and some minimum example? evilmi version? Have you tested evil-matchit in vanllia emacs? Which package causes the issue? doom emacs version? I will download doomemacs and test. |
when curosr on line 8, press %, jump to line 5
The text was updated successfully, but these errors were encountered: