Experience an Issue?
- Review the Known Issues to find a workaround.
- If the issue is new then create a Github issue.
- Autocomplete for your contact list.
- At-rest obfuscation of contact list.
- Syntax highlighting for contacts.
Left: Neovim Editor, Right: At-Rest Obfuscated Catalog
- Autocomplete: To trigger autocomplete, simply start a word with your
prefix_char
(defaults to@
). - Add Contact: To add a contact to the Contact Catalog, use
:RldxAdd
(leader X a). - Delete Contact: To delete a contact from the Contact Catalog, use
:RldxDelete
(leader X d). - Reload Contact Catalog: To reload the Contact Catalog, use
:RldxLoad
(leader X l).- Note: Loading occurs automatically on startup. Reload is only necessary if the Contact Catalog is updated by a process other than Neovim. In the vast majority of scenarios, this command is not needed.
- Save Contact Catalog: To save the Contact Catalog, use
:RldxSave
(leader X s).- Note: Saving occurs automatically when contacts are saved or deleted. Manually saving is useful if an error occurs with either of those processes.
- Tested on Neovim 0.10.0.
- nvim-cmp
- Add to your Neovim package manager's configuration. See specific steps below.
- Update your cmp-nvim configuration.
- [Optional] Update your cmp-nvim
formatting
configuration.
{
"michhernand/RLDX.nvim",
event = "VeryLazy",
dependencies = {
"hrsh7th/nvim-cmp",
},
opts = {}, -- see configuration docs for details
keys = {
{ "<leader>Xa", "<cmd>RldxAdd<CR>" },
{ "<leader>Xl", "<cmd>RldxLoad<CR>" },
{ "<leader>Xs", "<cmd>RldxSave<CR>" },
{ "<leader>Xd", "<cmd>RldxDelete<CR>" },
{ "<leader>Xp", "<cmd>RldxProps<CR>" },
}
}
use {
"michhernand/RLDX.nvim",
requires = { "hrsh7th/nvim-cmp" },
config = function()
require("rldx").setup{} -- see configuration docs for details
end,
setup = function()
vim.keymap.set("n", "<leader>Xa", "<cmd>RldxAdd<CR>", { noremap = true, silent = true })
vim.keymap.set("n", "<leader>Xl", "<cmd>RldxLoad<CR>", { noremap = true, silent = true })
vim.keymap.set("n", "<leader>Xs", "<cmd>RldxSave<CR>", { noremap = true, silent = true })
vim.keymap.set("n", "<leader>Xd", "<cmd>RldxDelete<CR>", { noremap = true, silent = true })
vim.keymap.set("n", "<leader>Xp", "<cmd>RldxProps<CR>", { noremap = true, silent = true})
end
}
nvim-cmp configuration for all file types.
require('cmp').setup({
sources = {
{ name = 'cmp_rolodex' }
}
})
nvim-cmp configuration for select file types.
require('cmp').setup.filetype('org', {
sources = {
{ name = 'cmp_rolodex' }
},
})
An optional feature is to add formatting for nvim-cmp to display the type and source of the completion.
A completion without formatting applied.
A completion with formatting applied.
This is enabled by setting formatting
in the config
function for hrsh7th/nvim-cmp
.
-- nvim-cmp.lua
return {
"hrsh7th/nvim-cmp",
config = function()
formatting = {
format = function(entry, vim_item)
if entry.source.name = "cmp_rolodex" then
vim_item.kind = "π Contact"
vim_item.menu = "[RLDX]"
end
return vim_item
end
}
end
}
For more details on formatting setup, see the Formatting Doc.
opts = {
prefix_char = "@",
filename = os.getenv("HOME") .. "/.rolodex/db.json"),
highlight_enabled = true,
highlight_color = "00ffff",
highlight_bold = true,
schema_ver = "latest",
encryption = "plaintext",
}
prefix_char
(str) is the character that triggers autocomplete.
filename
(str) is the location where your contacts are stored.
highlight_enabled
(bool) is a flag indicating whether highlighting of names is enabled.
highlight_color
(str) is a hex color code indicating what color names should be highlighted as.
highlight_bold
(bool) is a flag indicating whether highlighted names should be bolded.
schema_ver
(str) tells RLDX what version of the schmea to use when writing out data. Options include '0.0.2', '0.1.0', or '0.2.0'. 'latest' (which is the default) is also an option which automatically upgrades your catalog to the latest schema.
encryption
(str) is the chosen encryption methodology. Options include:plaintext
: No encryption of fields.elementwise_xor
(only available forschema_ver >= '0.1.0'
): xor encryption of each contact.
hash_salt_length
(str) is the number of random salt characters added to the hash.
For more information about Obfuscation, see the Obfuscation Doc
Left: Neovim Editor, Right: At-Rest Plaintext Catalog
RLDX optionally provides obfuscation of data at rest. RLDX and its maintainers make no guarantees around security. For a full breakdown of obfuscation, see the Obfuscation Doc.
Left: Neovim Editor, Right: At-Rest Obfuscated Catalog
- In
schema_ver
>= 0.1.0, RLDX provides:- Very light encryption of names.
- Hashing of names to guarantee uniqueness.
- To enable obfuscation, see the instructions in Obfusfaction Doc
Arbitrary JSON key-value data can be assigned to any contact using :RldxProps
. Arbitrary JSON is obfuscated (when obfuscation is enabled).
-
Obfuscation -
Salt for Hashing -
Form for adding contacts -
Allow saving all contacts -
Allow loading all contacts -
Allow deleting contacts -
Store contact key-value metadata - Display contact key-value metadata
- Filter by contact key-value metadata
- Blink.nvim compatability
- Grep files by contact name
This appears to happen when you add contacts and then query them in the same session. A workaround is to exit and re-launch Neovim.
This appears to happen when lazy loading with Lazy.nvim. A workaround is to set lazy = false
in opts.
- Only highlighting is affected here. Other functionality is unaffected.
This appears to happen when a new org-roam file is created via org-roam-capture. This resolves when Neovim is restarted.
- Only highlighting is affected here. Other functionality is unaffected.