♻️ refactor(nvim): changed db extra to sql, added notify option and edgy window module
This commit is contained in:
parent
ca5cc03a0d
commit
3a961a5422
2 changed files with 35 additions and 4 deletions
|
@ -39,8 +39,8 @@
|
||||||
"plugins.extras.editor.multicursor",
|
"plugins.extras.editor.multicursor",
|
||||||
"plugins.extras.editor.numb",
|
"plugins.extras.editor.numb",
|
||||||
"plugins.extras.editor.smart-splits",
|
"plugins.extras.editor.smart-splits",
|
||||||
"plugins.extras.lang.db",
|
|
||||||
"plugins.extras.lang.markdown",
|
"plugins.extras.lang.markdown",
|
||||||
|
"plugins.extras.lang.sql",
|
||||||
"plugins.extras.lang.typescript",
|
"plugins.extras.lang.typescript",
|
||||||
"plugins.extras.lang.web",
|
"plugins.extras.lang.web",
|
||||||
"plugins.extras.lsp.compiler",
|
"plugins.extras.lsp.compiler",
|
||||||
|
@ -79,4 +79,4 @@
|
||||||
"NEWS.md": "2123"
|
"NEWS.md": "2123"
|
||||||
},
|
},
|
||||||
"version": 2
|
"version": 2
|
||||||
}
|
}
|
|
@ -1,18 +1,49 @@
|
||||||
local sql_ft = { "sql", "mysql", "plsql" }
|
local sql_ft = { "sql", "mysql", "plsql" }
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
optional = true,
|
||||||
|
opts = function(_, opts)
|
||||||
|
if type(opts.ensure_installed) == "table" then
|
||||||
|
vim.list_extend(opts.ensure_installed, { "sql" })
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"folke/edgy.nvim",
|
||||||
|
optional = true,
|
||||||
|
opts = function(_, opts)
|
||||||
|
opts.right = opts.right or {}
|
||||||
|
table.insert(opts.right, {
|
||||||
|
title = "Database",
|
||||||
|
ft = "dbui",
|
||||||
|
pinned = true,
|
||||||
|
open = function()
|
||||||
|
vim.cmd("DBUI")
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
opts.bottom = opts.bottom or {}
|
||||||
|
table.insert(opts.bottom, {
|
||||||
|
title = "DB Query Result",
|
||||||
|
ft = "dbout",
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"tpope/vim-dadbod",
|
"tpope/vim-dadbod",
|
||||||
|
cmd = { "DBUI", "DBUIToggle", "DBUIAddConnection", "DBUIFindBuffer" },
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"kristijanhusak/vim-dadbod-ui",
|
"kristijanhusak/vim-dadbod-ui",
|
||||||
{ "kristijanhusak/vim-dadbod-completion", ft = sql_ft },
|
{ "kristijanhusak/vim-dadbod-completion", ft = sql_ft },
|
||||||
{ "jsborjesson/vim-uppercase-sql", ft = sql_ft },
|
{ "jsborjesson/vim-uppercase-sql", ft = sql_ft },
|
||||||
},
|
},
|
||||||
cmd = { "DBUI", "DBUIToggle", "DBUIAddConnection", "DBUIFindBuffer" },
|
|
||||||
init = function()
|
init = function()
|
||||||
vim.g.db_ui_use_nerd_fonts = true
|
|
||||||
vim.g.db_ui_save_location = vim.fn.stdpath("data") .. "/db_ui"
|
vim.g.db_ui_save_location = vim.fn.stdpath("data") .. "/db_ui"
|
||||||
|
vim.g.db_ui_use_nerd_fonts = true
|
||||||
vim.g.db_ui_execute_on_save = false
|
vim.g.db_ui_execute_on_save = false
|
||||||
|
vim.g.db_ui_use_nvim_notify = true
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
pattern = sql_ft,
|
pattern = sql_ft,
|
Loading…
Add table
Reference in a new issue