dhruvasagar / vim-table-mode

VIM Table Mode for instant table creation.
2.11k stars 96 forks source link

tablemode#Toggle error #237

Closed clockworkpc closed 6 months ago

clockworkpc commented 6 months ago

Opened a Markdown file, In normal mode,

tm Got this error: ``` Error detected while processing function tablemode#Toggle[6]..86_SetActive[2]..86_ToggleSyntax: line 4: E866: (NFA regexp) Misplaced { E475: Invalid argument: Table /^\s*\(\{%\ \c\o\m\m\e\n\t\ %\}\)\?\s*\zs|.\+|\ze\s*\(\s\+\{\%\ \e\n\d\c\o\m\m\e\n\t\ \%\}\)\?\s*$/ contains=TableBorder,TableSeparator,TableCo lumnAlign,yesCell,noCell,maybeCell,redCell,greenCell,yellowCell,blueCell,whiteCell,darkCell containedin=ALL Table Mode Enabled ``` Neovim: ``` NVIM v0.10.0-dev Build type: RelWithDebInfo LuaJIT 2.1.0-beta3 Run "nvim -V1 -v" for more info ``` Plugin: ``` vim-table-mode 0.73ms  markdown dir /home/alexanderg/.local/share/nvim/lazy/vim-table-mode url https://github.com/dhruvasagar/vim-table-mode branch master commit e4365bd readme README.md help |table-mode.txt| ft  markdown ``` Using default options Installed with Lazy.nvim by adding this line `{ 'dhruvasagar/vim-table-mode', ft = "markdown"},` I have not modified the plugin in any way
dhruvasagar commented 6 months ago

@clockworkpc Have you modified or changed commentstring for markdown files ? Can you share the output of set commentstring?

clockworkpc commented 6 months ago

The output of :set commentstring:

commentstring={% comment %}%s{% endcomment %}

dhruvasagar commented 6 months ago

@clockworkpc That is not correct for markdown files, at least not default. Any plugin or setting you use ? I am not sure about this comment format for markdown either.

clockworkpc commented 6 months ago

Thanks for letting me know. I'll disable plugins and troubleshoot from there. I'll let you know my findings. Big fan of your plugin by the way.

dhruvasagar commented 6 months ago

@clockworkpc Thanks for the kind words, let me know how it goes, closing the issue for now.

clockworkpc commented 6 months ago

I found that a plugin (vim-liquid) was messing with the commentstring variable for Markdown. Disabling that plugin solved it. I could probably refine its configuration but I'm not using it these days and I use Markdown tables quite a lot, so vim-table-mode is a higher priority.