folke / ts-comments.nvim

Tiny plugin to enhance Neovim's native comments
Apache License 2.0
321 stars 23 forks source link

How do I set up this plugin for Comment.nvim? #31

Closed 0xN1nja closed 3 months ago

0xN1nja commented 3 months ago

Currently, I am using JoosepAlviste/nvim-ts-context-commentstring, for which I am setting up with Comment.nvim like this:

"numToStr/Comment.nvim",
event = { "BufReadPre", "BufNewFile" },
opts = function()
    return {
        pre_hook = require("ts_context_commentstring.integrations.comment_nvim").create_pre_hook(),
    }
end,

But I am not able to understand how to set up your plugin? There isn't anything related to it in the README.

This part from the README:

{
  "folke/ts-comments.nvim",
  opts = {},
  event = "VeryLazy",
  enabled = vim.fn.has("nvim-0.10.0") == 1,
}

I tried using it, but it didn't work.

folke commented 3 months ago

You don't.

ts-comments.nvim is only meant to be used with Neovim's native comments, nothing else. That's pretty clearly stated in the readme.

0xN1nja commented 3 months ago

Oh, sorry. I missed that 😅