[00:00.000 --> 00:09.380] Andrei, he's going to talk about a new of them, I went through this deck, it's actually [00:09.380 --> 00:10.380] really cool. [00:10.380 --> 00:13.460] Before you go on, I need to give you this. [00:13.460 --> 00:14.460] Yeah. [00:14.460 --> 00:26.420] No, we need this one for the projection, so here we go. [00:26.420 --> 00:30.500] One, one, one. [00:30.500 --> 00:32.220] Can you hear me? [00:32.220 --> 00:33.220] Can you hear me? [00:33.220 --> 00:34.220] Yes. [00:34.220 --> 00:35.220] Cool. [00:35.220 --> 00:36.220] I can... [00:36.220 --> 00:39.100] I think I can fix it. [00:39.100 --> 00:44.340] I can use it, so let's start, so we don't have time. [00:44.340 --> 00:45.340] Okay. [00:45.340 --> 00:53.180] Today I will talk about Rust and NeoVim, so if you see something inaccurate, I'm new [00:53.180 --> 00:57.100] in Rust, so please don't judge me too much. [00:57.100 --> 00:59.060] A little bit about me. [00:59.060 --> 01:05.980] I'm Andrei, I'm from Ukraine, now living in Vienna, in Austria, I do a lot Go, Python, [01:05.980 --> 01:14.020] I love gymnastics on other stuff, I love speaking, I just dig talk in another room, so I just [01:14.020 --> 01:15.020] move forward. [01:15.020 --> 01:16.020] Cool. [01:16.020 --> 01:17.020] Let's start. [01:17.020 --> 01:29.740] So NeoVim is the most loved editor in 2021 and in 2022, and Rust is the most loved language [01:29.740 --> 01:36.980] in 2022, so I feel it's a win-win, it's the best combination you can ever see. [01:36.980 --> 01:41.060] So can you raise your hand very quick, who use like NeoVim or something? [01:41.060 --> 01:43.060] Oh, it's my audience. [01:43.060 --> 01:44.060] Nice, nice. [01:44.060 --> 01:45.060] Nice. [01:45.060 --> 01:46.860] So why this for you? [01:46.860 --> 01:54.820] If you like me, love to spend all the day, weekends, configuring my development environment, [01:54.820 --> 01:58.180] please don't tell it to my boss. [01:58.180 --> 02:04.100] And since all of you using NeoVim, I think you know how to quick from Vim, right? [02:04.100 --> 02:06.500] No need to explain, cool? [02:06.500 --> 02:09.900] So sugar smoking also, cool. [02:09.900 --> 02:16.740] So first things first, NeoVim is just a fork of Vim, which is focused on like extensibility [02:16.740 --> 02:17.740] and usability. [02:17.740 --> 02:26.140] One of the examples is they injected or added ability to write plugins in Lua, which is great. [02:26.140 --> 02:39.060] And since 0.5, as you know, NeoVim supports LSP client framework, all good, all good. [02:39.060 --> 02:45.340] This means NeoVim can work as a client to LSP servers like Rust Analyzer and building [02:45.340 --> 02:46.700] other tools. [02:46.700 --> 02:53.740] So to prove my words, yeah, if you open NeoVim and type help LSP, it's like inside editor, [02:53.740 --> 02:55.260] which is nice. [02:55.260 --> 02:58.340] And you can read what you can do. [02:58.340 --> 03:07.780] So and for some of you who don't know what is LSP, very quick, so LSP is like a bridge. [03:07.780 --> 03:13.580] So now you can focus on developers of language servers, can focus on developing language [03:13.580 --> 03:19.300] service, and developers of editors can focus on editors. [03:19.300 --> 03:21.700] And it's like win-win again. [03:21.700 --> 03:28.460] Because previously it was like this, you need to write a tool, which format your code or [03:28.460 --> 03:35.300] whatever, it parse all three and depend on language, you can integrate it. [03:35.300 --> 03:41.660] And jumping between languages is hard, that's why it's nice when you have this LSP. [03:41.660 --> 03:46.580] So quick start, I assume you know how to install NeoVim. [03:46.580 --> 03:55.500] So if you never did it before, I highly recommend to start with this one file config, which is [03:55.500 --> 03:58.740] here and put it in your config location. [03:58.740 --> 04:06.540] What it does, it's very small, and it has few important plugins, which helps you to [04:06.540 --> 04:08.060] try it out. [04:08.060 --> 04:14.660] And I highly recommend to use it because it's easy to start doing something small and simple [04:14.660 --> 04:20.980] rather than starting like, okay, I need like lots of files, I need to repo for all my configs, [04:20.980 --> 04:21.980] et cetera. [04:21.980 --> 04:26.980] And as soon as you know more, you can refactor it. [04:26.980 --> 04:35.940] So in this file, include this new Mason plugin, which helps you to install language servers, [04:35.940 --> 04:42.460] which is handy, because you can do it directly from NeoVim, and it will install binaries [04:42.460 --> 04:51.980] directly to NeoVim standard pass, and when you start NeoVim, it will add this like location, [04:51.980 --> 04:56.580] so NeoVim and tooling will can communicate with these binaries. [04:56.580 --> 05:08.860] And it supports LSP, so also for debuggers, for linters, for motors, sorry, next. [05:08.860 --> 05:16.580] So when you're done, you can see this after complete, which is great. [05:16.580 --> 05:19.500] Another interesting feature you can do after imports. [05:19.500 --> 05:25.540] So for example, if you use hash map, but you forget to import it, I usually do it. [05:25.540 --> 05:26.820] It's very nice. [05:26.820 --> 05:35.100] And if you bind this code action, it will print you like different depend on which part [05:35.100 --> 05:36.820] of code you are. [05:36.820 --> 05:45.740] If it has any connections, for example, import hash map, you can type and import it automatically, [05:45.740 --> 05:46.900] and that's it. [05:46.900 --> 05:49.060] It's very cool. [05:49.060 --> 05:50.340] Same with rename. [05:50.340 --> 05:57.220] So now all haters of Vim can't say that you're renaming using grep, so you can rename using [05:57.220 --> 06:03.420] syntax tree, be smart, and using entire code base. [06:03.420 --> 06:04.420] And that's it. [06:04.420 --> 06:11.780] Yeah, I supposed to make a juice, but since we decided to reduce talk, I just have a picture. [06:11.780 --> 06:15.900] If you like me, forget your key maps, because you have tons. [06:15.900 --> 06:21.540] You can just use this nice plug-in telescope key maps and just remind yourself, oh, shit, [06:21.540 --> 06:23.180] just fuzzy find this. [06:23.180 --> 06:24.780] So very handy. [06:24.780 --> 06:32.380] For example, I forget LSP references, so I can find how to run it. [06:32.380 --> 06:39.100] And again, this LSP references is more or less language agnostic. [06:39.100 --> 06:43.860] It's extension of telescope, which like get it and show you. [06:43.860 --> 06:51.060] You can do hover documentation, you can do, I don't know, signature help, and many more. [06:51.060 --> 06:56.260] Other features, which I unfortunately can't cover in this short talk, but I highly recommend [06:56.260 --> 07:00.180] you go to this page and see how smart Rust Analyzer. [07:00.180 --> 07:08.500] It can do very nice refactoring, like, I don't know, apply Moore's law for your binary logic, [07:08.500 --> 07:14.740] replace some patterns, et cetera. [07:14.740 --> 07:17.740] So I'm personally using big config. [07:17.740 --> 07:19.580] You can, if you want, you can check it. [07:19.580 --> 07:22.300] It's more organized because it's really big. [07:22.300 --> 07:25.300] It's not one file. [07:25.300 --> 07:31.740] And if you need refresh knowledge about WIM, there are two really good books I ever read [07:31.740 --> 07:36.820] about editors, and you can play a little bit with WIM golf. [07:36.820 --> 07:39.740] If you never try, I highly recommend. [07:39.740 --> 07:46.340] Yeah, and a few references of guys which inspire me to use Neo WIM a lot. [07:46.340 --> 07:48.220] And thank you. [07:48.220 --> 07:49.220] Questions. [07:49.220 --> 07:50.220] Yeah, thanks. [07:50.220 --> 07:51.220] Questions. [07:51.220 --> 07:52.220] Yeah, thanks. [07:52.220 --> 07:53.220] Yeah, thanks. [07:53.220 --> 07:54.220] Yeah, thanks. [07:54.220 --> 07:55.220] Thanks. [07:55.220 --> 07:56.220] Thanks. [07:56.220 --> 07:57.220] Thanks. [07:57.220 --> 07:58.220] Thanks. [07:58.220 --> 07:59.220] Thanks. [07:59.220 --> 08:00.220] Thanks. [08:00.220 --> 08:01.220] Thanks. [08:01.220 --> 08:02.220] Thanks. [08:02.220 --> 08:03.220] Thanks. [08:03.220 --> 08:04.220] Thanks. [08:04.220 --> 08:05.220] Thanks. [08:05.220 --> 08:06.220] Thanks.