https://github.com/trstringer/psql.nvim
Plugin to work with PostgreSQL directly from Neovim
https://github.com/trstringer/psql.nvim
Last synced: 2 months ago
JSON representation
Plugin to work with PostgreSQL directly from Neovim
- Host: GitHub
- URL: https://github.com/trstringer/psql.nvim
- Owner: trstringer
- Created: 2024-05-04T15:43:49.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-15T00:09:06.000Z (about 1 year ago)
- Last Synced: 2025-03-31T08:21:14.700Z (3 months ago)
- Language: Lua
- Size: 6.84 KB
- Stars: 19
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# psql.nvim
PostgreSQL plugin for Neovim.
## Installation
To install this with lazy nvim, just add the following to your config:
```lua
require('lazy').setup({
{
"trstringer/psql"
}
})
```## Usage
Use [psqlcm](github.com/trstringer/psqlcm) to connect to your postgres database. Then run the following commands:
* `:PgRun` (`x`)
* `:PgCancel`
* `:PgTemp` to get a temporary SQL workspace
* `:PgGetTable`
* `:PgGetFunction`
* `:PgGetDatabase`## Recommended keymaps
```lua
vim.keymap.set(
'n',
'x',
psql.psql_run_curr_buf,
{ desc = 'Execute the current buffer with psql' }
)vim.keymap.set(
'x',
'x',
'lua require("psql").psql_run_visual()',
{ desc = 'Execute selection with psql' }
)
```