Skip to content

Plugin to work with PostgreSQL directly from Neovim

Notifications You must be signed in to change notification settings

trstringer/psql.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

psql.nvim

PostgreSQL plugin for Neovim.

Installation

To install this with lazy nvim, just add the following to your config:

require('lazy').setup({
  {
    "trstringer/psql"
  }
})

Usage

Use psqlcm to connect to your postgres database. Then run the following commands:

  • :PgRun (<leader>x)
  • :PgCancel
  • :PgTemp to get a temporary SQL workspace
  • :PgGetTable
  • :PgGetFunction
  • :PgGetDatabase

Recommended keymaps

vim.keymap.set(
	'n',
	'<leader>x',
	psql.psql_run_curr_buf,
	{ desc = 'Execute the current buffer with psql' }
)

vim.keymap.set(
	'x',
	'<leader>x',
	'<ESC><CMD>lua require("psql").psql_run_visual()<CR>',
	{ desc = 'Execute selection with psql' }
)

About

Plugin to work with PostgreSQL directly from Neovim

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published