Skip to content

Commit

Permalink
Links for README.org + increase timeout for load_sync (nvim-orgmode#782)
Browse files Browse the repository at this point in the history
* docs(README): add custom_ids and fix relative links

In nvim-orgmode, you can point to a headline either by using the star
syntax (* HEADLINE) or by using a custom-id in the properties drawer of
the headline, and then refer to it using the hash syntax (#custom-id).

This commit adds custom_ids for all the headlines referred to into the
README.org file and fixes relative links to other files in the
repository.

* fix(init): increment the default timeout to 15 seconds

On slow devices (for example Android smartphones using Termux), loading
a lot of org files takes more than 5 seconds, which will make the
default timeout for the promise to expire, leaving the plugin in a
semi-loaded state where some functionalities may not work, forcing the
user to reload the plugin multiple times hoping that the system has
something already cached and it will take less than 5 seconds.
  • Loading branch information
massix authored Jul 24, 2024
1 parent 884d2b1 commit 9c6d1f1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
20 changes: 19 additions & 1 deletion README.org
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

Orgmode clone written in Lua for Neovim 0.9.4+

[[#setup][Setup]] • [[/DOCS.md][Docs]] • [[#showcase][Showcase]] • [[#treesitter-info][Treesitter]] • [[#troubleshoot][Troubleshoot]] • [[#plugins][Plugins]] • [[CONTRIBUTING.md][Contributing]] • [[#thanks-to][Kudos]]
[[#setup][Setup]] • [[file:./DOCS.md][Docs]] • [[#showcase][Showcase]] • [[#treesitter-info][Treesitter]] • [[#troubleshoot][Troubleshoot]] • [[#plugins][Plugins]] • [[file:./CONTRIBUTING.md][Contributing]] • [[#thanks-to][Kudos]]

#+HTML:</div>

Expand Down Expand Up @@ -79,6 +79,9 @@ call dein#add('nvim-orgmode/orgmode')
#+HTML:</details>

*** Setup
:PROPERTIES:
:CUSTOM_ID: setup
:END:

Note that this setup is not needed for [[https://github.com/folke/lazy.nvim][lazy.nvim]]
since instructions above covers full setup
Expand Down Expand Up @@ -150,6 +153,9 @@ If you are new to Orgmode, see [[/DOCS.md#getting-started-with-orgmode][Getting
or a hands-on [[https://github.com/nvim-orgmode/orgmode/wiki/Getting-Started][tutorial]] in our wiki.

** Showcase
:PROPERTIES:
:CUSTOM_ID: showcase
:END:

*** Agenda

Expand All @@ -176,6 +182,9 @@ or a hands-on [[https://github.com/nvim-orgmode/orgmode/wiki/Getting-Started][tu
[[https://user-images.githubusercontent.com/1782860/123550227-e8605800-d76c-11eb-96f6-c0a677d562d4.gif]]

** Treesitter Info
:PROPERTIES:
:CUSTOM_ID: treesitter-info
:END:

The built-in treesitter parser is used for parsing the org files.

Expand All @@ -184,6 +193,9 @@ The built-in treesitter parser is used for parsing the org files.
- LaTex is still highlighted through syntax file

** Troubleshoot
:PROPERTIES:
:CUSTOM_ID: troubleshoot
:END:

*** Indentation is not working

Expand Down Expand Up @@ -329,6 +341,9 @@ More info on issue [[https://github.com/nvim-orgmode/orgmode/issues/281#issuecom
Link to detailed documentation: [[DOCS.md][DOCS]]

** Plugins
:PROPERTIES:
:CUSTOM_ID: plugins
:END:

- [[https://github.com/chipsenkbeil/org-roam.nvim][org-roam.nvim]] - Implementation of [[https://orgroam.com][Org-roam]] knowledge management system
- [[https://github.com/nvim-orgmode/telescope-orgmode.nvim][telescope-orgmode.nvim]] - Telescope extension to find headlines, refile and insert links
Expand Down Expand Up @@ -381,6 +396,9 @@ Hosted documentation is on: [[https://nvim-orgmode.github.io/][https://nvim-orgm
- :white_square_button: Support evaluating code blocks

** Thanks to
:PROPERTIES:
:CUSTOM_ID: thanks-to
:END:

- [[https://github.com/dhruvasagar][@dhruvasagar]] and his [[https://github.com/dhruvasagar/vim-dotoo][vim-dotoo]] plugin
that got me started using orgmode. Without him this plugin would not happen.
Expand Down
2 changes: 1 addition & 1 deletion lua/orgmode/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function Org:init()
:new({
paths = require('orgmode.config').org_agenda_files,
})
:load_sync()
:load_sync(true, 20000)
self.agenda = require('orgmode.agenda'):new({
files = self.files,
})
Expand Down

0 comments on commit 9c6d1f1

Please sign in to comment.