From 0655999a5bc8723db6c64d79444be1ef24563017 Mon Sep 17 00:00:00 2001 From: Mikeify Date: Tue, 24 Jun 2025 16:32:41 +1000 Subject: [PATCH] feat(cursor links): added cursor as an option to the KNOWN_EDITORS --- lib/better_errors/editor.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/better_errors/editor.rb b/lib/better_errors/editor.rb index 96ffc3f0..5dc85c75 100644 --- a/lib/better_errors/editor.rb +++ b/lib/better_errors/editor.rb @@ -4,6 +4,7 @@ module BetterErrors class Editor KNOWN_EDITORS = [ { symbols: [:atom], sniff: /atom/i, url: "atom://core/open/file?filename=%{file}&line=%{line}" }, + { symbols: [:cursor], sniff: /cursor/i, url: "cursor://file/%{file}:%{line}" }, { symbols: [:emacs, :emacsclient], sniff: /emacs/i, url: "emacs://open?url=file://%{file}&line=%{line}" }, { symbols: [:idea], sniff: /idea/i, url: "idea://open?file=%{file}&line=%{line}" }, { symbols: [:macvim, :mvim], sniff: /vim/i, url: "mvim://open?url=file://%{file_unencoded}&line=%{line}" }, @@ -80,7 +81,7 @@ def url(raw_path, line) else file = raw_path end - + url_proc.call(file, line) end