b3nj5m1n/kommentary

Support for .toml

Chaitanyabsprip opened this issue ยท 15 comments

Kommentary comments lines the wrong way in .toml files. Found the bug while editing my starship prompt config file.

Hi, thanks for reporting, I'll fix it as soon as possible!

Should be fixed with 6a448bb, please try it out and close the issue if everything works.

it is still doing line comments with /* ....*/ it should be same as python with # ...

Did you update the plugin?

Edit: Sorry, my mistake, I'll fix it right away.

Should be fixed with 7429850, I apologise for the inconvenience.

Error detected while processing /home/chaitanya/.local/share/nvim/plugged/kommentary/plugin/kommentary.vim:
line    4:
E5108: Error executing lua [string ":lua"]:1: attempt to call field 'use_default_mappings' (a nil value)

Weird, that hasn't got anything to do with the changes I've made, I would guess that you're running an outdated version of the plugin somehow...

I would suggest reinstalling the plugin and seeing if that fixes the issue.

still is giving the same error and the .toml comment style isn't fixed yet

It's working fine for me, can you try with this minimal config? (Or provide a minimal config that isn't working for you)

vim.cmd [[packadd packer.nvim]]
return require('packer').startup(function()
    use 'b3nj5m1n/kommentary'
end)

Started with nvim -u testconfig.lua test.toml I get this:
Peek 2021-02-05 22-08

I add that in as lua code? in my init.vim?

Create a new file called testconfig.lua, put the code from above in there, then start neovim with this command: nvim -u testconfig.lua test.toml, which will load nvim with that config instead of your default one. This assumes that you're using packer as your package manager, you might have to adjust this, or just send me a minimal config with your plugin manager, and I'll try to find the issue there.

I installed packer, I made a file testconf.lua, put the above code in it and ran the command nvim -u testconf.lua test.toml then I put some text in test.toml and when I press gcc it does nothing.
Edit: I had not run the packer install and compile command. The plugin works as expected after doing that.

Did you install the plugin using PackerInstall? If you're not usually using Packer, you can just send me a minimal config using the plugin manager of your choice.

I tried it with a minimal config with vim-plug and it works fine.

works fine with my complete config too I don't know what the issue was... ๐Ÿค”