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()
85
85
return
86
86
end
87
87
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
89
97
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. ' ,
93
101
})
94
102
end
95
103
end , 200 )
You can’t perform that action at this time.
0 commit comments