Neovim plugin for vi-sql — a TUI client for SQL databases. Opens vi-sql in a floating window and keeps the session alive in the background between visits.
:ViSQLopens vi-sql (or reopens it if a session is already running in the background)hide_key(configurable) hides the window from inside vi-sql without ending the session:ViSQLJump schema/tableopens vi-sql and jumps directly to a table- If
vi-sqlis not installed, the plugin offers to install it automatically via the official install script
{
"kopecmaciej/vi-sql.nvim",
config = function()
require("vi-sql").setup({
-- Press this inside vi-sql to hide the window (change to taste)
hide_key = "<C-q>",
})
end,
cmd = { "ViSQL", "ViSQLJump" },
keys = {
{ "<leader>vs", "<cmd>ViSQL<cr>", desc = "Open vi-sql" },
-- { "<leader>vj", ":ViSQLJump ", desc = "vi-sql: jump to table", silent = false },
},
}use {
'kopecmaciej/vi-sql.nvim',
config = function()
require('vi-sql').setup({
hide_key = "<C-q>",
})
end
}Plug 'kopecmaciej/vi-sql.nvim'| Command | Description |
|---|---|
:ViSQL |
Open vi-sql (or reopen a running background session) |
:ViSQLJump public/users |
Open vi-sql and jump to a schema/table |
require("vi-sql").setup({
-- Auto-connect to a named connection on open (default: nil)
connection = nil,
-- Key to hide the window from inside vi-sql without ending the session
-- Set to nil to disable. Any key works; pick one that vi-sql doesn't use.
hide_key = nil,
-- Floating window size as a fraction of the editor (default: 0.9)
width = 0.9,
height = 0.9,
})- Neovim 0.5+
curl— used for auto-install ifvi-sqlis not found in PATHvi-sql— installed automatically on first use if missing