Skip to content
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

Clojure extension dragons #1428

Merged
merged 1 commit into from
Dec 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
Changes to Calva.

## [Unreleased]
- Fix: [ Babashka Jack-In REPL doesn't show eval errors](https://github.com/BetterThanTomorrow/calva/issues/1413)
- Fix: [Babashka Jack-In REPL doesn't show eval errors](https://github.com/BetterThanTomorrow/calva/issues/1413)
- [Inform about conflict with the Clojure extension](https://github.com/BetterThanTomorrow/calva/issues/1427)


## [2.0.228] - 2021-12-02
- Revert: Parinfer Experimental
Expand Down
15 changes: 14 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,14 @@ async function activate(context: vscode.ExtensionContext) {
const pareEditExtension = vscode.extensions.getExtension('cospaia.paredit-revived');
const cwExtension = vscode.extensions.getExtension('tonsky.clojure-warrior');
const vimExtension = vscode.extensions.getExtension('vscodevim.vim');
const cwConfig = vscode.workspace.getConfiguration('clojureWarrior');
const clojureExtension = vscode.extensions.getExtension('avli.clojure');
const customCljsRepl = config.getConfig().customCljsRepl;
const replConnectSequences = config.getConfig().replConnectSequences;
const BUTTON_GOTO_DOC = "Open the docs";
const BUTTON_OK = "Got it";
const VIM_DOC_URL = "https://calva.io/vim/";
const VIEWED_VIM_DOCS = "viewedVimDocs";
const DONT_SHOW_CLOJURE_EXT_NAG = "dontShowClojureExtNag";
const CONNECT_SEQUENCES_DOC_URL = "https://calva.io/connect-sequences/";
const CALVA_DOCS_URL = "https://calva.io/";
const VIEWED_CALVA_DOCS = "viewedCalvaDocs";
Expand Down Expand Up @@ -313,6 +314,18 @@ async function activate(context: vscode.ExtensionContext) {
}
}

if (clojureExtension) {
chan.appendLine(`The Clojure Extension is installed.\n`);
if (!context.globalState.get(DONT_SHOW_CLOJURE_EXT_NAG)) {
vscode.window.showWarningMessage("You have the Clojure extension installed. Please note that it will conflict with Calva.", "Don't show again", 'OK')
.then(v => {
if (v == "Don't show again") {
context.globalState.update(DONT_SHOW_CLOJURE_EXT_NAG, true);
}
})
}
}

state.analytics().logPath("/activated").logEvent("LifeCycle", "Activated").send();

if (!cwExtension) {
Expand Down