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

ft.set() not working for blade files defaults to html comments #436

Open
shaheenfawzy opened this issue Feb 24, 2024 · 2 comments
Open

ft.set() not working for blade files defaults to html comments #436

shaheenfawzy opened this issue Feb 24, 2024 · 2 comments

Comments

@shaheenfawzy
Copy link

shaheenfawzy commented Feb 24, 2024

can't add custom filetype blade comments here is my config

return {
  {
    "numToStr/Comment.nvim",
    lazy = false,
    config = function()
      local ft = require("Comment.ft")

      ft.set("blade", "{{-- %s --}}")

      require("Comment").setup()
    end,
  },
}
@cdarken
Copy link

cdarken commented Mar 18, 2024

Same here. I have also added smarty and that one works. I suppose you're using the work in progress repository from EmranMR for blade support. Maybe Comment.nvim doesn't detect the file type correctly, I don't know if it has anything to do with tree-sitter.

@ZayRTun
Copy link

ZayRTun commented Sep 10, 2024

If your working exclusively with blade, then the following seems to work

  {
    'numToStr/Comment.nvim',

    config = function()
      local ft = require 'Comment.ft'

      ft.set('html', { '{{-- %s --}}', '{{-- %s --}}' })

      require('Comment').setup()
    end,
  },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants