Skip to content

Commit d4d66ed

Browse files
committed
Merge branch dev into published
2 parents 3409cc5 + da815fa commit d4d66ed

7 files changed

Lines changed: 69 additions & 15 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ Changes to Calva.
44

55
## [Unreleased]
66

7+
## [2.0.586] - 2026-05-09
8+
9+
- Fix: [Prevent calva from breaking other debugging session](https://github.com/BetterThanTomorrow/calva/pull/2936)
10+
- [Add built-in Glojure Jack-in and Connect Sequences](https://github.com/BetterThanTomorrow/calva/issues/3103)
11+
712
## [2.0.585] - 2026-05-08
813

914
- Fix: [clojure-lsp fails to start when the latest version cannot be downloaded](https://github.com/BetterThanTomorrow/calva/issues/3211)

package-lock.json

Lines changed: 9 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "Calva: Clojure & ClojureScript Interactive Programming",
44
"description": "Integrated REPL, formatter, Paredit, and more. Powered by cider-nrepl and clojure-lsp.",
55
"icon": "assets/calva.png",
6-
"version": "2.0.585",
6+
"version": "2.0.586",
77
"publisher": "betterthantomorrow",
88
"author": {
99
"name": "Better Than Tomorrow",
@@ -102,6 +102,7 @@
102102
".boot",
103103
".bb",
104104
".lg",
105+
".glj",
105106
".ly",
106107
".lpy",
107108
".jank",
@@ -738,6 +739,7 @@
738739
"enum": [
739740
"Leiningen",
740741
"deps.edn",
742+
"clj-projectless",
741743
"shadow-cljs",
742744
"lein-shadow",
743745
"Gradle",
@@ -746,11 +748,11 @@
746748
"scittle",
747749
"squint",
748750
"basilisp",
749-
"let-go",
750751
"epupp",
751752
"joyride",
753+
"let-go",
754+
"glojure",
752755
"generic",
753-
"clj-projectless",
754756
"custom",
755757
"cljs-only"
756758
]

src/debugger/calva-debug.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,15 @@ class CalvaDebugAdapterDescriptorFactory implements vscode.DebugAdapterDescripto
454454
}
455455
}
456456

457+
function calvaDebugSession(session: vscode.DebugSession) {
458+
return session?.type === CALVA_DEBUG_CONFIGURATION.type;
459+
}
460+
457461
function onNreplMessage(data: any): void {
462+
if (!calvaDebugSession(vscode.debug.activeDebugSession)) {
463+
return;
464+
}
465+
458466
if (vscode.debug.activeDebugSession && (data['value'] || data['err'])) {
459467
annotations.clearAllEvaluationDecorations();
460468
void vscode.debug.activeDebugSession.customRequest(REQUESTS.SEND_TERMINATED_EVENT);
@@ -485,7 +493,7 @@ function handleNeedDebugInput(response: any): void {
485493
}
486494

487495
vscode.debug.onDidStartDebugSession((session) => {
488-
if (session.type != CALVA_DEBUG_CONFIGURATION.type) {
496+
if (!calvaDebugSession(session)) {
489497
return;
490498
}
491499

@@ -506,6 +514,10 @@ function initializeDebugger(cljSession: nrepl.NReplSession): void {
506514
}
507515

508516
function terminateDebugSession(): void {
517+
if (!calvaDebugSession(vscode.debug.activeDebugSession)) {
518+
return;
519+
}
520+
509521
if (vscode.debug.activeDebugSession) {
510522
void vscode.debug.activeDebugSession.customRequest(REQUESTS.SEND_TERMINATED_EVENT);
511523
}

src/nrepl/connect-sequence-types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ enum ProjectTypes {
88
'nbb' = 'nbb',
99
'basilisp' = 'basilisp',
1010
'let-go' = 'let-go',
11+
'glojure' = 'glojure',
1112
'joyride' = 'joyride',
1213
'scittle' = 'scittle',
1314
'squint' = 'squint',

src/nrepl/connectSequence.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,14 @@ const letGoBuiltIns: csTypes.ReplConnectSequence[] = [
191191
},
192192
];
193193

194+
const glojureBuiltIns: csTypes.ReplConnectSequence[] = [
195+
{
196+
name: 'glojure',
197+
projectType: csTypes.ProjectTypes['glojure'],
198+
cljsType: csTypes.CljsTypes.none,
199+
},
200+
];
201+
194202
const epuppBuiltIns: csTypes.ReplConnectSequence[] = [
195203
{
196204
name: 'epupp',
@@ -213,6 +221,7 @@ const builtInSequences = {
213221
nbb: nbbBuiltIns,
214222
basilisp: basilispBuiltIns,
215223
'let-go': letGoBuiltIns,
224+
glojure: glojureBuiltIns,
216225
joyride: joyrideBuiltIns,
217226
scittle: scittleBuiltIns,
218227
squint: squintBuiltIns,

src/nrepl/project-types.ts

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,31 @@ const projectTypes: { [id: string]: ProjectType } = {
735735
};
736736
},
737737
},
738+
glojure: {
739+
name: 'glojure',
740+
cmd: ['glj'],
741+
winCmd: ['glj'],
742+
processShellUnix: true,
743+
processShellWin: true,
744+
useWhenExists: [],
745+
defaultNReplPortFile: ['.glj-nrepl-port'],
746+
defaultReplSessionNames: { primary: 'glj' },
747+
defaultFilePatterns: {
748+
primary: {
749+
'always-claim': ['*.glj'],
750+
'is-fallback-for': ['**/*.glj', '**/*.clj'],
751+
},
752+
},
753+
commandLine: async (
754+
_connectSequence: connectSequences.ReplConnectSequence,
755+
_cljsType: connectSequences.CljsTypes
756+
) => {
757+
return {
758+
args: ['--nrepl'],
759+
substitutions: {},
760+
};
761+
},
762+
},
738763
joyride: {
739764
name: 'joyride',
740765
cmd: [],
@@ -1080,12 +1105,13 @@ export async function detectProjectTypes(): Promise<string[]> {
10801105
'clj-projectless',
10811106
'cljs-only',
10821107
'babashka',
1083-
'let-go',
10841108
'nbb',
10851109
'joyride',
10861110
'scittle',
10871111
'squint',
10881112
'epupp',
1113+
'glojure',
1114+
'let-go',
10891115
'custom',
10901116
'generic',
10911117
];

0 commit comments

Comments
 (0)