docs(extra.sql): add sql options docs (#3765)
## What is this PR for? A small contribution to enhance the documentation and make it easier to use. While vim-dadbod and vim-dadbod-ui recommend using dotenv.vim for env file injection, we aim to provide a simpler method. Instead of implementing file parsing or relying on an external plugin (dotenv.vim), just try directly using a Lua table. <!-- Describe the big picture of your changes to communicate to the maintainers why we should accept this pull request. --> ## Does this PR fix an existing issue? none! <!-- If this PR fixes any issues, please link to the issue here. Fixes #<issue_number> --> ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines.
This commit is contained in:
@ -1,3 +1,31 @@
|
||||
if lazyvim_docs then
|
||||
-- The setup below will automatically configure connections without the need for manual input each time.
|
||||
|
||||
-- Example configuration using dictionary with keys:
|
||||
-- vim.g.dbs = {
|
||||
-- dev = "Replace with your database connection URL.",
|
||||
-- staging = "Replace with your database connection URL.",
|
||||
-- }
|
||||
-- or
|
||||
-- Example configuration using a list of dictionaries:
|
||||
-- vim.g.dbs = {
|
||||
-- { name = "dev", url = "Replace with your database connection URL." },
|
||||
-- { name = "staging", url = "Replace with your database connection URL." },
|
||||
-- }
|
||||
|
||||
-- or
|
||||
-- Create a `.lazy.lua` file in your project and set your connections like this:
|
||||
-- ```lua
|
||||
-- vim.g.dbs = {...}
|
||||
--
|
||||
-- return {}
|
||||
-- ```
|
||||
|
||||
-- Alternatively, you can also use other methods to inject your environment variables.
|
||||
|
||||
-- Finally, please make sure to add `.lazy.lua` to your `.gitignore` file to protect your secrets.
|
||||
end
|
||||
|
||||
local sql_ft = { "sql", "mysql", "plsql" }
|
||||
|
||||
return {
|
||||
|
Reference in New Issue
Block a user