nix-community / vscode-nix-ide

Nix language support for VSCode editor [maintainer: @jnoortheen]
https://marketplace.visualstudio.com/items?itemName=jnoortheen.nix-ide
MIT License
263 stars 20 forks source link

Commenting a line of code uses `//` instead of `#` #374

Closed soenkehahn closed 7 months ago

soenkehahn commented 7 months ago

When I edit a nix file and execute the 'Add Line Comment' through the command palette, it adds // in front of the line. That's not a valid nix comment though. It should add #.

Also, I'm not sure whether the commenting logic is done by this extension or by nil, the language server that I'm using. So maybe this is a nil bug? How do I find out?

jnoortheen commented 7 months ago

I think it should be using the extension's configuration https://github.com/nix-community/vscode-nix-ide/blob/f5db069a77f1dd968e963556c83657d334ddfdd0/language-configuration.json#L4 . You can test this by temporarily disabling the language server

soenkehahn commented 7 months ago

What you suggested didn't help, but while looking at the settings I realized I had another nix extension installed. Uninstalling that fixed this for me. Thanks and sorry for the noise!