Skip to content
This repository was archived by the owner on Oct 17, 2025. It is now read-only.
/ keysmith.nvim Public archive

A neovim helper for navigating data/config languages like Json, Yaml, Toml etc.

License

Notifications You must be signed in to change notification settings

DanWlker/keysmith.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Archived

Use lsp_symbols instead:

keysmith.nvim

A neovim helper for data/config languages like Json, Yaml, Toml etc.

demo.mp4

Installation

Lazy.nvim

return {
  'DanWlker/keysmith.nvim',
  config = true,
}

Usage

  1. Search all keys in the current file

    • Select_all_keys accept the same params as vim.ui.select, so you can override the on_choice or opts passed
    • If you use snacks.nvim with the vim.ui.select override, trouble and quickfix should work out of the box
    vim.api.nvim_create_autocmd('BufWinEnter', {
      pattern = { '*.yaml', '*.yml', '*.json', '*.toml' },
      group = vim.api.nvim_create_augroup('danwlker/keysmith', { clear = true }),
      callback = function() vim.keymap.set('n', '<leader>f/', require('keysmith').select_all_keys) end,
    })
  2. Copy / Get the key under your cursor

    keys = {
        {
            'yk',
            function() vim.fn.setreg('+', require('keysmith').get_key()) end,
            desc = 'Copy key under cursor',
        },
        {
            'yv',
            function() vim.fn.setreg('+', require('keysmith').get_value()) end,
            desc = 'Copy value under cursor',
        },
    },

Currently supports (more to come and refine)

  • yaml
  • json
  • toml
  • helm (wip)

Credits

keytrail.nvim

yaml.nvim

About

A neovim helper for navigating data/config languages like Json, Yaml, Toml etc.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages