Skip to content

nelnn/bear.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐼bear.nvim🐻‍❄️

A neovim plugin for debugging pandas and polars DataFrames.

visidataframe.nvim_demo.mov

⚡️ Requirements

📦 Installation

{
  "nelnn/bear.nvim",
  dependencies = {
    "mfussenegger/nvim-dap",
  },
}
Default Confguration
{
  "nelnn/bear.nvim",
  dependencies = {
    "mfussenegger/nvim-dap",
  },
  opts = {
      cache_dir = "~/.cache/nvim/bear",
      file_name = "tmp_" .. os.date("%m%d_%H%M%S") .. ".csv",
      remove_file = true, -- remove file upon quitting visidata
      window = {
        width = 0.9,
        height = 0.8,
        border = "rounded"
      },
      keymap = {
        visualise = "<leader>df",
        visualise_buf = "<leader>bdf",
        exit_terminal_mode = "<C-o>",
      }
  },

  config = function(_, opts)
    local df_visidata = require("bear")
    df_visidata.setup(opts)
  end,

  ft = { "python" },
}

🚀 Usage (with default keymaps)

  • <leader>df/<leader>dfb to view the dataframe under the cursor.
  • <leader>df/<leader>dfb in the repl session and input the dataframe variable.
  • <C-o> to exit from terminal to normal mode and i to enter. This is useful when you want to change buffers.
  • q to close floating window or buffer in normal and terminal mode.

You can see my debugging setup here.

⌘ Commands

Command Action
DFView View dataframe in a floating window
DFViewBuf View dataframe in a new buffer
DFClean Clear cache directory

Note

I am not knowledgeable in lua. PRs for code refactor and new features are more than welcome.

About

A neovim plugin for debugging dataframes

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages