Skip to content

Commit afcfee4

Browse files
committed
Connect command accepts 'auto' (will look for .nrepl-port file) (closes #82)
1 parent 9f049fb commit afcfee4

File tree

6 files changed

+36
-1
lines changed

6 files changed

+36
-1
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
### 2.11.0 - Jan 5, 2023
2+
3+
- Connect command accepts 'auto' (will look for `.nrepl-port` file) #82
4+
5+
### 2.10.0 - Jan 4, 2023
6+
7+
- Do not move cursor if error region visible on screen #73
8+
- Fixed: Wrong highlight of the source of error #79
9+
- Render sequential spaces #78
10+
- Fixed: Exceptions from evaluating buffer without a file name are not processed #18
11+
- Special case when CompilerError has wrong location info
12+
- Select whole line on error
13+
114
### 2.9.1 - Dec 3, 2022
215

316
- Added Main.sublime-menu #85 via @wundervaflja

Default (Linux).sublime-keymap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626

2727
// // Extras
2828

29+
// // Look for .nrepl-port file and try connection to port in it
30+
// {"keys": ["ctrl+alt+j"],
31+
// "command": "clojure_sublimed_connect",
32+
// "args": {"clojure_sublimed_host_port": "auto"}},
33+
2934
// // Toggle Stacktrace
3035
// {"keys": ["ctrl+alt+e"],
3136
// "command": "clojure_sublimed_toggle_trace",

Default (OSX).sublime-keymap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626

2727
// // Extras
2828

29+
// // Look for .nrepl-port file and try connection to port in it
30+
// {"keys": ["ctrl+j"],
31+
// "command": "clojure_sublimed_connect",
32+
// "args": {"clojure_sublimed_host_port": "auto"}},
33+
2934
// // Toggle Stacktrace
3035
// {"keys": ["ctrl+e"],
3136
// "command": "clojure_sublimed_toggle_trace",

Default (Windows).sublime-keymap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626

2727
// // Extras
2828

29+
// // Look for .nrepl-port file and try connection to port in it
30+
// {"keys": ["ctrl+alt+j"],
31+
// "command": "clojure_sublimed_connect",
32+
// "args": {"clojure_sublimed_host_port": "auto"}},
33+
2934
// // Toggle Stacktrace
3035
// {"keys": ["ctrl+alt+e"],
3136
// "command": "clojure_sublimed_toggle_trace",

package.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,8 @@ def preview(self, text):
831831

832832
def validate(self, text):
833833
text = text.strip()
834+
if "auto" == text:
835+
return True
834836
if re.fullmatch(r'[a-zA-Z0-9\.]+:\d{1,5}', text):
835837
host, port = text.split(':')
836838
port = int(port)
@@ -877,6 +879,8 @@ def is_enabled(self):
877879
class ClojureSublimedConnectCommand(sublime_plugin.ApplicationCommand):
878880
def run(self, clojure_sublimed_host_port):
879881
try:
882+
if clojure_sublimed_host_port == "auto":
883+
clojure_sublimed_host_port = ClojureSublimedHostPortInputHandler().initial_text()
880884
host, port = clojure_sublimed_host_port.strip().split(':', 1)
881885
port = int(port)
882886
except ValueError:

test_repl/error_syntax.clj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,7 @@
77

88
(defn h [])
99

10-
(let [x])
10+
(let [x])
11+
12+
(let [y 0]
13+
x)

0 commit comments

Comments
 (0)