Skip to content

Commit

Permalink
docs: Remove vim-packager suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
kristijanhusak committed Jul 15, 2024
1 parent f74a31e commit 954877c
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 25 deletions.
25 changes: 8 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,13 @@ Features:

## Installation

Use your favorite package manager. If you don't have one, I suggest [vim-packager](https://github.com/kristijanhusak/vim-packager)
```vimL
function! PackagerInit() abort
packadd vim-packager
call packager#init()
call packager#add('kristijanhusak/vim-packager', { 'type': 'opt' })
call packager#add('tpope/vim-dadbod')
call packager#add('kristijanhusak/vim-dadbod-ui')
endfunction
" This is just an example. Keep this out of version control. Check for more examples below.
let g:dbs = {
\ 'dev': 'postgres://postgres:mypassword@localhost:5432/my-dev-db'
\ }
```

Configuration with [lazy.nvim](https://github.com/folke/lazy.nvim)
```lua
return {
'kristijanhusak/vim-dadbod-ui',
dependencies = {
{ 'tpope/vim-dadbod', lazy = true },
{ 'kristijanhusak/vim-dadbod-completion', ft = { 'sql', 'mysql', 'plsql' }, lazy = true },
{ 'kristijanhusak/vim-dadbod-completion', ft = { 'sql', 'mysql', 'plsql' }, lazy = true }, -- Optional
},
cmd = {
'DBUI',
Expand All @@ -66,6 +50,13 @@ return {
}
```

Or [vim-plug](https://github.com/junegunn/vim-plug)
```vim
Plug 'tpope/vim-dadbod'
Plug 'kristijanhusak/vim-dadbod-ui'
Plug 'kristijanhusak/vim-dadbod-completion' "Optional
```

After installation, run `:DBUI`, which should open up a drawer with all databases provided.
When you finish writing your query, just write the file (`:w`) and it will automatically execute the query for that database.

Expand Down
34 changes: 26 additions & 8 deletions doc/dadbod-ui.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,33 @@ Requirements:
- https://github.com/tpope/vim-dadbod

Install with your favorite package manager. If you don't have one, I suggest
`vim-packager` https://github.com/Kristijanhusak/vim-packager:

Configuration with lazy.nvim (https://github.com/folke/lazy.nvim)
>
return {
'kristijanhusak/vim-dadbod-ui',
dependencies = {
{ 'tpope/vim-dadbod', lazy = true },
{ 'kristijanhusak/vim-dadbod-completion', ft = { 'sql', 'mysql', 'plsql' }, lazy = true }, -- Optional
},
cmd = {
'DBUI',
'DBUIToggle',
'DBUIAddConnection',
'DBUIFindBuffer',
},
init = function()
-- Your DBUI configuration
vim.g.db_ui_use_nerd_fonts = 1
end,
}
<

Or vim-plug (https://github.com/junegunn/vim-plug)
>
function! PackagerInit() abort
packadd vim-packager
call packager#init()
call packager#add('kristijanhusak/vim-packager', { 'type': 'opt' })
call packager#add('tpope/vim-dadbod')
call packager#add('kristijanhusak/vim-dadbod-ui')
endfunction
Plug 'tpope/vim-dadbod'
Plug 'kristijanhusak/vim-dadbod-ui'
Plug 'kristijanhusak/vim-dadbod-completion' "Optional
<

Define a connection |vim-dadbod-ui-connections|
Expand Down

0 comments on commit 954877c

Please sign in to comment.