Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/trstringer/psql.nvim
Plugin to work with PostgreSQL directly from Neovim
https://github.com/trstringer/psql.nvim
Last synced: 3 days 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 (6 months ago)
- Default Branch: main
- Last Pushed: 2024-06-15T00:09:06.000Z (5 months ago)
- Last Synced: 2024-10-24T03:38:08.217Z (12 days ago)
- Language: Lua
- Size: 6.84 KB
- Stars: 11
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
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' }
)
```