terrortylor / nvim-comment

A comment toggler for Neovim, written in Lua
MIT License
479 stars 23 forks source link

Zig files get the wrong style of comments #34

Closed pepijno closed 3 years ago

pepijno commented 3 years ago

When commenting lines in a zig file the comment style used is /* ... */ but zig comments should use // ....

sanchay9 commented 3 years ago

You can change this with ftplugin. Create a file called zig.lua inside ~/.config/nvim/after/ftplugin/ and add this line to it: vim.cmd[[setlocal commentstring=//\ %s]]

pepijno commented 3 years ago

Thanks! That did the trick.