Vim Dadbod - My Favorite SQL Plugin
HTML-код
- Опубликовано: 27 сен 2024
- Continuing on with my neovim config rewrite, we've got a video about vim dadbod
-- Dad Bod Plugins
return {
"tpope/vim-dadbod",
"kristijanhusak/vim-dadbod-completion",
"kristijanhusak/vim-dadbod-ui",
}
Configuration: github.com/tjd...
Dadbod: github.com/tjd...
Links
Twitch: / teej_dv
Twitter: / teej_dv
Github: github.com/tjd...
Neovim: BTW
#neovim #programming #lua
04:23
"Which is one of, I think, the nicest farts
- TJ, 2024
LOL
Sounds like a good tshirt print.
I love it. Reject modernity. SQL >>> &&& NVIM>>>>>
Just joined your membership. Keep rocking!
Thanks for circling this back to the bigger group, TJ! Feeling really good about our Q2 OKR's, especially once we start to leverage gen-AI. By the way, Chris on floor 6 has brought donuts today (you didn't hear this from me😉)
This made my day.
Oh, boy, your videos are awesome. I use dadbod from a long time, nonetheless the video is great (the bunch of minutes length works really well)! Thank you so much. Little feedback: sometimes could be useful see the file path at right.
dadbod might be the best plugin name of all time
Nice video TJ, I was wondering where are all those stars coming from :)
I'll link this video in the readme on both plugins.
hahaha wonderful plugin and well deserved!!
man the results output for sqlite is so pretty. I bet MySQL and PosgreSQL look great too. Unfortunately MS SQL Server looks terrible. It's the only reason I don't really use it, that, plus the completion is not robust enough to handle cross database queries and or good enough for large sql scripts. But it's great for simple dml or ddl stuff.
Very nice video! I have been using it in my day to day job since a long time, so great experience so far. My preferred keymap is to run a query under the cursor with something like rq (for run query) set to "vipS". It selects the current paragraph en run the default DBUI_ExecuteQuery binded on S by vim-dadbod-ui.
With that it is awesome! No more needs to comment SQL queries
Man 2 videos back to back!!!
BTW, Expect a reply in your mail, in a week when i am done adding dadBod.
LOVE Tj! Feature I want is the comments string to work with comments.nvim plugin. So `gcc` or other shortcuts works fine in sql file too. Thanks Tj!
thank you so much, it looks really cool.
One thing I’d hoped you would cover is configuring the connection between the plugin and something like Postgresql or Mysql
As a recent convert from Goland to Nvim, this is incredible.
I gotta give it another try. That looked like a great experience. My sql viewer has been gui based forever and I find it hard to switch off dbeaver. It's so good.
I'm officially niche having absolutely enjoyed this video and understood everything you said. I feel like I'm amongst some of the coolest people on Earth.
Another great terminal based SQL tool to check out is Harlequin
Ooh. That looks neat, I need to give it a try.
Edit: Tried it. It's really cool. Unfortunately, at work I need completions from multiple databases at the same time, which isn't supported.
What would we do if tj didn't post actually useful amazing videos! THANK YOU!
Mine a bit different, I have sqls lsp running when inside dadbod buffer so I have formatting and completion source and other lsp utilities
Nice, I might try that out next week
Excute me I'm a new guys learning sql. Is that you have to connect to the database in dadbod ui, then to connect the database to the current query (using sqls)?
Can I see your configuration? Thank you.
I feel this irrational aversion to adding a non-lua plugin to the config. but this one is just too good to pass up xD
Nice video. Setting up WSL2 + MSSQL (sadly) + Arch Linux would be entertaining video.
Love these vids please keep them coming teej
will do :) another one went live today!
Fantastic plugin, I will have to learn how to add other data sources for this.
ok one more plugin to add to my neovim, thanks.
Mind doing a mongodb setup? I struggled with that last time I looked into DBUI
Great looking plugin. Thanks for the info!
No problem 😁
Didn't know this was possible. Super neat
Got that Oracle drip
It would be great if you could also cover formatting and connections, especially to 'picky' DBs, like the ones from Oracle
Overall, great video! :D
corporate tj should do more videos!
man, I must really say,, neovim is soooooo fuckin awesome.
What about `dbee`?
It doesn't work well with sqlserver. The query result doesn't format. Is there any way to fix it?
I would love if they release the Snowflake support for this plugin.
Great just was looking for a sql client in linux, found it in vim. Damn!! what a coincidence.
It would be nice if it was possible to do ctrl + enter to execute the query under cursor. Having to comment out other sql staments feels a bit awkward
I'm so curious as to whether or not you put on the corporate fit just for this video...
Does it work with random .sql files? Will it provide completion in those, or only if inside the DBUI?
The man delivered
oh my.. this plugin is so cool!
uh I have been using that one for a while already. it’s great
Can we get a video where you actually did your set up please? How do you alias the connections?
This is gold!
Thanks for all your great content!
Have you tried how the completion works with CTES? E.g
with my_songs as(
select
title as song_title ,
length as duration
where artist 'primegean'
from theme_songs
)
select... (Do the completion pick up the name of the cte and the aliased col names..?
I haven't yet - that'd be a good test case (the buffer completion at least would work OK)
@@teej_dv I tried it and it seems like it is the buffer that handles it - i.e. columns in the cte does show up in the completion but it does not seem to be able to distinguish the scope (the cte) of the column.
great stuff
🤯
Really cool
Would be nice to see how to add a db to the list in the video. But good stuff anyway
What's happening? Two videos in a row?
I missing docker support
been using dbeaver for years, time to switch
haha heard a lot of people say that in the comments, had never heard of it before
nice plugin
lowercase SQL keywords? ... HARAM
I like the plug-in very much, but I'm not a VIM/newVIM user. know the basics but never configured it. To add more complexity I'm on a windows system. Any Instructions? Help is very much apprecieated.
No more pgadmin for me since i discovered this plugin
.
SQL (specifically MS Sql Server) is one of my biggest pain points with Neovim. Dadbod/Dadbod-ui/Dadbod-ui-completion do what they do well, but the completion experience is still pretty limited compared even to vscode let alone something like Datagrip.
I use DBeaver with the Vrapper (Vim emulation) plugin and it has worked very nicely for me. There is some limited config that can be provided in VimScript. I have not used Datagrip but since that is from JetBrains I imagine the plugin IdeaVim is available there
were you able to use it with MS Sql? I didn't see that in the "supported dbs" list and assumed It wouldn't be of much use to me atm, but if it even allows me to not open up MSSQL stdio and do stuff in the editor itself, I think it would still work for me.
This plugin is cool but dbeaver for database work is the cream of the crop
What is the command you used to run the query? Something that I hate on every single VIM/Neovim is that there is no QuickStart section just quickly showing how to use the plugin, instead I need to waste several minutes to read something that I even know is useful to me. Knowing how to execute the query is the most important action and is never mentioned in the Github README or documentation. WTF???!??!?!!?!?
`:set ft?` prints out the values too. I dunno about cmp, but `` already does buffer completions. Does Cmp do fuzzy search there too maybe?
I didn't know about Dadbod. I've been using vim sqlls for this purpose. Any idea of how these two compare?
This could have been an email....
do you have a newsletter???
Can it follow foreign key constraints?
I mean, jump from the id in the result column to the corresponding row in another table?
What about dbee? Seen it in your config before ;)
I tried it, but the completion experience wasn't as good (at least for now)
@@teej_dv sqls works for completion quite well 👌made a simple config to read a connection config file from the repo on LSP client start. Happy with it so far 😁
imagine the suffering of dbeaver plebs 😄
could anyone tell me how to use save_query?
where tf is your dutch accent
Im a little bit confused about this plugin. I already tried it about a month ago in this set of config and its ideal for write fast querries. But for serious company work i rather use dbeaver or access. Am i wrong here?
Can't really be wrong about something that's personal preference 😁 if you like it, I wouldn't switch!
Awesome plugin will use today!
LETS GOOOOO
you know what i am going to say "remember me ?"
yes razo, of course :)
Thanks for another great video TJ... Looking forward to giving this setup a whirl
Of course it's from TPope. Who else could make something so great? (Other than TJ, of course)
haha tpope inspired me to write plugins, so probably wouldn't have written any if he never did!
@@teej_dv we're all standing on the shoulders of giants
Hola Tj gracias por todos tu videos. Sabes he estado buscando algun plugin que pueda hacer lo que hace postman, he intentado con rest.nvim y console.nvim (creo que se llama asi no recuerdo bien) y nunca he podido hacerlos funcionar de la mejor manera. Tienes uno de tu preferencia? Saludos desde Chile.
After years of using GUIs like Postico and DBeaver, I have been using dadbod on a daily basis for about a year. It’s neat.
You were the chosen one! You were supposed to destroy emacs-all-in-one-paradigm not join it!
Cool, using this with DuckDB should make analysing large csv files a breeze!
I'll take a look in dadbod because I have been used DBeaver and is heavy, let's do it!!
Thanks for the tip
I knew about Dadbod, but never knew about dadbod-ui. The UI is a gamechanger!
Is this a Take Tuesday? Is it back?
Going to get dadbod, looks awesome
Thanks for those API keys, please don't revoke them. :)
gotcha
o o f
Ultimate smartass attention seeker (this guy)
Another great db tool i love is pgcli. Its a modern version of psql. Love it
I was wondering what this plugin was in an earlier video! Thanks for sharing
awesome!
Nice
this is fantastic - thx TJ for the tipp!!!
Downvoted, sql config should be all caps
you're correct, my apologies