Here we go... | Rocks Devlog #1
HTML-код
- Опубликовано: 6 фев 2025
- Starting off a new series where I try to implement an alternative frontend for luarocks.org in Rust!
Like what I do? A sponsor to the channel or on my Github is greatly appreciated:
github.com/spo...
Want to hang out? Check out the Neorg discord!
/ discord
Part 2 tomorrow :)
Just to clarify - this is different to the upcoming rocks.nvim devlog, which I will name differently. This one is a cross-platform binary, not just for Neovim!
Man i love Neorg. And i am really hyped for the whole rocks dev log ♥️
I really like ur content for neovim and other stuff. Keep up the really cool work! And ur neovim course is amazing bro
Fantastic video! Your explanations were clear and insightful.
I have a couple of unrelated questions regarding your Neovim setup showcased in the video:
1. What is the plugin you use for the floating terminal?
2. Could you share how you integrate Rust type annotations within the file?
3. Additionally, how do you present multiple LSP diagnostics on a single line, each in its own separate line?
I use toggleterm.nvim for the floating terminal. Rust type annotations are done by simply running the following code in your on_attach function for LSP:
if client.server_capabilities.inlayHintProvider then
vim.lsp.inlay_hint.enable(bufnr, true)
end
As for presenting multiple LSP diagnostics in separate lines, I use git.sr.ht/~whynothugo/lsp_lines.nvim :)
@@vhyrro
Thank you very much!
Inlay hints seems to one of the juicy 0.10 features. Will wait until my distro ships that.
@@vhyrro I was also looking at the inlayhint and wondered how you achieved this what vscode has. Great new feature! Some ppl enable it only in Insert mode, maybe it adds too much noise on the screen when not needed. What's your take?
Nice video! By the way what neovim colorscheme are you using?
It's kanagawa.nvim
What about the neovim series ?
Can't wait for the lsp episode.
I want those inlined hints and warnings!
if there aren't cache related headers on the http response for the manifest, better not cache it
also love the concept for the series, you're a great narrator!
tho im not on the rust hype train, too bad its not a lua project 😅
unrelated question but how did you get vertical tabs in firefox?
6:12 should probably be an assert(is_ok()) instead of just an unwrap
To my knowledge asserting for is_ok() won't actually give you the error that occured contrary to just unwrapping, which is useful for debugging. Then your code doubles as both a test and a debugging tool. I believe an alternative is returning a Result from the tests which should also work :)
@@vhyrroOh actually yeah, I didn’t think about that, but regardless I think something better than an unwrap could be done, since it’s not very clear what the test is for since sometimes tests just unwrap for convenience, maybe even just an expect
good video, also can you share your dotfiles? need to copy config for floating terminal 🤣
Is the repo private as I see nothing on github
toggleterm.nvim
require('toggleterm').setup({})
and then map
nvim.set_keymap('n', 'tt', 'ToggleTerm direction=float')
I don't have my dots anywhere, mostly because they are an absolute amalgamation😅
I'll also have an episode on Neovim's builtin terminal in the Understanding Neovim series, so hopefully that'll give you enough insight to make your own :)
Rewrite it in Rust Legacy