Rewriting/reorganising Kakoune's documentation

Unlike scripts which need to all be loaded when Kakoune starts up, documentation only needs to be available before the user first types :doc. Plugin managers could just symlink any *.asciidoc files they find into the autoload directory during the startup process, maybe inside a “managed-documentation” directory to make it clear it’s managed by an automated system and shouldn’t be messed with.

@Jori_Bomanson is this functionality something that could or would be added to your search-doc.kak plugin. Maybe with a flag :search-doc --plugins?

Just a thought.


now on my todo list, thanks Jori.

Yeah, I think it is best for search-doc.kak to search the same files as doc.kak. Thanks for prompting me to this thread! :slight_smile:

For now, I updated search-doc.kak to look for the same *.asciidoc files as doc.kak in https://github.com/mawww/kakoune/pull/3704. If a doc_search_paths option or similar will be added to doc.kak, then it can be added to search-doc.kak as well.

Hi all, I am going through the docs doc/pages/*.asciidoc.

Started at buffers.asciidoc and finished on scopes.asciidoc (alphabetical order) linking all references in each file to their file name nodes. The most welcome file was the last one scopes.asciidoc as it has a central pivot point for references and only the one node duplication to options.asciidoc.

I found it quite interesting hope you do too, made with this plugin: kakoune-plantuml.kak the pics source code is below.




Source code

@startuml

[*] → Buffers

Buffers → Commands
Buffers → Buffers

Commands → Buffers : debug buffers
Commands → Buffers : fifo buffers
Commands → Buffers : scratch buffers
Commands → Options : builtin options
Commands → Buffers : debug buffers
Commands → Buffers : debug buffers
Commands → Options : declare options
Commands → Options : set option
Commands → Options : unset option
Commands → Options : update option
Commands → Commands : declaring new commands
Commands → Commands : aliases
Commands → Scopes
Commands → Commands : aliases
Commands → Scopes
Commands → Execeval
Commands → Execeval
Commands → Mapping
Commands → Scopes
Commands → Mapping
Commands → Scopes
Commands → Hooks
Commands → Scopes
Commands → Options : builtin options
Commands → Hooks : disabling hooks
Commands → Hooks
Commands → Scopes
Commands → Hooks
Commands → Faces : markup strings
Commands → Faces
Commands → Scopes
Commands → Faces
Commands → Scopes
Commands → Highlighters
Commands → Highlighters
Commands → Commands : decaring new commands
Commands → Faces : markup strings
Commands → Registers

Command_Parsing → Expansions

Execeval → Registers
Execeval → Buffers : debug buffers
Execeval → Hooks : disabling hooks
Execeval → Mapping
Execeval → Hooks

Expansions → Command_Parsing
Expansions → Command_Parsing : typed expansions
Expansions → Commands : declaring new commands
Expansions → Options
Expansions → Registers
Expansions → Keys

Faces → Highlighters

Highlighters → Regex : groups
Highlighters → Options : types
Highlighters → Faces : markup strings

Hooks → Scopes
Hooks → Commands : hooks
Hooks → Mapping
Hooks → Mapping
Hooks → Mapping
Hooks → Execeval : execute keys specific switches
Hooks → Regex : groups
Hooks → Keys
Hooks → Execeval

Keys → Mapping
Keys → Hooks
Keys → Options : builtin options
Keys → Mapping : default mappings
Keys → Mapping : default mappings
Keys → Mapping : default mappings
Keys → Mapping : default mappings
Keys → Options
Keys → Options
Keys → Options
Keys → Options
Keys → Mapping : default mappings
Keys → Mapping : default mappings
Keys → Registers
Keys → Expansions : shell expansions
Keys → Registers
Keys → Registers
Keys → Registers
Keys → Registers
Keys → Registers
Keys → Expansions : shell expansions
Keys → Expansions
Keys → Registers
Keys → Commands
Keys → Expansions : typed expansions
Keys → Modes : user mode

Mapping → Modes
Mapping → Scopes
Mapping → Expansions
Mapping → Keys

Modes → Hooks
Modes → Keys
Modes → Mapping
Modes → Keys : movement
Modes → Keys : changes
Modes → Keys : insert mode
Modes → Keys : goto commands
Modes → Keys : view commands
Modes → Keys : prompt commands
Modes → Keys : object commands

Options → Scopes
Options → Highlighters : specs highlighters
Options → Highlighters : specs highlighters
Options → Faces : markup strings
Options → Hooks : disabling hooks
Options → Keys : movement
Options → Faces : markup strings
Options → Expansions : option expansions

Regex → Regex : compatibility
Regex → Regex : modifiers

Registers → Keys : changes
Registers → Keys : searching
Registers → Keys : macros
Registers → Keys : marks
Registers → Registers : marks
Registers → Keys : changes through external programs
Registers → Keys : marks
Registers → Expansions : value expansions

Scopes → Commands
Scopes → Faces
Scopes → Highlighters
Scopes → Hooks
Scopes → Mapping
Scopes → Options
Scopes → Expansions : value expansions
Scopes → Options
Scopes → Options

Scopes → [*]

hide empty description

@enduml

Cool guys, bye :wave:.


Update: By removing the duplication from each file both generlisation (to a file itself) and specialisation (to a files subsection) links we get a more workable default. This makes the assumption that the duplicated links are unnecessary and one link can be provided at the end of a subsection (idea only). The graphs do look more deliberate to a user’s intentions. And a lot more like Eve Online :smile:



Updated source code

@startuml

[*] → Buffers

Buffers → Commands
Buffers → Buffers

Commands → Buffers : debug buffers
Commands → Buffers : fifo buffers
Commands → Buffers : scratch buffers
Commands → Options : builtin options
Commands → Options : declare options
Commands → Options : set option
Commands → Options : unset option
Commands → Options : update option
Commands → Commands : declaring new commands
Commands → Commands : aliases
Commands → Scopes
Commands → Execeval
Commands → Mapping
Commands → Hooks : disabling hooks
Commands → Hooks
Commands → Faces : markup strings
Commands → Faces
Commands → Highlighters
Commands → Registers

Command_Parsing → Expansions

Execeval → Buffers : debug buffers
Execeval → Hooks
Execeval → Hooks : disabling hooks
Execeval → Mapping
Execeval → Registers

Expansions → Commands : declaring new commands
Expansions → Command_Parsing
Expansions → Command_Parsing : typed expansions
Expansions → Keys
Expansions → Options
Expansions → Registers

Faces → Highlighters

Highlighters → Faces : markup strings
Highlighters → Options : types
Highlighters → Regex : groups

Hooks → Commands : hooks
Hooks → Execeval
Hooks → Execeval : execute keys specific switches
Hooks → Keys
Hooks → Mapping
Hooks → Regex : groups
Hooks → Scopes

Keys → Commands
Keys → Expansions
Keys → Expansions : shell expansions
Keys → Expansions : typed expansions
Keys → Hooks
Keys → Mapping
Keys → Mapping : default mappings
Keys → Modes : user mode
Keys → Options
Keys → Options : builtin options
Keys → Registers

Mapping → Expansions
Mapping → Keys
Mapping → Modes
Mapping → Scopes

Modes → Hooks
Modes → Keys
Modes → Keys : movement
Modes → Keys : changes
Modes → Keys : insert mode
Modes → Keys : goto commands
Modes → Keys : view commands
Modes → Keys : prompt commands
Modes → Keys : object commands
Modes → Mapping

Options → Expansions : option expansions
Options → Faces : markup strings
Options → Highlighters : specs highlighters
Options → Hooks : disabling hooks
Options → Keys : movement
Options → Scopes

Regex → Regex : compatibility
Regex → Regex : modifiers

Registers → Expansions : value expansions
Registers → Keys : changes
Registers → Keys : searching
Registers → Keys : macros
Registers → Keys : marks
Registers → Keys : changes through external programs
Registers → Registers : marks

Scopes → Commands
Scopes → Expansions : value expansions
Scopes → Faces
Scopes → Highlighters
Scopes → Hooks
Scopes → Mapping
Scopes → Options

Scopes → [*]

hide empty description

@enduml

3 Likes