summaryrefslogtreecommitdiff
path: root/fnl/plugins
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2023-09-17 22:38:00 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2023-09-17 22:38:00 +0200
commit1f34bacc0961ce720813ef34a04938ee5aca9565 (patch)
tree2c31f95bc384ba755884e2fe317c4c82db69ecc7 /fnl/plugins
parent802ddca9b830bb08427cd6054eec384103c364c4 (diff)
Add dadbod
Diffstat (limited to 'fnl/plugins')
-rw-r--r--fnl/plugins/editor/cmp.fnl5
-rw-r--r--fnl/plugins/editor/dadbod.fnl22
2 files changed, 26 insertions, 1 deletions
diff --git a/fnl/plugins/editor/cmp.fnl b/fnl/plugins/editor/cmp.fnl
index a062d92..8eba613 100644
--- a/fnl/plugins/editor/cmp.fnl
+++ b/fnl/plugins/editor/cmp.fnl
@@ -31,7 +31,9 @@
{:name :spell}
{:name :orgmode}
{:name :buffer :keyword_length 4}
- {:name :path :keyword_length 6}]
+ {:name :path :keyword_length 6}
+ {:name :vim-dadbod-completion}
+ {:name :git}]
:formatting {:format (lspkind.cmp_format {:with_text true
:menu {:buffer ""
:nvim_lsp ""
@@ -55,6 +57,7 @@
:onsails/lspkind-nvim
:hrsh7th/cmp-nvim-lsp
:hrsh7th/cmp-cmdline
+ :petertriho/cmp-git
:L3MON4D3/LuaSnip
:rafamadriz/friendly-snippets
:hrsh7th/cmp-path
diff --git a/fnl/plugins/editor/dadbod.fnl b/fnl/plugins/editor/dadbod.fnl
new file mode 100644
index 0000000..6701ee2
--- /dev/null
+++ b/fnl/plugins/editor/dadbod.fnl
@@ -0,0 +1,22 @@
+;; Plugins for interacting with databases.
+
+(local keys [{1 :<leader>wn
+ 2 :<cmd>DBUIToggle<cr>
+ :mode :n
+ :desc "Toggle Dadbod UI"}
+ {1 :<leader>we
+ 2 :<cmd>DBUIAddConnection<cr>
+ :mode :n
+ :desc "Add DB connection"}])
+
+{1 :kristijanhusak/vim-dadbod-ui
+ :dependencies [{1 :tpope/vim-dadbod :lazy true}
+ {1 :tpope/vim-dotenv :lazy true}
+ {1 :kristijanhusak/vim-dadbod-completion
+ :ft [:sql :plsql]
+ :lazy true}]
+ : keys
+ :init (fn []
+ (set vim.g.db_ui_use_nerd_fonts 1)
+ (set vim.g.db_ui_winwidth 40)
+ (set vim.g.db_ui_notification_width 39))}