Neovim‑centric workflow for SQL Server on Linux, built on:
- sqlserverXlinux – SQL Server engine + tools on Linux
- vim-dadbod + vim-dadbod-ui – interactive querying and browsing
- vim-dadbod-completion – SQL IntelliSense for connections
- Optional SQL LSPs (
sqlls,sqls,postgres_lsp) for linting/formatting
This repo provides:
- Example Neovim config modules under
config/ - Docs under
docs/explaining the architecture and setup - Cheatsheets under
cheats/for day‑to‑day usage
- Linux (same focus as
sqlserverXlinux: Arch / Ubuntu) - SQL Server installed via:
https://github.com/mavantgarderc/sqlserverXlinux - Neovim ≥ 0.9
- Plugin manager: lazy.nvim
Optional for LSP:
sqlls,sqls,postgres_lspinstalled via Mason (:Mason)
Follow:
https://github.com/mavantgarderc/sqlserverXlinux
Make sure:
mssql-serverservice is runningsqlcmdworks:sqlcmd -S localhost -U SA -C -Q "SELECT @@VERSION;"
Example .env in your project or Neovim config dir:
DB_MSSQL_LOCAL=sqlserver://sa:YourStrong!Passw0rd@localhost:1433?database=master&encrypt=true&trustServerCertificate=trueThe Dadbod config will load .env and can map DB_MSSQL_LOCAL into vim.g.dbs["mssql-local"].
Copy config/init.example.lua into your Neovim config (or merge it):
cp config/init.example.lua ~/.config/nvim/init.luaEnsure lazy.nvim bootstrap is present (see the file).
In your lazy setup, it will import config/lua/plugins/*.lua:
sql-dadbod.lua– Dadbod + UI + completionsql-lsp.lua– SQL LSPs (optional)
From a project with .env:
nvimInside Neovim:
-
Toggle DB UI:
:DBUI
-
Quick connect:
<leader>dc -
Run a query in a
.sqlbuffer:- Execute current line:
<leader>ssor<localleader>r - Execute visual selection:
<leader>ss(visual) /<localleader>r(visual) - Execute whole buffer:
<leader>sfor<localleader>R
- Execute current line:
More details in:
docs/01-intro.mddocs/03-setup-dadbod-and-env.mdcheats/01-dadbod-basics.md
sqlserverXnvim/
├── cheats/ # Quick reference docs
├── config/ # Example Neovim Lua config modules
├── docs/ # Architecture + setup + workflow
├── LICENSE
└── README.md
- SQL Server on Linux: https://github.com/mavantgarderc/sqlserverXlinux
- Neovim + .NET: https://github.com/mavantgarderc/nvimXdotnet
- Neovim SQL tooling for general SQL: this repo
This repo is designed to be used together with:
- sqlserverXlinux – install & manage SQL Server on Linux
- nvimXdotnet – Neovim as a .NET IDE (C# / F# / VB.NET)
Typical flow:
-
Use
sqlserverXlinuxto:- Install SQL Server on Linux
- Create the
Ecommercesample database
-
Use
sqlserverXnvimto:- Connect to that SQL Server from Neovim (Dadbod)
- Explore and query the
Ecommercedatabase
-
Use
nvimXdotnetto:- Develop application code (C#) against the same database
- Debug and test .NET services that talk to SQL Server
-
Neovim: 0.10.x
-
OS: Arch Linux / Ubuntu 22.04
-
.NET SDK: 8.0.x (see linuxXdotnet)
-
SQL Server: 2022 (see sqlserverXlinux)
-
SQL Server: 2022 (container / native on Linux)
-
Dadbod stack:
- vim-dadbod
- vim-dadbod-ui
- vim-dadbod-completion
- vim-dotenv