Skip to content

Commit af4666c

Browse files
committed
several updates
1 parent 0ca0d74 commit af4666c

File tree

4 files changed

+34
-38
lines changed

4 files changed

+34
-38
lines changed

lib/package/commands.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ module.exports =
124124
'julia-client:work-in-current-folder': (ev) ->
125125
requireClient 'change working folder', ->
126126
juno.runtime.evaluation.cdHere(ev.target)
127-
'julia-client:activate-current-folder': (ev) ->
127+
'julia-client:activate-environment-in-current-folder': (ev) ->
128128
requireClient 'activate an environment', ->
129129
juno.runtime.evaluation.activateProject(ev.target)
130130
'julia-client:activate-default-environment': (ev) ->

lib/package/menu.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ module.exports =
4444
{
4545
label: 'Environment',
4646
submenu: [
47-
{label: 'Current File\'s Folder', command: 'julia-client:activate-current-folder'}
47+
{label: 'Environment in Current File\'s Folder', command: 'julia-client:activate-environment-in-current-folder'}
4848
{label: 'Default Environment', command: 'julia-client:activate-default-environment'}
4949
]
5050
}

lib/runtime/console.js

Lines changed: 30 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,21 @@ export function activate (_ink) {
3535

3636
process.env['TERM'] = 'xterm-256color'
3737

38-
subs.add(atom.config.observe('julia-client.consoleOptions.whitelistedKeybindingsREPL', (kbds) => {
39-
whitelistedKeybindingsREPL = kbds.map(s => s.toLowerCase())
40-
}))
41-
subs.add(atom.config.observe('julia-client.consoleOptions.whitelistedKeybindingsTerminal', (kbds) => {
42-
whitelistedKeybindingsTerminal = kbds.map(s => s.toLowerCase())
43-
}))
44-
subs.add(atom.config.observe('julia-client.consoleOptions.cursorStyle', updateTerminalSettings))
45-
subs.add(atom.config.observe('julia-client.consoleOptions.maximumConsoleSize', updateTerminalSettings))
46-
subs.add(atom.config.observe('julia-client.consoleOptions.macOptionIsMeta', updateTerminalSettings))
47-
subs.add(atom.config.observe('julia-client.consoleOptions.rendererType', updateTerminalSettings))
48-
subs.add(atom.config.observe('julia-client.consoleOptions.cursorBlink', updateTerminalSettings))
38+
subs.add(
39+
atom.config.observe('julia-client.consoleOptions.whitelistedKeybindingsREPL', (kbds) => {
40+
whitelistedKeybindingsREPL = kbds.map(s => s.toLowerCase())
41+
}),
42+
atom.config.observe('julia-client.consoleOptions.whitelistedKeybindingsTerminal', (kbds) => {
43+
whitelistedKeybindingsTerminal = kbds.map(s => s.toLowerCase())
44+
}),
45+
atom.config.observe('julia-client.consoleOptions.cursorStyle', updateTerminalSettings),
46+
atom.config.observe('julia-client.consoleOptions.maximumConsoleSize', updateTerminalSettings),
47+
atom.config.observe('julia-client.consoleOptions.macOptionIsMeta', updateTerminalSettings),
48+
atom.config.observe('julia-client.consoleOptions.rendererType', updateTerminalSettings),
49+
atom.config.observe('julia-client.consoleOptions.cursorBlink', updateTerminalSettings)
50+
)
4951

5052
terminal = ink.InkTerminal.fromId('julia-terminal', terminalOptions())
51-
5253
terminal.setTitle('REPL', true)
5354
terminal.class = 'julia-terminal'
5455

@@ -109,8 +110,8 @@ export function activate (_ink) {
109110
if (promptObserver) promptObserver.dispose()
110111
})
111112

112-
// repl commands
113113
subs.add(
114+
// repl commands
114115
atom.commands.add('atom-workspace', {
115116
'julia-client:open-REPL': () => {
116117
open().then(() => terminal.show())
@@ -125,24 +126,23 @@ export function activate (_ink) {
125126
atom.commands.dispatch(terminal.view, 'julia-client:interrupt-julia')
126127
}
127128
}
129+
}),
130+
// terminal commands
131+
atom.commands.add('atom-workspace', {
132+
'julia-client:new-terminal': () => {
133+
newTerminal()
134+
},
135+
'julia-client:new-terminal-from-current-folder': ev => {
136+
const dir = evaluation.currentDir(ev.target)
137+
if (!dir) return
138+
newTerminal(dir)
139+
},
140+
'julia-client:new-remote-terminal': () => {
141+
newRemoteTerminal()
142+
}
128143
})
129144
)
130145

131-
// terminal commands
132-
subs.add(atom.commands.add('atom-workspace', {
133-
'julia-client:new-terminal': () => {
134-
newTerminal()
135-
},
136-
'julia-client:new-terminal-from-current-folder': ev => {
137-
const dir = evaluation.currentDir(ev.target)
138-
if (!dir) return
139-
newTerminal(dir)
140-
},
141-
'julia-client:new-remote-terminal': () => {
142-
newRemoteTerminal()
143-
}
144-
}))
145-
146146
// handle deserialized terminals
147147
forEachPane(item => {
148148
if (!item.ty) {
@@ -351,11 +351,7 @@ export function deactivate () {
351351
item.detach()
352352
item.close()
353353
}, /terminal\-remote\-julia\-\d+/)
354-
if (terminal) {
355-
terminal.detach()
356-
}
357-
if (subs) {
358-
subs.dispose()
359-
}
354+
if (terminal) terminal.detach()
355+
if (subs) subs.dispose()
360356
subs = null
361357
}

menus/julia-client.cson

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
label: 'Juno',
2525
submenu: [
2626
{ label: 'Work in Folder', command: 'julia-client:work-in-current-folder' }
27-
{ label: 'Activate Project', command: 'julia-client:activate-current-folder' }
28-
{ label: 'New Terminal', command: 'julia-client:new-terminal-from-current-folder'}
27+
{ label: 'Activate Environment in Folder', command: 'julia-client:activate-environment-in-current-folder' }
28+
{ label: 'New Terminal from Folder', command: 'julia-client:new-terminal-from-current-folder'}
2929
]
3030
}
3131
{type: 'separator'}

0 commit comments

Comments
 (0)