From 632f680241fc19575996711966ecaf5c71636615 Mon Sep 17 00:00:00 2001 From: arthur Date: Sat, 22 Jun 2024 12:07:29 +0800 Subject: [PATCH] add sql options docs --- lua/lazyvim/plugins/extras/lang/sql.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lua/lazyvim/plugins/extras/lang/sql.lua b/lua/lazyvim/plugins/extras/lang/sql.lua index 6eee33a6..8dc33308 100644 --- a/lua/lazyvim/plugins/extras/lang/sql.lua +++ b/lua/lazyvim/plugins/extras/lang/sql.lua @@ -1,3 +1,24 @@ +if lazyvim_docs then + -- Automatically configure connections without needing to manually input them each time. + vim.g.dbs = { + dev = "Replace with your database connection URL.", + staging = "Replace with your database connection URL.", + } + -- or + vim.g.dbs = { + { name = "dev", url = "Replace with your database connection URL." }, + { name = "staging", url = "Replace with your database connection URL." }, + } + + -- NOTICE: Replace yourself path for module + -- You can set your secrets directly through a Lua table, for example: + vim.g.dbs = require("secrests/db-env") + + -- Alternatively, you can also use other ways to inject your environment variables. + + -- After all, please make sure to protect your secrets and add them to your `.gitignore` file. +end + local sql_ft = { "sql", "mysql", "plsql" } return {