DokuVimNG is a Neovim plugin that allows you to edit DokuWiki pages via it's xml-rpc interface. It also does syntax highlighting for DokuWiki syntax.
The whole code is initially taken from dokuvimki and updated to Neovim's lua configuration plus using the new style pynvim plugin stuff.
It's extended with more features like pasting images from clipboard, handling namespace switching and integrating KeePassXC credentials lookup via browser api.
- Neovim
- python >=
3x
- python-keepassxc-browser (only if keepassxc integration is used)
- python-dokuwiki
- python-pillow (for image pasting)
Install the plugin with your preferred package manager:
return {
"mfulz/DokuVimNG",
config = function()
require("DokuVimNG").setup{
urls = {
"https://my.dokuwiki.url",
"https://other.dokuwiki.url",
},
creds = {
{ user = "user1", pass = "pass1" },
{ user = "user2", pass = "pass2" },
},
}
end,
}
}
More complete setup
return {
"mfulz/DokuVimNG",
config = function()
require("DokuVimNG").setup{
urls = {
"https://my.dokuwiki.url",
},
keepassxc = true,
keepassxc_match {
field = "name",
match = "dokuwiki",
rule = "contains",
},
}
end,
}
DokuVimNG comes with the following defaults:
{
index_winwidth = 40,
save_summary = "[DokuVimNG edit]",
image_sub_ns = "images",
keys = {
init = "<Leader>Wi",
edit = "<Leader>We",
cd = "<Leader>Wc",
search = "<Leader>Ws",
mediasearch = "<Leader>Wm",
paste_image = "<Leader>Wpi",
paste_image_link = "<Leader>Wpl",
},
urls = {},
creds = {},
keepassxc = false,
keepassxc_id = "DokuVimNG",
keepassxc_match {
field = "name",
match = "",
rule = "contains",
},
keepassxc_state_file = "~/.DokuVimNG.state",
}
Default : 40
Define the width of the index window
Default : [DokuVimNG edit]
The default summary used for dokuwiki changes
Default : images
The namespace used as sub namespace when pasting images
Default : ``
List of urls that should be handled by DokuVimNG. This must be set in the configuration
Default : ``
List of maps { user = "login_name", pass = "user_pass" }
to be used for
dokuwiki logins.
This must be set if keepassxc is set to false
Default : false
If set to true
DokuVimNG will use the KeePassXC browser api to look for
credentials. Will override CREDS
Default : DokuVimNG
The identifier used for KeePassXC browser api
A simple match rule definition for keepass credentials
Default : "name"
The field to compare against the requested value from the KeePassXC reponse
"name"
, "group"
, "login"
, etc.
Default : ""
The value that should be matched. If empty it will return all found credentials.
The rule to match with "contains"
or "equals"
where the first one looks
for the match to be in the value and the second one checks for equality.
Default : ~/.DokuVimNG.state
The state file to save the KeePassXC browser api login credentials