Andrei, he's going to talk about a new of them, I went through this deck, it's actually
really cool.
Before you go on, I need to give you this.
Yeah.
No, we need this one for the projection, so here we go.
One, one, one.
Can you hear me?
Yes.
Cool.
I can...
I think I can fix it.
I can use it, so let's start, so we don't have time.
Okay.
Today I will talk about Rust and NeoVim, so if you see something inaccurate, I'm new
in Rust, so please don't judge me too much.
A little bit about me.
I'm Andrei, I'm from Ukraine, now living in Vienna, in Austria, I do a lot Go, Python,
I love gymnastics on other stuff, I love speaking, I just dig talk in another room, so I just
move forward.
Cool.
Let's start.
So NeoVim is the most loved editor in 2021 and in 2022, and Rust is the most loved language
in 2022, so I feel it's a win-win, it's the best combination you can ever see.
So can you raise your hand very quick, who use like NeoVim or something?
Oh, it's my audience.
Nice, nice.
Nice.
So why this for you?
If you like me, love to spend all the day, weekends, configuring my development environment,
please don't tell it to my boss.
And since all of you using NeoVim, I think you know how to quick from Vim, right?
No need to explain, cool?
So sugar smoking also, cool.
So first things first, NeoVim is just a fork of Vim, which is focused on like extensibility
and usability.
One of the examples is they injected or added ability to write plugins in Lua, which is great.
And since 0.5, as you know, NeoVim supports LSP client framework, all good, all good.
This means NeoVim can work as a client to LSP servers like Rust Analyzer and building
other tools.
So to prove my words, yeah, if you open NeoVim and type help LSP, it's like inside editor,
which is nice.
And you can read what you can do.
So and for some of you who don't know what is LSP, very quick, so LSP is like a bridge.
So now you can focus on developers of language servers, can focus on developing language
service, and developers of editors can focus on editors.
And it's like win-win again.
Because previously it was like this, you need to write a tool, which format your code or
whatever, it parse all three and depend on language, you can integrate it.
And jumping between languages is hard, that's why it's nice when you have this LSP.
So quick start, I assume you know how to install NeoVim.
So if you never did it before, I highly recommend to start with this one file config, which is
here and put it in your config location.
What it does, it's very small, and it has few important plugins, which helps you to
try it out.
And I highly recommend to use it because it's easy to start doing something small and simple
rather than starting like, okay, I need like lots of files, I need to repo for all my configs,
et cetera.
And as soon as you know more, you can refactor it.
So in this file, include this new Mason plugin, which helps you to install language servers,
which is handy, because you can do it directly from NeoVim, and it will install binaries
directly to NeoVim standard pass, and when you start NeoVim, it will add this like location,
so NeoVim and tooling will can communicate with these binaries.
And it supports LSP, so also for debuggers, for linters, for motors, sorry, next.
So when you're done, you can see this after complete, which is great.
Another interesting feature you can do after imports.
So for example, if you use hash map, but you forget to import it, I usually do it.
It's very nice.
And if you bind this code action, it will print you like different depend on which part
of code you are.
If it has any connections, for example, import hash map, you can type and import it automatically,
and that's it.
It's very cool.
Same with rename.
So now all haters of Vim can't say that you're renaming using grep, so you can rename using
syntax tree, be smart, and using entire code base.
And that's it.
Yeah, I supposed to make a juice, but since we decided to reduce talk, I just have a picture.
If you like me, forget your key maps, because you have tons.
You can just use this nice plug-in telescope key maps and just remind yourself, oh, shit,
just fuzzy find this.
So very handy.
For example, I forget LSP references, so I can find how to run it.
And again, this LSP references is more or less language agnostic.
It's extension of telescope, which like get it and show you.
You can do hover documentation, you can do, I don't know, signature help, and many more.
Other features, which I unfortunately can't cover in this short talk, but I highly recommend
you go to this page and see how smart Rust Analyzer.
It can do very nice refactoring, like, I don't know, apply Moore's law for your binary logic,
replace some patterns, et cetera.
So I'm personally using big config.
You can, if you want, you can check it.
It's more organized because it's really big.
It's not one file.
And if you need refresh knowledge about WIM, there are two really good books I ever read
about editors, and you can play a little bit with WIM golf.
If you never try, I highly recommend.
Yeah, and a few references of guys which inspire me to use Neo WIM a lot.
And thank you.
Questions.
Yeah, thanks.
Questions.
Yeah, thanks.
Thanks.