You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(ts): install parser if not installed in correct location
It the parser is found in incorrect location (like nvim-treesitter),
make sure to install the correct version in orgmode folder, and report
to user to delete the conflicting one.
Copy file name to clipboardExpand all lines: lua/orgmode/health.lua
+21-9
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,18 @@ function M.check_has_treesitter()
15
15
ifnotversion_info.installedthen
16
16
returnh.error('Treesitter grammar is not installed. Run `:Org install_treesitter_grammar` to install it.')
17
17
end
18
+
19
+
ifnotversion_info.install_locationthen
20
+
locallist=vim.tbl_map(function(parser)
21
+
return ('- `%s`'):format(parser)
22
+
end, version_info.conflicting_parsers)
23
+
returnh.error(
24
+
('Installed org parser found in incorrect location. Run `:Org install_treesitter_grammar` to install it in correct location and remove the conflicting parsers from these locations:\n%s'):format(
25
+
table.concat(list, '\n')
26
+
)
27
+
)
28
+
end
29
+
18
30
ifversion_info.outdatedthen
19
31
returnh.error('Treesitter grammar is out of date. Run `:Org install_treesitter_grammar` to update it.')
20
32
end
@@ -27,18 +39,18 @@ function M.check_has_treesitter()
0 commit comments