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

Nix: line comment command uses /*%s*/ instead of #%s #63

Closed
ymarkus opened this issue Nov 3, 2021 · 2 comments
Closed

Nix: line comment command uses /*%s*/ instead of #%s #63

ymarkus opened this issue Nov 3, 2021 · 2 comments
Labels
invalid This doesn't seem right

Comments

@ymarkus
Copy link

ymarkus commented Nov 3, 2021

If I try to add a line comment in a nix file by using gcc, the line will be changed like this:

/*{ plugin = headwind-nvim; config = "lua require'headwind'.setup{}"; }*/

instead of this:

#{ plugin = headwind-nvim; config = "lua require'headwind'.setup{}"; }

If I add this to my config:

local ft = require('Comment.ft')
ft.nix = {'#%s', '/*%s*/'}

it now works properly.

@numToStr
Copy link
Owner

numToStr commented Nov 3, 2021

What's the filetype of your file? The nix commentstring is already there and is the same as you mentioned.

Edit: I just checked and it works fine for me.

@ymarkus
Copy link
Author

ymarkus commented Nov 3, 2021

You're right, sorry. Seems to have been an issue on my end. I tried some stuff and now it works out of the box, thanks anyway!
Not quite sure what the exact issue was, though...

@ymarkus ymarkus closed this as completed Nov 3, 2021
@numToStr numToStr added the invalid This doesn't seem right label Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants