Skip to content

SpollaL/datasight.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

datasight.nvim

CI License: MIT

A Neovim plugin that opens CSV and Parquet files in datasight — a fast terminal viewer with vim-style navigation, filtering, sorting, plotting, and group-by.

demo

Requirements

  • Neovim >= 0.7
  • The datasight binary on your PATH

Installing the datasight binary

Pre-built binaries (recommended) — download the latest release for your platform from the Datasight releases page.

Build from source (requires Rust 1.75+):

cargo install --git https://github.com/SpollaL/Datasight

Installing the plugin

lazy.nvim

{
  "SpollaL/datasight.nvim",
  opts = {},
  cmd = "Datasight",
  ft = { "csv", "parquet" },
}

mini.deps

MiniDeps.add("SpollaL/datasight.nvim")
require("datasight").setup()

packer.nvim

use {
  "SpollaL/datasight.nvim",
  config = function()
    require("datasight").setup()
  end
}

Configuration

Call setup() to configure the plugin. All options are optional — the defaults work out of the box.

require("datasight").setup({
  -- Path to the datasight binary. "datasight" assumes it is on your PATH.
  binary_path = "datasight",

  -- Float dimensions as a fraction of the editor size (0.0 – 1.0).
  width  = 0.85,
  height = 0.85,

  -- Border style: "rounded", "single", "double", "solid", "shadow", or "none".
  border = "rounded",

  -- Automatically open datasight when you :e a .csv or .parquet file.
  auto_open = false,

  keymaps = {
    -- Set to false to disable the default keymap.
    open = "<leader>ds",
  },
})

Usage

Method Description
:Datasight Open datasight for the current buffer's file
:Datasight path/to/file.csv Open datasight for a specific file (tab-complete supported)
<leader>ds Open datasight for the current buffer's file (default keymap)

Once open, all keypresses are forwarded to datasight. Press q to quit and return to Neovim, or <C-\><C-n> to return to Neovim without closing datasight.

datasight keybindings

See the full keybindings reference in the datasight README. Quick reference:

Key Action
hjkl Navigate
g / G First / last row
/ Search in current column
f / F Filter / clear filters
u Unique values popup
s Sort by current column
b / B Group-by
p Plot column
i Column inspector
= Autofit all columns
? Help popup
q Quit

Contributing

After cloning, activate the pre-commit hooks:

git config core.hooksPath .githooks

This runs stylua (formatter) and luacheck (linter) before each commit. Both are skipped with a warning if not installed — see Installing the tools below.

Installing the tools

cargo install stylua
sudo apt-get install -y luarocks && sudo luarocks install luacheck

License

MIT

About

Neovim plugin to open CSV and Parquet files in datasight

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors