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
Copy file name to clipboardExpand all lines: lua/orgmode/health.lua
+12-15
Original file line number
Diff line number
Diff line change
@@ -16,17 +16,25 @@ function M.check_has_treesitter()
16
16
returnh.error('Treesitter grammar is not installed. Run `:Org install_treesitter_grammar` to install it.')
17
17
end
18
18
19
-
ifnotversion_info.install_locationthen
19
+
if#version_info.parser_locations>1then
20
20
locallist=vim.tbl_map(function(parser)
21
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(
22
+
end, version_info.parser_locations)
23
+
returnh.warn(
24
+
('Multiple org parsers found in these locations:\n%s\nDelete unused ones to avoid conflicts.'):format(
25
25
table.concat(list, '\n')
26
26
)
27
27
)
28
28
end
29
29
30
+
ifnotversion_info.installed_in_orgmode_dirthen
31
+
returnh.ok(
32
+
('Tree-sitter grammar is installed, but not by nvim-orgmode plugin. Any issues or version mismatch will need to be handled manually.\nIf you want nvim-orgmode to manage the parser installation (recommended), remove the installed parser at "%s" and restart Neovim.'):format(
33
+
version_info.parser_locations[1]
34
+
)
35
+
)
36
+
end
37
+
30
38
ifversion_info.outdatedthen
31
39
returnh.error('Treesitter grammar is out of date. Run `:Org install_treesitter_grammar` to update it.')
32
40
end
@@ -40,17 +48,6 @@ function M.check_has_treesitter()
40
48
)
41
49
end
42
50
43
-
if#version_info.conflicting_parsers>0then
44
-
locallist=vim.tbl_map(function(parser)
45
-
return ('- `%s`'):format(parser)
46
-
end, version_info.conflicting_parsers)
47
-
returnh.warn(
48
-
('Conflicting org parser(s) found in these locations:\n%s\nRemove them to avoid conflicts.'):format(
0 commit comments