Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lua/Comment/ft.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ local L = {
make = { M.hash },
mbsyncrc = { M.double_hash },
meson = { M.hash },
norg = { "+%s+" }, -- blockwise comments work unexpected
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean by blockwise comments work unexpected?

Copy link
Copy Markdown
Author

@n-shift n-shift Mar 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neorg does not support blockwise comments you are used for, instead there's this kind of syntax:

@comment
blockwise comment, you can't nest \@comment on one line
@end

or

#comment
This is a comment

after a blank line it is not a comment

this syntax would not work

+
comment
+

I think that creator of this plugin could answer better, @vhyrro

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I've been summoned :P

Yeah Neorg's syntax doesn't have any true blockwise structure which will probably make it difficult to fully support, only the aforementioned:

@comment
comment contents
@end

Is a valid multiline (or block) comment.

This is invalid, therefore I don't think it'd work with Comment.nvim's implementation:

@comment my comment @end

The + modifiers have strict rules, in that:

+
this
+

and

+ this +

are not valid in Neorg. That probably puts them out of the question if you want to add blockwise support. I dunno if there's any proper way to do this 🤔

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this + comment + (spaces after/before +) is invalid, in that case you have to disable padding option to make it +comment+.

Also, i've read the docs and I am assuming that norg file is only be usable with neorg plugin. Am I missing something?

nix = { M.hash, M.cxx_b },
ocaml = { M.fsharp_b, M.fsharp_b },
plantuml = { "'%s", "/'%s'/" },
Expand Down