Thank you, yeah I wanted to remove some of the magic and help watchers know what things to look for when things work or don't work. Glad you found that helpful. Thank you for watching and having interest in the channel. Have a great rest of your week!
Perfect. I was just thinking that i don't want to read a lot to find out how to get rust clippy working with lazyvim. Now i can watch this while I'm cooking
I like the idea of someone watching one of my videos while cooking dinner. Also, thanks for your interest and I hope it is helpful. Appreciate your time and comment. And, enjoy that dinner!
And another gem of a video ! Superb as always. I bless the day YT algorithm recommended me Elijah’s channel ❤. This is an absolute must for all terminal lovers 🎉
Wow, that is quite the praise! Well, it is people like you that make this place awesome! Thank you for watching and being such an excited and supportive viewer. Have an awesome rest of your week
Thanks for the video, I went through a lot of hell trying to get Prettier setup, as I am going through some React courses. I'll need to go back and cross reference things with this video.
The ecosystem has moved a lot over the years both in the underlying Neovim APIs and also the community plugins, so I totally get you! I appreciate you watching and supporting the channel. Have an awesome day!
I love your lazyvim videos. You made me switch from Webstorm into lazyvim and I love it. Thank you. I've also been waiting for this video for a million years lol. And I'm eager to see what you have in store next for lazyvim haha. I have 3 questions though. 1. How can I remap and use Tab and Shift + Tab to cycle through completions in lazyvim? 2. How do I increase the speed of the mini animate plugin. 3. How do I remap the motion keys for neotree? Help on any of those would be awesome, thank you sir
I've not tried super tab, but there is a recipe in the LazyVim docs for that www.lazyvim.org/configuration/recipes#supertab As for speeding up the mini animate plugin, you can redefine that plugin and adjust the timing functions. Here is a snippet from the docs github.com/echasnovski/mini.animate/blob/main/doc/mini-animate.txt but it would look a bit different using the lazy.nvim syntax. local animate = require('mini.animate') animate.setup({ cursor = { timing = animate.gen_timing.linear({ duration = 100, unit = 'total' }) }, }) I'd take a look at the LazyVim docs for guidance on how it was setup www.lazyvim.org/plugins/extras/ui.mini-animate#minianimate As for neo-tree, I'd take a look at the LazyVim docs www.lazyvim.org/plugins/editor#neo-treenvim and then adjust the window = { mappings = {} } See the docs from neo-tree for guidance github.com/nvim-neo-tree/neo-tree.nvim#quickstart Hope that helps. I'm at the hospital atm with my Mom after surgery so I haven't tried the above tweaks yet, but that is how I would go about it. Hope that helps! Have a great rest of your week
I'd be interested in a "masterclass" type of a video, where you show how you usually code, which keys you use, and which plugins, your workflows. Maybe different languages, backend/frontend. Slowed down of course 😄. You did show a bunch in Zero to IDE video, yet I'm looking forward to learning more from someone experienced with vim 🙂.
I do have an idea like that listed in my backlog. More like a "There is a bug and let me show you how I go about fixing it" which would probably include stuff like using git, searching, movements, testing, etc... I'd prob use a multiplexer as well.
Just Wondering, are you going to be doing an Update Version, with the Conform.nvim & Nvim-Lint. How to Set-Up Formatters & Linters configuring with those
Thank you very much :) Working on new content for Mon or Tue. And will have another the following week, which isn't my typical cadence, but I wanted to sprinkle in something else too. Keep an eye out
Ah thanks! Yeah, I do plan on making more videos from the tmux (those are on my backlog)... the idea was to have 2 more in the series (at least) at showing how to customize config, then use plugins. Then maybe another with custom plugins. I've also been toying with Zellij which is fun, but comes with it's own challenges if you are used to tmux.
@@ElijahManor I like what zellij is doing and may switch in the future, persistent sessions are hard for me to let go but I'm sure zellij has workflows that would help me achieve similar things. Definitely keeping an eye on it though! I am happy right now with using oh-my-tmux as a base and then tweaking it as I like, but it does result in an awfully long template config that is not enjoyable to maintain and difficult to tweak in some ways - so I'm very curious how you set it up :) Separately, I'd love to see a dotfiles video in the future too! I'm a big fan of chezmoi right now but I think the bare repo approach is awesome too. Your style of teaching is great and easy to follow, thanks again for making all the content :)
I know I would probably be better learning this myself, but can you post your config for (or is it already posted for) the write-good, alex , and proselint combo you used?
This is completely reasonable! I was creating a GitHub repo per video, but I think it would be better to have ONE lazyvim repo and having branches for each video. Doing all that conversion might take me a bit, but in the meantime here is a gist with that file... gist.github.com/elijahmanor/5d7db1884c40e354406b6eb3d1e12dc4
I always had trouble adding new things like null ls entries to these batteries included configs. Thanks for making great example videos like this to help. Is this just how null-ls is configured for all neovim users, or is this specific to lazy vim?
Glad it helped! Well, part of it is specific to LazyVim because the extra files are provided by LazyVim, however the general concepts and underlying files could most likely be reused for non-LazyVim because they built upon lazy.nvim which is a plugin manager that many distros use these days (instead of packer). With that said, the future of null-ls is in question as the author decided to stop maintaining the project. If you stick with LazyVim you should be okay because folke (the maintainer) plans to make sure there is a path forward (whatever that might be). I've been on vacation the past week or so, so I'm a little out of the loop atm.
I have barely tinkered with Golang and Python, so I have a LOT to learn in those areas. I did find this recent video of someone sharing their 2023 setup for Go th-cam.com/video/LbsILONOaiE/w-d-xo.html He uses packer and doesn't use LazyVim, but it seems the pain parts the LSP and the vim-go plugin If that is true, then something like the following should work in LazyVim. I'd make a new file in the ~/.config/nvim/lua/plugins folder called golang.lua return { { 'fatih/vim-go' }, { "neovim/nvim-lspconfig", opts = { servers = { gopls = {}, }, }, }, } As for Python, I'd probably go with pyright for the LSP, flake8 for the linter, and black for the formatter. As for debugging, I do plan on having a video about that. It is def on my list of items for the LazyVim playlist. Thanks for watching and for your interest
I love using neovim. Even better when things work. It’s when things don’t work that it gets extra hard. And things don’t work more than I like to admit.
I enjoy it too. What types of things have you been having trouble with? Maybe I can help in some way. Thanks for stopping by the channel. Hope you have a great rest of your week!
@@ElijahManor Thanks for offering to help! I’ll put my LazyVim config online when I have some time. But after trying to config typescript lsp, linting, and formatting, thinks went south and even lua files stopped formatting haha. So this video helps a lot.
@@iatheman sounds good. I’ll keep an eye out for a future message from you. I’m currently out of town at the hospital with a family member, so my response time could be slower than normal
Thanks! And that topic is def on the list, but not next in line. The trick with that one is there are a lot of different languages viewers want to see (TypeScript, Rust, Golang, Python, C++, etc). I'll prob focus on one of those and hopefully enough is similar or I can point to docs for the others. Also, I'm not very knowledgeable about some of those languages so that could be *interesting* ha ha.
@ElijahManor i got that link for your next video is from your "Terminal Rocks" playlist... also today i switched to LazyVim :) thanks for this video....
Ha, wow I didn't think that through. Didn't think anyone would see that until I marked it as public. But yeah, I put it on a playlist. Lesson learned ha ha. Glad you watched the videos and that you like LazyVim :) Also, congrats on being first to watch that other video ha ha ha. It'll launch on Saturday morning for others to watch
@@vaisakhkm783 btw, I'll answer your other comment after it gets officially launched (if it's still there). If somehow it got deleted, please leave the comment again. I forget all that you said. I was more shocked that someone left a comment ha ha. Have a great rest of your week
@@ElijahManor 😅 Np... i didn't asked a question... i was telling wrap is a good concept, but it does not treat everything as a 2d char grid... so traditional tooling might fail... like vim in your case... :) lets see will it become as popular as alacrity or kitty once the hype is over....
@@vaisakhkm783 ah gotcha. yeah, i've communicated a lot of my thoughts with the team. i also look forward to seeing how it improves over time. my top 3 requests are better rendering, tmux support, and font fallback. i use several TUIs and they all seemed to work, but they might be a bit off on alignment, etc...
booped! Are you planning to build up a vanilla lazyvim install with your examples? If not, could you consider that and share? It's easier to follow along that way. Thank you for your videos! I just moved from Doom Emacs to lazyvim so this series is very timely!
Thanks for the boop! I had another person ask something similar. I was making new repos for some of the videos, but I think it would be better for me to have one lazyvim repo for the series and make branches for each one. That might take me a bit, so in the meantime here is a gist with the contents of the writing.lua file gist.github.com/elijahmanor/5d7db1884c40e354406b6eb3d1e12dc4
Hey Vim hero! I wanted to ask, is it normal for code action null-ls to run after every single keystroke? If not is there a way to limit it as it seems to be affecting performance in that some times keys i press get skipped because code action null ls ran at the same time i pressed the key.
@@ElijahManor I'm not sure. I'm just using the defaults for JavaScript that comes preinstalled with Lazyvim. Although I did add some plugins like auto save If I press any key, be it in Normal, Insert or Visual mode or even if I am clicking with my mouse, I always see the notification at the bottom right corner saying "code_action null-ls" with a blue tick. And it's interfering with and lagging my typing.
Hello, sorry for this basic question, but why setup eslint and prettier with lsp and with null-ls too? Also, eslint on save corrects some errors but, for example, it doesn't sort imports. Thanks
The eslint and eslint_d options for null-js are either VERY slow or lacking in features in my experience. So leveraging the ESLint LSP both helps with speed and a richer set of features. As for Prettier (prettierd to be exact), it works nicely and quickly with null-ls (as well as many of the other linters/formatters that I've used).
@@ElijahManor Thanks for reply. So I setup eslint with LSP and prettierd to null-ls? If I setup prettierd in both files (lsp and null-ls) what is happened?
@@mazzu83 Prettier is not available as a LSP, so not sure exactly what you mean. You'd see prettierd installed with Mason, but that is an executable that is installed and used under the covers by null-ls. Null-ls has the info on how to communicate with pretierd (what you see from Mason). However, I could be misunderstanding what you are asking.
@@mazzu83 Gotcha. There isn't a double import. Let me try to explain... { import = "lazyvim.plugins.extras.formatting.prettier" }, is the only thing you need to do in the lazy.lua file. That import has all the mason and lsp stuff inside of that file and does the setup for you. That page in the doc is trying to show you what all is happening under the covers. You can look at the full file here... github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/plugins/extras/formatting/prettier.lua In that one import it registers with mason which will install the prettierd runtime (the executable that actually does the formatting) and registers prettierd with null-ls (which knows how to communicate with prettierd and has a bunch of rules like which filetypes to use, etc) github.com/jose-elias-alvarez/null-ls.nvim/blob/main/lua/null-ls/builtins/formatting/prettierd.lua I hope that helps clear things up. There is only one import needed and it does all of that stuff for you.
If I add the tailwindcss prettier plugin to my prettierrc file it breaks prettier formatting and the plugin also doesn't work. If I use the prettier cli command to run the plugin that works, I've been googling this for like two hours and can't seem to find a solution. Would very much appreciate it if you could help with this issue I'm new to coding in general and very new to neovim. Thanks!
Telescope removed code_action in favor of `:lua vim.lsp.buf.code_action()` and `code_action` uses `vim.ui.select` under the hood. LazyVim includes the dressing.nvim plugin github.com/stevearc/dressing.nvim which overrides what vim.ui.select looks like
Is there a way to search for symbols that are in the classpath? So, let's say I have a YAML file that defines a pipeline, and the pipeline references a Python class. How would I go to definition/or search for definition in this case (this kind of search is very easy in JetBrains IDEs)?
If you are within a file that supports LSP (like TypeScript) you can use some of the keymaps to navigate www.lazyvim.org/keymaps#lsp such as: gd Goto Definition gr References gD Goto Declaration gI Goto Implementation Buf if you are in a YAML file I don't think it would know symbols from another type, so from there I'd try one of the following www.lazyvim.org/keymaps#telescopenvim `sS` Goto Symbol (Workspace) `sg` Grep (root dir) `sw` Word (root dir)
@@ElijahManor thank you for your answer! I tried those, but it doesn't work, it says "method workspace/symbol is not supported by any of the servers registered for the current buffer". I also tried attaching pyright (LSP) directly to the buffer with the YAML file, but it doesn't work either, probably because it can't really analyze non-Python files.
This is a great way to disable it for your entire neovim setup, but if you just need to ignore files in one project, you can also use a `.prettierignore` file
I'm pretty sure for that video I was just using the baked-in LazyVim theme which is tokyonight github.com/folke/tokyonight.nvim. However, I also use catppuccin github.com/catppuccin/nvim which I may have had turned on in that video. Either one of those are pretty great. I also generally like dracula github.com/Mofiqul/dracula.nvim
I have barely tinkered with Golang, so I have a LOT to learn in that area. I did find this recent video of someone sharing their 2023 setup for Go th-cam.com/video/LbsILONOaiE/w-d-xo.html He uses packer and doesn't use LazyVim, but it seems the pain parts the LSP and the vim-go plugin If that is true, then something like the following should work in LazyVim. I'd make a new file in the ~/.config/nvim/lua/plugins folder called golang.lua return { { 'fatih/vim-go' }, { "neovim/nvim-lspconfig", opts = { servers = { gopls = {}, }, }, }, }
Great question! There is an Extras section in the LazyVim docs that lists them. Over the past several months new ones keep being added so it's a good place to look now and then www.lazyvim.org/plugins/extras/formatting.prettier
Is the eslint plugin for LazyVim new? I swear I couldn't get a config to work with both eslint and prettier since I switched to LazyVim a month or so ago. Now I've got all this extra stuff with lsp-zero and it's all too complicated! I might try go back to just the built-in LazyVim plugins.
Yes the plugins for eslint and prettier are relatively new. They did not exist when LazyVim first came out. The discussions tab on the LazyVim repo has some good info about lots of things github.com/LazyVim/LazyVim/discussions and I'm guessing some of these plugins came out of that.
Love that others are responding before me. Yes, you can customize a lot of settings for prettierd. I hadn't responded yet because I wanted to get a detailed explanation with code examples, etc. I'm at work right now, but will work on that tonight and respond in more detail. I'm getting this type of question for other scenarios too, so I'd like to take focused time to respond. Thank you for your interest and support
Great question, I tried to answer it (along with other ideas) in this gist gist.github.com/elijahmanor/9e12c3c9c357e177a9b40a39fd739e12 An easier answer to your question is to add a prettier config file to the root of your project, but the above gist has some more advanced ideas that could be helpful to you and could also answer the question.
Sure thing, you might use that `npx prettier-init` tool to generate your prettierrc file (unless you want to make your own). Or the other technique I showed should work too (but is more advanced)
You know, a while back I had issues with path stuff when installing additional linters/formatters, but that seems to have gone away for me. I'm not sure if it was an upgrade of LazyVim, an upgrade of one of the many plugins, an upgrade of Neovim itself, a possible tweak in my .zshrc file, or something else. But, before that I solved the issue a few ways. 1. You can install a linter/formatter manually and globally (which it sounds like you did) 2. You can tell null-ls where the linters/formatters are located 3. Adjust your PATH to include the location where your linters/formatters are being installed For #2, you could do something like... { "jose-elias-alvarez/null-ls.nvim", opts = function(_, opts) local nls = require("null-ls") local mason_bin = vim.fn.stdpath("data") .. "/mason/bin" opts.sources = vim.list_extend(opts.sources, { nls.builtins.diagnostics.proselint.with({ command = mason_bin .. "/proselint", }), }) end, }, however, since it was already registered by LazyVim it'd be a bit more complicated. You'd need to unregister and re-register stylua, sort of like I did in this gist... gist.github.com/elijahmanor/5d7db1884c40e354406b6eb3d1e12dc4 For #3, you could do something like... I'd double check where mason is installing your stuff. It should be in the following location... :lua print(vim.fn.stdpath("data") .. "/mason/bin") Then append that to your PATH in your .zshrc (or whatever shell config you use). You can peek and see if you see stylua here... ls ~/.local/share/nvim/mason/bin
Great question! You can add a new file to the ~/.config/nvim/lua/plugins folder maybe called alpha.lua and override whatever options you want Here are the options that LazyVim is using, but you are welcome to adjust them how you want www.lazyvim.org/plugins/ui#alpha-nvim An idea would be to have something like this... return { "goolord/alpha-nvim", opts = function(_, opts) local logo = [[ ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ [ @elijahmanor ] ]] opts.section.header.val = vim.split(logo, " ", { trimempty = true }) end, }
Looks like it was changed to use mini.comment github.com/echasnovski/mini.comment and I wonder if the keymaps section was accidentally moved from the LazyVim keymap docs www.lazyvim.org/keymaps Via the mini.comment docs gcc is the common way to comment, but you can use motions, visual selections with gc etc…
Btw, if you press the letter `g` then which-key will come up and you'll see `c` for comment. Pressing the leader key (space) and waiting for which-key is good for finding keymaps and also pressing `g`. Also sk will search for keymaps in telescope. You could type comment there and see `gcc` for example to comment a line
@@ElijahManor Thanks for the comment the sk for searching keymaps is a life saver. One more thing that i am struggling with is trying to remap to perform zz as i want it centered after moving up and down but inside keymaps.lua i tried doing it with vim.keymap.set but could'nt really remap that existing keymap. Any help is appreciated. I am new so the question might be simple but Neovim can be overwhelming for a new experience.
@@ElijahManor i actually found how it was supposed to be done i guess i just had to figure out the syntax a little vim.keymap.set("n", "", "zz", { remap = true }) That did it.
I've not spent much time with AstroNvim, but I do want to dig into it more. I'm a bit on a LazyVim playlist, so I'll prob stay on that for a bit (as well as side things that pop in here and there). But yes, I'd like to focus time on some of the other distros and either have a focused video on them and/or have a compare/contrast video. But as I mentioned, I have a lot of backlog ideas ahead of that.
@@ElijahManor That's great. I do enjoy all of your content. I am learning a lot from you. When you get time, a video comparing different neovim distros will be a great help.
@@ElijahManor Wow, didnt expect that you will respond hahahaha, actually it is working now, just have to fix the warnings on CheckHealth (helped by my coworker) regarding on Node (should be 18 and above), Python (shoud be on 3 and above), also must set those version as default executable file when running its command, such as when typing node -v should have version 18 and above :)
Yeah, wasn't in love with the way I was showing keys and don't like the options on macOS... so I ended up writing my own. Hopefully future videos will be easier to decipher what I'm doing (keys I'm pressing).
Welp, I'm thoroughly lost. This video assumes a lot of prior knowledge about the inner workings of lazyvim, it seems. It also assumes you're a JS developer (I'm not). All I wanna do is just get the nix linter working. That's it. That's all. And yet the documentation available is bereft of any sort of clear, "here's how to take the initial setup of lazyvim and enable a linter". I think the biggest reason for my confusion is that you didn't actually explain the _why_ of what you were doing. You just said what you were doing, did it, and...well that's it really. That and this video's specificity re JS. A better title would have been "Linting and Formatting JavaScript".
And for anyone else who is similarly baffled and just looking to turn-on linting: 1. Open the extra plugin list by either hitting x at the main menu or :LazyExtras 2. Scroll down to the language plugin you want to enable 3. With your cursor over that plugin, hit x Done. Only if your language is not already supported do you have to go spelunking in the configs. (Typescript _is_ available. ESLint _is_ available. Neither require you to touch the config files; just enable them as any other plugin, following the steps above, under :LazyExtras )
Great video :) I like how you go into how LazyVim does this under the hood using mason and null-ls. Looking forward to more
Thank you, yeah I wanted to remove some of the magic and help watchers know what things to look for when things work or don't work. Glad you found that helpful. Thank you for watching and having interest in the channel. Have a great rest of your week!
Perfect. I was just thinking that i don't want to read a lot to find out how to get rust clippy working with lazyvim. Now i can watch this while I'm cooking
I like the idea of someone watching one of my videos while cooking dinner. Also, thanks for your interest and I hope it is helpful. Appreciate your time and comment. And, enjoy that dinner!
And another gem of a video ! Superb as always. I bless the day YT algorithm recommended me Elijah’s channel ❤. This is an absolute must for all terminal lovers 🎉
Wow, that is quite the praise! Well, it is people like you that make this place awesome! Thank you for watching and being such an excited and supportive viewer. Have an awesome rest of your week
Excellent! Another great content to my list of strong "things" I need to add to me lazy config when I stop being so lazy about it!
Thanks! I guess "lazy" is fitting in this case ha ha. Having priorities is a good thing. Have a great rest of your week
Awesome! I always learn something new from your videos! Thank you so much!
Yay, I love that you love to learn! I do too :) Appreciate your excitement and for your support of the channel.
this is very underrated video, I loved your content. Learnt a lot!! Thank you
Thanks for the video, I went through a lot of hell trying to get Prettier setup, as I am going through some React courses. I'll need to go back and cross reference things with this video.
The ecosystem has moved a lot over the years both in the underlying Neovim APIs and also the community plugins, so I totally get you! I appreciate you watching and supporting the channel. Have an awesome day!
This was really helpful for me. I found the lazyvim documentation extremely confusing whereas this was very clear.
You're the Vim Hero!
Yay, and thank you very much for your support!
I love your lazyvim videos. You made me switch from Webstorm into lazyvim and I love it. Thank you.
I've also been waiting for this video for a million years lol. And I'm eager to see what you have in store next for lazyvim haha.
I have 3 questions though.
1. How can I remap and use Tab and Shift + Tab to cycle through completions in lazyvim?
2. How do I increase the speed of the mini animate plugin.
3. How do I remap the motion keys for neotree?
Help on any of those would be awesome, thank you sir
I've not tried super tab, but there is a recipe in the LazyVim docs for that www.lazyvim.org/configuration/recipes#supertab
As for speeding up the mini animate plugin, you can redefine that plugin and adjust the timing functions. Here is a snippet from the docs github.com/echasnovski/mini.animate/blob/main/doc/mini-animate.txt but it would look a bit different using the lazy.nvim syntax.
local animate = require('mini.animate')
animate.setup({
cursor = {
timing = animate.gen_timing.linear({ duration = 100, unit = 'total' })
},
})
I'd take a look at the LazyVim docs for guidance on how it was setup www.lazyvim.org/plugins/extras/ui.mini-animate#minianimate
As for neo-tree, I'd take a look at the LazyVim docs www.lazyvim.org/plugins/editor#neo-treenvim and then adjust the
window = { mappings = {} }
See the docs from neo-tree for guidance github.com/nvim-neo-tree/neo-tree.nvim#quickstart
Hope that helps. I'm at the hospital atm with my Mom after surgery so I haven't tried the above tweaks yet, but that is how I would go about it. Hope that helps! Have a great rest of your week
@@ElijahManor
Thank you so much. This really helped alot in helping me set them up.
Wishing speedy recovery.
@@macmanuelodumeru3708 glad that was helpful and my mom is recovering well, thank you!
Thank you so much I was banging my head against the wall how to get autoformatting for html files then you come along :D
Yay, so glad that the video was helpful!
I'd be interested in a "masterclass" type of a video, where you show how you usually code, which keys you use, and which plugins, your workflows. Maybe different languages, backend/frontend. Slowed down of course 😄. You did show a bunch in Zero to IDE video, yet I'm looking forward to learning more from someone experienced with vim 🙂.
I do have an idea like that listed in my backlog. More like a "There is a bug and let me show you how I go about fixing it" which would probably include stuff like using git, searching, movements, testing, etc... I'd prob use a multiplexer as well.
@@ElijahManor Ohh, sounds awesome!
Your channel is great, keep up the good work Elijah!
YAY, thanks :) Have an awesome rest of your day
@@ElijahManor you too 😄
Another content explained very well. Thanks
Thank you and loving the emoji flare!
Just Wondering, are you going to be doing an Update Version, with the Conform.nvim & Nvim-Lint. How to Set-Up Formatters & Linters configuring with those
As always, great content 💯
Thank you very much :) Working on new content for Mon or Tue. And will have another the following week, which isn't my typical cadence, but I wanted to sprinkle in something else too. Keep an eye out
@@ElijahManor will definitely do. Thanks a lot for the hard work 💪
Awesome content, love your videos! I'd love to see an updated video on your tmux config, it is looking saWEEEEET!
Ah thanks! Yeah, I do plan on making more videos from the tmux (those are on my backlog)... the idea was to have 2 more in the series (at least) at showing how to customize config, then use plugins. Then maybe another with custom plugins. I've also been toying with Zellij which is fun, but comes with it's own challenges if you are used to tmux.
@@ElijahManor I like what zellij is doing and may switch in the future, persistent sessions are hard for me to let go but I'm sure zellij has workflows that would help me achieve similar things. Definitely keeping an eye on it though! I am happy right now with using oh-my-tmux as a base and then tweaking it as I like, but it does result in an awfully long template config that is not enjoyable to maintain and difficult to tweak in some ways - so I'm very curious how you set it up :)
Separately, I'd love to see a dotfiles video in the future too! I'm a big fan of chezmoi right now but I think the bare repo approach is awesome too. Your style of teaching is great and easy to follow, thanks again for making all the content :)
Awesome video as always
Thank you, appreciate the encouragement and your support. Glad you enjoyed it
Super usefull. Thanks!
Glad it was helpful!
Great Video @Elijah Manor - which plugin are you using for the nice vertical line indentations? Thanks in advance.
Thanks, great video!
Wow, thank you so much! Glad it was helpful to you
I’d love if you showed a history of keys pressed instead of them disappearing as soon as you press the next one. Nice video in any case
Thank you so much !
I know I would probably be better learning this myself, but can you post your config for (or is it already posted for) the write-good, alex , and proselint combo you used?
This is completely reasonable! I was creating a GitHub repo per video, but I think it would be better to have ONE lazyvim repo and having branches for each video. Doing all that conversion might take me a bit, but in the meantime here is a gist with that file... gist.github.com/elijahmanor/5d7db1884c40e354406b6eb3d1e12dc4
@@ElijahManor Absolutely appreciated! Thank you!
I always had trouble adding new things like null ls entries to these batteries included configs. Thanks for making great example videos like this to help. Is this just how null-ls is configured for all neovim users, or is this specific to lazy vim?
Glad it helped! Well, part of it is specific to LazyVim because the extra files are provided by LazyVim, however the general concepts and underlying files could most likely be reused for non-LazyVim because they built upon lazy.nvim which is a plugin manager that many distros use these days (instead of packer). With that said, the future of null-ls is in question as the author decided to stop maintaining the project. If you stick with LazyVim you should be okay because folke (the maintainer) plans to make sure there is a path forward (whatever that might be). I've been on vacation the past week or so, so I'm a little out of the loop atm.
Great video 🔥, Video request: golang and python Linting, Formatting and debugging
I have barely tinkered with Golang and Python, so I have a LOT to learn in those areas.
I did find this recent video of someone sharing their 2023 setup for Go th-cam.com/video/LbsILONOaiE/w-d-xo.html He uses packer and doesn't use LazyVim, but it seems the pain parts the LSP and the vim-go plugin
If that is true, then something like the following should work in LazyVim. I'd make a new file in the ~/.config/nvim/lua/plugins folder called golang.lua
return {
{ 'fatih/vim-go' },
{
"neovim/nvim-lspconfig",
opts = {
servers = {
gopls = {},
},
},
},
}
As for Python, I'd probably go with pyright for the LSP, flake8 for the linter, and black for the formatter.
As for debugging, I do plan on having a video about that. It is def on my list of items for the LazyVim playlist. Thanks for watching and for your interest
I love using neovim. Even better when things work. It’s when things don’t work that it gets extra hard. And things don’t work more than I like to admit.
I enjoy it too. What types of things have you been having trouble with? Maybe I can help in some way. Thanks for stopping by the channel. Hope you have a great rest of your week!
@@ElijahManor Thanks for offering to help! I’ll put my LazyVim config online when I have some time. But after trying to config typescript lsp, linting, and formatting, thinks went south and even lua files stopped formatting haha. So this video helps a lot.
@@iatheman sounds good. I’ll keep an eye out for a future message from you. I’m currently out of town at the hospital with a family member, so my response time could be slower than normal
@@ElijahManor Thanks again. Best wishes to you and you family member.
I love your videos
Thank you so much and I appreciate your sub, excitement, and support!
is it possible to set those config options within lazyvim itself so that i don't need to create a prettierrc for every project?
I would love something similar for Vale and Markdownlint as I've been pulling my hair out trying to figure out how to set them up properly
Next, let's do debugging :)
Nice vid!
Thanks! And that topic is def on the list, but not next in line. The trick with that one is there are a lot of different languages viewers want to see (TypeScript, Rust, Golang, Python, C++, etc). I'll prob focus on one of those and hopefully enough is similar or I can point to docs for the others. Also, I'm not very knowledgeable about some of those languages so that could be *interesting* ha ha.
@@ElijahManor That makes sense. I had to try hahahah. Thank you!
Subbed *with* alerts.
Awesome, thank you! Have a great rest of your week
My Prettier formatting doesn't work at all for some reason. I tried to do as you said, my react App.js/App.jsx, nothing gets formatted. Any Hint!
@ElijahManor i got that link for your next video is from your "Terminal Rocks" playlist...
also today i switched to LazyVim :) thanks for this video....
Ha, wow I didn't think that through. Didn't think anyone would see that until I marked it as public. But yeah, I put it on a playlist. Lesson learned ha ha. Glad you watched the videos and that you like LazyVim :) Also, congrats on being first to watch that other video ha ha ha. It'll launch on Saturday morning for others to watch
@@ElijahManor 😆
@@vaisakhkm783 btw, I'll answer your other comment after it gets officially launched (if it's still there). If somehow it got deleted, please leave the comment again. I forget all that you said. I was more shocked that someone left a comment ha ha. Have a great rest of your week
@@ElijahManor 😅 Np... i didn't asked a question... i was telling wrap is a good concept, but it does not treat everything as a 2d char grid... so traditional tooling might fail... like vim in your case... :) lets see will it become as popular as alacrity or kitty once the hype is over....
@@vaisakhkm783 ah gotcha. yeah, i've communicated a lot of my thoughts with the team. i also look forward to seeing how it improves over time. my top 3 requests are better rendering, tmux support, and font fallback. i use several TUIs and they all seemed to work, but they might be a bit off on alignment, etc...
null-ls is no more available by default and the project was archive. What to do now? Please, help us!
booped! Are you planning to build up a vanilla lazyvim install with your examples? If not, could you consider that and share? It's easier to follow along that way. Thank you for your videos! I just moved from Doom Emacs to lazyvim so this series is very timely!
Thanks for the boop! I had another person ask something similar. I was making new repos for some of the videos, but I think it would be better for me to have one lazyvim repo for the series and make branches for each one. That might take me a bit, so in the meantime here is a gist with the contents of the writing.lua file gist.github.com/elijahmanor/5d7db1884c40e354406b6eb3d1e12dc4
@@ElijahManor thank you!
cool stuff🎉
Always appreciate your excitement and support!
Thanks!
Sure thing, glad you liked it!
Hey was just wondering how would you do this from the Kickstart nvim
Hey Vim hero!
I wanted to ask, is it normal for code action null-ls to run after every single keystroke?
If not is there a way to limit it as it seems to be affecting performance in that some times keys i press get skipped because code action null ls ran at the same time i pressed the key.
Hmm, which code action are you referring to? Which item did you register with null-ls to have a code action?
@@ElijahManor I'm not sure. I'm just using the defaults for JavaScript that comes preinstalled with Lazyvim. Although I did add some plugins like auto save
If I press any key, be it in Normal, Insert or Visual mode or even if I am clicking with my mouse, I always see the notification at the bottom right corner saying "code_action null-ls" with a blue tick. And it's interfering with and lagging my typing.
@@macmanuelodumeru3708 hmm, guess I’d need to see your setup. You have your dot files in a repo?
Hello, sorry for this basic question, but why setup eslint and prettier with lsp and with null-ls too? Also, eslint on save corrects some errors but, for example, it doesn't sort imports. Thanks
The eslint and eslint_d options for null-js are either VERY slow or lacking in features in my experience. So leveraging the ESLint LSP both helps with speed and a richer set of features.
As for Prettier (prettierd to be exact), it works nicely and quickly with null-ls (as well as many of the other linters/formatters that I've used).
@@ElijahManor Thanks for reply. So I setup eslint with LSP and prettierd to null-ls? If I setup prettierd in both files (lsp and null-ls) what is happened?
@@mazzu83 Prettier is not available as a LSP, so not sure exactly what you mean. You'd see prettierd installed with Mason, but that is an executable that is installed and used under the covers by null-ls. Null-ls has the info on how to communicate with pretierd (what you see from Mason). However, I could be misunderstanding what you are asking.
@@mazzu83 Gotcha. There isn't a double import. Let me try to explain...
{ import = "lazyvim.plugins.extras.formatting.prettier" }, is the only thing you need to do in the lazy.lua file.
That import has all the mason and lsp stuff inside of that file and does the setup for you. That page in the doc is trying to show you what all is happening under the covers. You can look at the full file here... github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/plugins/extras/formatting/prettier.lua
In that one import it registers with mason which will install the prettierd runtime (the executable that actually does the formatting) and registers prettierd with null-ls (which knows how to communicate with prettierd and has a bunch of rules like which filetypes to use, etc) github.com/jose-elias-alvarez/null-ls.nvim/blob/main/lua/null-ls/builtins/formatting/prettierd.lua
I hope that helps clear things up. There is only one import needed and it does all of that stuff for you.
@@ElijahManor wow, now I understand how it works. Really really thanks for explaining very well.
If I add the tailwindcss prettier plugin to my prettierrc file it breaks prettier formatting and the plugin also doesn't work. If I use the prettier cli command to run the plugin that works, I've been googling this for like two hours and can't seem to find a solution. Would very much appreciate it if you could help with this issue I'm new to coding in general and very new to neovim. Thanks!
How can I use telescope to show the code actions instead of noice? 5:23
Telescope removed code_action in favor of `:lua vim.lsp.buf.code_action()` and `code_action` uses `vim.ui.select` under the hood. LazyVim includes the dressing.nvim plugin github.com/stevearc/dressing.nvim which overrides what vim.ui.select looks like
Is there a way to search for symbols that are in the classpath? So, let's say I have a YAML file that defines a pipeline, and the pipeline references a Python class. How would I go to definition/or search for definition in this case (this kind of search is very easy in JetBrains IDEs)?
If you are within a file that supports LSP (like TypeScript) you can use some of the keymaps to navigate www.lazyvim.org/keymaps#lsp such as:
gd Goto Definition
gr References
gD Goto Declaration
gI Goto Implementation
Buf if you are in a YAML file I don't think it would know symbols from another type, so from there I'd try one of the following www.lazyvim.org/keymaps#telescopenvim
`sS` Goto Symbol (Workspace)
`sg` Grep (root dir)
`sw` Word (root dir)
@@ElijahManor thank you for your answer! I tried those, but it doesn't work, it says "method workspace/symbol is not supported by any of the servers registered for the current buffer". I also tried attaching pyright (LSP) directly to the buffer with the YAML file, but it doesn't work either, probably because it can't really analyze non-Python files.
is there a github repo where we can copy and paste the code?
Can you also tell us how to setup prettier with kickstart neovim. Installing with Mason doesn't give the same behaviour that VS code does
how I can format on save typescript by eslint file config?
Hi,
I really like this video, but I have one question.... How to disable prettier just for let say: php files and TypeScript files?
Great question, I tried to answer it (along with other ideas) in this gist gist.github.com/elijahmanor/9e12c3c9c357e177a9b40a39fd739e12
This is a great way to disable it for your entire neovim setup, but if you just need to ignore files in one project, you can also use a `.prettierignore` file
@@ElijahManor For me it works perfectly. Thank you very much.
Great video!
Which theme were you using on it?
I'm pretty sure for that video I was just using the baked-in LazyVim theme which is tokyonight github.com/folke/tokyonight.nvim. However, I also use catppuccin github.com/catppuccin/nvim which I may have had turned on in that video. Either one of those are pretty great. I also generally like dracula github.com/Mofiqul/dracula.nvim
@@ElijahManor Oh, so it really was tokyonight hahaha I switched it when I installed Lazyvim. Gonna give it a chance 😁 Thank you!
@@nathalyaricci No problem! Have an awesome weekend
@@ElijahManor You too !
Love the content!
Would it be possible to do a video on how to set this up for golang?
I have barely tinkered with Golang, so I have a LOT to learn in that area.
I did find this recent video of someone sharing their 2023 setup for Go th-cam.com/video/LbsILONOaiE/w-d-xo.html He uses packer and doesn't use LazyVim, but it seems the pain parts the LSP and the vim-go plugin
If that is true, then something like the following should work in LazyVim. I'd make a new file in the ~/.config/nvim/lua/plugins folder called golang.lua
return {
{ 'fatih/vim-go' },
{
"neovim/nvim-lspconfig",
opts = {
servers = {
gopls = {},
},
},
},
}
How do you know which extra plugins are available? I missed that part in the video
Great question! There is an Extras section in the LazyVim docs that lists them. Over the past several months new ones keep being added so it's a good place to look now and then www.lazyvim.org/plugins/extras/formatting.prettier
Hey maybe you can hely... how can i set max line length for formatters like yapf
Is the eslint plugin for LazyVim new? I swear I couldn't get a config to work with both eslint and prettier since I switched to LazyVim a month or so ago.
Now I've got all this extra stuff with lsp-zero and it's all too complicated!
I might try go back to just the built-in LazyVim plugins.
Yes the plugins for eslint and prettier are relatively new. They did not exist when LazyVim first came out. The discussions tab on the LazyVim repo has some good info about lots of things github.com/LazyVim/LazyVim/discussions and I'm guessing some of these plugins came out of that.
7:20 Prettier did not change double quotes on line 15
Good timing! I'm working on a project where I'm not allowed to format scss but I'd still like to use prettier for JS. How would I go about that?
you can specify which file formats you do not want to format
Love that others are responding before me. Yes, you can customize a lot of settings for prettierd. I hadn't responded yet because I wanted to get a detailed explanation with code examples, etc. I'm at work right now, but will work on that tonight and respond in more detail. I'm getting this type of question for other scenarios too, so I'd like to take focused time to respond. Thank you for your interest and support
@@ElijahManor Absolutely 💯
Okay, here are some thoughts about some more advanced tweaks for prettier gist.github.com/elijahmanor/9e12c3c9c357e177a9b40a39fd739e12
@@ElijahManor That's fantastic thank you so much! I'll give the config ahi between today and tomorrow 💪🏻
HI ! HOW CON U FORMAT ON SAVE WITH TABS ??
Great question, I tried to answer it (along with other ideas) in this gist gist.github.com/elijahmanor/9e12c3c9c357e177a9b40a39fd739e12
An easier answer to your question is to add a prettier config file to the root of your project, but the above gist has some more advanced ideas that could be helpful to you and could also answer the question.
@@ElijahManor THANK YOU VERY MUCH ! I'LL TAKE A LOOK :)
Sure thing, you might use that `npx prettier-init` tool to generate your prettierrc file (unless you want to make your own). Or the other technique I showed should work too (but is more advanced)
Hi, amazing video! I'm tesing it and stylua server don;t work, I had to install in in my system manually 🙂 Any idea?
Thanks!
You know, a while back I had issues with path stuff when installing additional linters/formatters, but that seems to have gone away for me. I'm not sure if it was an upgrade of LazyVim, an upgrade of one of the many plugins, an upgrade of Neovim itself, a possible tweak in my .zshrc file, or something else.
But, before that I solved the issue a few ways.
1. You can install a linter/formatter manually and globally (which it sounds like you did)
2. You can tell null-ls where the linters/formatters are located
3. Adjust your PATH to include the location where your linters/formatters are being installed
For #2, you could do something like...
{
"jose-elias-alvarez/null-ls.nvim",
opts = function(_, opts)
local nls = require("null-ls")
local mason_bin = vim.fn.stdpath("data") .. "/mason/bin"
opts.sources = vim.list_extend(opts.sources, {
nls.builtins.diagnostics.proselint.with({
command = mason_bin .. "/proselint",
}),
})
end,
},
however, since it was already registered by LazyVim it'd be a bit more complicated. You'd need to unregister and re-register stylua, sort of like I did in this gist... gist.github.com/elijahmanor/5d7db1884c40e354406b6eb3d1e12dc4
For #3, you could do something like...
I'd double check where mason is installing your stuff. It should be in the following location...
:lua print(vim.fn.stdpath("data") .. "/mason/bin")
Then append that to your PATH in your .zshrc (or whatever shell config you use). You can peek and see if you see stylua here...
ls ~/.local/share/nvim/mason/bin
Thanks @@ElijahManor for your time! I will test it ;-)
How to customize the dashboard in lazyVim??
Great question! You can add a new file to the ~/.config/nvim/lua/plugins folder maybe called alpha.lua and override whatever options you want
Here are the options that LazyVim is using, but you are welcome to adjust them how you want www.lazyvim.org/plugins/ui#alpha-nvim
An idea would be to have something like this...
return {
"goolord/alpha-nvim",
opts = function(_, opts)
local logo = [[
███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗
████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║
██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║
██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║
██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║
╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝
[ @elijahmanor ]
]]
opts.section.header.val = vim.split(logo, "
", { trimempty = true })
end,
}
Can you show us alternative for code runner and error lens how to set up lsp with lazy vim custom shortcut in lsp
Hm, I'm not sure if I'm following the question here. What is it that you are wanting to change?
how the hell do i comment a single or mutiple lines inside LazyVim i cannot seem to find it how it is done
Looks like it was changed to use mini.comment github.com/echasnovski/mini.comment and I wonder if the keymaps section was accidentally moved from the LazyVim keymap docs www.lazyvim.org/keymaps Via the mini.comment docs gcc is the common way to comment, but you can use motions, visual selections with gc etc…
Btw, if you press the letter `g` then which-key will come up and you'll see `c` for comment. Pressing the leader key (space) and waiting for which-key is good for finding keymaps and also pressing `g`. Also sk will search for keymaps in telescope. You could type comment there and see `gcc` for example to comment a line
@@ElijahManor Thanks for the comment the sk for searching keymaps is a life saver. One more thing that i am struggling with is trying to remap to perform zz as i want it centered after moving up and down but inside keymaps.lua i tried doing it with vim.keymap.set but could'nt really remap that existing keymap. Any help is appreciated. I am new so the question might be simple but Neovim can be overwhelming for a new experience.
@@ElijahManor i actually found how it was supposed to be done i guess i just had to figure out the syntax a little
vim.keymap.set("n", "", "zz", { remap = true })
That did it.
Can you make a video on AstroNvim? That would be really helpful.
I've not spent much time with AstroNvim, but I do want to dig into it more. I'm a bit on a LazyVim playlist, so I'll prob stay on that for a bit (as well as side things that pop in here and there). But yes, I'd like to focus time on some of the other distros and either have a focused video on them and/or have a compare/contrast video. But as I mentioned, I have a lot of backlog ideas ahead of that.
@@ElijahManor That's great. I do enjoy all of your content. I am learning a lot from you. When you get time, a video comparing different neovim distros will be a great help.
Mine is not working, so sad.
Oh no, what doesn't work about it?
@@ElijahManor Wow, didnt expect that you will respond hahahaha, actually it is working now, just have to fix the warnings on CheckHealth (helped by my coworker) regarding on Node (should be 18 and above), Python (shoud be on 3 and above), also must set those version as default executable file when running its command, such as when typing node -v should have version 18 and above :)
Too fast, I cannot check what you input
Yeah, wasn't in love with the way I was showing keys and don't like the options on macOS... so I ended up writing my own. Hopefully future videos will be easier to decipher what I'm doing (keys I'm pressing).
Welp, I'm thoroughly lost. This video assumes a lot of prior knowledge about the inner workings of lazyvim, it seems. It also assumes you're a JS developer (I'm not). All I wanna do is just get the nix linter working. That's it. That's all. And yet the documentation available is bereft of any sort of clear, "here's how to take the initial setup of lazyvim and enable a linter".
I think the biggest reason for my confusion is that you didn't actually explain the _why_ of what you were doing. You just said what you were doing, did it, and...well that's it really. That and this video's specificity re JS. A better title would have been "Linting and Formatting JavaScript".
And for anyone else who is similarly baffled and just looking to turn-on linting:
1. Open the extra plugin list by either hitting x at the main menu or :LazyExtras
2. Scroll down to the language plugin you want to enable
3. With your cursor over that plugin, hit x
Done. Only if your language is not already supported do you have to go spelunking in the configs. (Typescript _is_ available. ESLint _is_ available. Neither require you to touch the config files; just enable them as any other plugin, following the steps above, under :LazyExtras )
consider your video booped. lol.
Much appreciated! You are a trooper
@@ElijahManor I think that technically makes me a booper. Lol.
Thanks!
Oh boy, thank you for the super thanks! Glad you found value from the video