Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/VidocqH/data-viewer.nvim
Table view for data files, csv, tsv
https://github.com/VidocqH/data-viewer.nvim
csv neovim neovim-plugin nvim-plugin sqlite tableview tsv
Last synced: 14 days ago
JSON representation
Table view for data files, csv, tsv
- Host: GitHub
- URL: https://github.com/VidocqH/data-viewer.nvim
- Owner: VidocqH
- License: mit
- Created: 2023-09-29T01:20:57.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-29T17:21:19.000Z (3 months ago)
- Last Synced: 2024-07-31T20:50:57.611Z (3 months ago)
- Topics: csv, neovim, neovim-plugin, nvim-plugin, sqlite, tableview, tsv
- Language: Lua
- Homepage:
- Size: 62.5 KB
- Stars: 84
- Watchers: 3
- Forks: 5
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-neovim - VidocqH/data-viewer.nvim - Provide a simple table view to inspect data files such as `csv`, `tsv`. (Utility / CSV Files)
README
# DataViewer.nvim
Lightweight neovim plugin provides a table view for inspect data files such as `csv`, `tsv`
Floating View
Tab View
### Supported filetypes
- csv
- tsv
- sqlite## Requirements
- neovim >= 0.8
- [plenary](https://github.com/nvim-lua/plenary.nvim)
- [sqlite.lua](https://github.com/kkharji/sqlite.lua) (Optional)## Usage
### Commands
- `:DataViewer` -- open with current file and auto detect filetype
- `:DataViewer [filetype]` -- open with current file with given filetype
- `:DataViewer [filepath] [filetype]` -- open with given file and given filetype- `:DataViewerNextTable`
- `:DataViewerPrevTable`- `:DataViewerClose`
## Installation
### Lazy:
```lua
requir("lazy").setup({
{
'vidocqh/data-viewer.nvim',
opts = {},
dependencies = {
"nvim-lua/plenary.nvim",
"kkharji/sqlite.lua", -- Optional, sqlite support
}
},
})
```## Config
### Default config:
```lua
local config = {
autoDisplayWhenOpenFile = false,
maxLineEachTable = 100,
columnColorEnable = true,
columnColorRoulette = { -- Highlight groups
"DataViewerColumn0",
"DataViewerColumn1",
"DataViewerColumn2",
},
view = {
float = true, -- False will open in current window
width = 0.8, -- Less than 1 means ratio to screen width, valid when float = true
height = 0.8, -- Less than 1 means ratio to screen height, valid when float = true
zindex = 50, -- Valid when float = true
},
keymap = {
quit = "q",
next_table = "",
prev_table = "",
},
}
```### Highlight Groups
You can use your own highlights for columns by change config
- DataViewerColumn0
- DataViewerColumn1
- DataViewerColumn2- DataViewerFocusTable
## TODO
- More filetypes support
- Table styles