Skip to content

A plugin for neovim to render pandas dataframes in nvim-dap using the power of visidata.

License

Notifications You must be signed in to change notification settings

Willem-J-an/visidata.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

visidata.nvim

A plugin for neovim to render pandas dataframes in nvim-dap using the power of visidata.

Installation

  • Requires nvim-dap
  • Requires visidata to be available in the active python environment
  • Install like any other neovim plugin:
    # Using: lazy
    {
         "Willem-J-an/visidata.nvim",
        dependencies = {
            "mfussenegger/nvim-dap",
            "rcarriga/nvim-dap-ui"
        },
        config = function()
            local dap = require("dap")
            dap.defaults.fallback.external_terminal = {
                command = "<Path to your terminal of choice>",
                args = { "--hold", "--command" },
            }
            vim.keymap.set("v", "<leader>vp", require('visidata').visualize_pandas_df, { desc = "[v]isualize [p]andas df" })
        end,
    }

Usage

  1. Configure an external-terminal for nvim-dap
  2. Configure a keymap to execute the visualize_pandas_df function.
  3. Configure your dap session to use externalTerminal:
{
    "name": "Python: Current File",
    "type": "python",
    "request": "launch",
    "program": "${file}",
    "console": "externalTerminal"
}
  1. Debug your code as usual, load a pandas dataframe, add a breakpoint after it.
  2. Select the pandas dataframe and execute the keymap.

About

A plugin for neovim to render pandas dataframes in nvim-dap using the power of visidata.

Resources

License

Stars

Watchers

Forks

Languages