File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -85,11 +85,19 @@ local function check_ts_grammar()
8585 return
8686 end
8787 local parser_config = require (' nvim-treesitter.parsers' ).get_parser_configs ()
88- if parser_config and parser_config .org and parser_config .org .install_info .revision ~= ts_revision then
88+ if parser_config and parser_config .org and parser_config .org .install_info .revision then
89+ if parser_config .org .install_info .revision ~= ts_revision then
90+ require (' orgmode.utils' ).echo_error ({
91+ ' You are using outdated version of tree-sitter grammar for Orgmode.' ,
92+ ' To use latest version, replace current grammar installation with "require(\' orgmode\' ).setup_ts_grammar()" and run :TSUpdate org.' ,
93+ ' More info in setup section of readme: https://github.com/nvim-orgmode/orgmode#setup' ,
94+ })
95+ end
96+ else
8997 require (' orgmode.utils' ).echo_error ({
90- ' You are using outdated version of tree-sitter grammar for Orgmode .' ,
91- ' To use latest version, replace current grammar installation with "require( \' orgmode \' ).setup_ts_grammar()" and run :TSUpdate org. ' ,
92- ' More info in setup section of readme: https://github.com/nvim-orgmode/orgmode# setup' ,
98+ ' Cannot detect parser revision .' ,
99+ " Please check your org grammar's install info. " ,
100+ ' Maybe you forgot to call "require( \' orgmode \' ).setup_ts_grammar()" before setup. ' ,
93101 })
94102 end
95103 end , 200 )
You can’t perform that action at this time.
0 commit comments