SkillAgentSearch skills...

Psql

Neovim (nvim) Postgres SQL query execution

Install / Use

/learn @mzarnitsa/Psql
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Neovim/nvim plugin to execute PostgreSQL queries. Written in Lua

This is a simple plugin to execute SQL query from inside nvim.

The plugin executes query with psql command, opens a split buffer in nvim and shows results there.

screenshot

Default shorcuts:

  • Execute line under cursor (normal mode) <leader>-e
  • Execute selection (visual mode) <leader>-e
  • Execute current paragraph (normal mode) <leader>-r
  • Close last result buffer <leader>-w
  • Close all result buffers <leader>-W

Installation

First of all, you will need to have PostgreSQL installed and psql command in the $PATH.

Using NeoVim's native package system

Clone this repo into your Neovim package folder:

mkdir -p ~/.config/nvim/pack/packages/start/
git clone https://github.com/mzarnitsa/psql.git ~/.config/nvim/pack/packages/start/psql

Using VimPlug

Plug 'mzarnitsa/psql'

After that add configuration to your init.lua file as shown below.

Configuration

Minimal. Include the following into ~/.config/nvim/init.lua file

require('psql').setup({
  database_name = 'postgres'
})

Using init.vim

lua << EOF
  require('psql').setup({
    database_name = 'postgres'
  })
EOF

All configuration parameters

require('psql').setup({
  database_name       = 'postgres'
  execute_line        = '<leader>e',
  execute_selection   = '<leader>e',
  execute_paragraph   = '<leader>r',

  close_latest_result = '<leader>w',
  close_all_results   = '<leader>W',
})

Related Skills

View on GitHub
GitHub Stars61
CategoryData
Updated1mo ago
Forks7

Languages

Lua

Security Score

95/100

Audited on Mar 6, 2026

No findings