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

Calva uses ; for comments instead of ;;? #971

Closed
bpringe opened this issue Jan 20, 2021 · 8 comments
Closed

Calva uses ; for comments instead of ;;? #971

bpringe opened this issue Jan 20, 2021 · 8 comments
Labels
bug Something isn't working

Comments

@bpringe
Copy link
Member

bpringe commented Jan 20, 2021

Calva intends to use ;; for comments, but VS Code comes with a default Clojure extension which uses ; for comments, and this seems to be somehow being used on some people's systems when they run comment commands, though I'm not sure how. I have not seen this happen myself.

Please, if you are using Calva and you notice this on your system, comment here with system details like VS Code version, Calva version, and OS, so maybe we can figure this out.

Update by @PEZ: Calva can still win this race by us bundling a language configuration file. The way we do it today actually only works by luck, (I'm guessing something changed recently that makes Calva sometimes lose the race.)

@bpringe bpringe added the help wanted Extra attention is needed label Jan 20, 2021
@bpringe
Copy link
Member Author

bpringe commented Jan 20, 2021

@plexus
Copy link
Contributor

plexus commented Jan 21, 2021

I was indeed getting ; instead of ;;, my VS Code details:

Version: 1.52.1
Commit: ea3859d4ba2f3e577a159bc91e3074c5d85c0523
Date: 2020-12-16T16:32:10.090Z
Electron: 9.3.5
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Linux x64 5.8.0-36-generic

This is on Ubuntu, following these instructions (so using their dpkg archive, not the snap install).

Package: code
Priority: optional
Section: devel
Installed-Size: 266877
Maintainer: Microsoft Corporation <vscode-linux@microsoft.com>
Architecture: amd64
Version: 1.52.1-1608136922
Replaces: visual-studio-code
Provides: visual-studio-code
Depends: libnss3 (>= 2:3.26), gnupg, apt, libxkbfile1, libsecret-1-0, libgtk-3-0 (>= 3.10.0), libxss1, libgbm1
Conflicts: visual-studio-code
Filename: pool/main/c/code/code_1.52.1-1608136922_amd64.deb
Size: 64770102
MD5sum: ac76916bba522a1e204718350b64c464
SHA1: 79edec6fb583a7735e473bd57069421ba706c010
SHA256: eccdcaa756fa58947fa046f3a0b3420e8b93c22fb1d50de76f5d8a313a3f5fa4
SHA512: 4ff7ffb69c5084b5888c727c6eb58adcd6162cf022edc740e93b199226d2fab8332dac682496cffae27ea0e4936e23a18711d5a6d70e7c64cc04f87583cba60e
Description: Code editing. Redefined.
 Visual Studio Code is a new choice of tool that combines the simplicity of a code editor with what developers need for the core edit-build-debug cycle. See https://code.visualstudio.com/docs/setup/linux for installation instructions and FAQ.
Description-md5: b38f8538d3cead7a194af6aeeaf02e6a
Homepage: https://code.visualstudio.com/

To have a look at this package

wget https://az764295.vo.msecnd.net/stable/ea3859d4ba2f3e577a159bc91e3074c5d85c0523/code_1.52.1-1608136922_amd64.deb 
mkdir vscode
dpkg-deb -x code*.deb vscode
cat vscode/usr/share/code/resources/app/extensions/clojure/language-configuration.json

Then you can see that it contains

"comments":{"lineComment":";"}

@plexus
Copy link
Contributor

plexus commented Jan 21, 2021

I submitted an upstream PR https://github.com/microsoft/vscode-clojure/pull/1

Fingers crossed 🤞

@bpringe
Copy link
Member Author

bpringe commented Jan 21, 2021

Sweet, thanks for that. We'll leave this open with regard to the vscode issue Peter opened, since this seems to be an override issue that could affect other things.

@PEZ PEZ added bug Something isn't working and removed help wanted Extra attention is needed labels Jan 22, 2021
@PEZ
Copy link
Collaborator

PEZ commented Jan 22, 2021

I updated the description of this issue some. Pasting it here as well so that it is easier to discover by people who has already read the description:

Update: Calva can still win this race by us bundling a language configuration file. The way we do it today actually only works by luck, (I'm guessing something changed recently that makes Calva sometimes lose the race.)

@agoldhammer
Copy link
Contributor

At suggestion of @PEZ, I am leaving this here: after upgrade to 2.0.153, auto closing quotes no longer works on my Linux(WSL2, Ubuntu) setup. It does work on Mac, however. Setting editor.autoClosingQuote set to "language defined."

@PEZ
Copy link
Collaborator

PEZ commented Jan 23, 2021

Thanks. The fact that it behaves differently on your two machines suggests that it is the same root causea as for the comments.

@PEZ
Copy link
Collaborator

PEZ commented Jan 23, 2021

Here's a VSIX that should fix this issue, and possibly the one that @agoldhammer experiences as well:

https://clojurians.slack.com/files/U0ETXRFEW/F01K7NMJW23/calva-2.0.154-language-config.vsix

(CircleCI is down for maintenance, so this time a link that you need a Clojurians Slack account to reach.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants