Discord server: / discord Donations: ko-fi.com/vimjoyer All code blocks from the video: github.com/vimjoyer/nixvim-video nixvim docs: nix-community.github.io/nixvim/ previous nix + neovim video: • Neovim and Nix home-ma...
Пікірлер: 85
@GaetanLepage5 ай бұрын
Thank you so much for presenting this project so clearly and efficiently ! Your videos are always amazing to watch :)
@yoshiyahoo15525 ай бұрын
The primagen needs to see this
@sachinchaudhary1310Ай бұрын
he did
@IamPyu-v29 күн бұрын
@@sachinchaudhary1310 Not before this the comment your replying to ;-;
@sachinchaudhary131028 күн бұрын
@@IamPyu-v i know
@aloneer05295 ай бұрын
Your videos are extremely helpful! They helped me with my NixOS config!
@ardishco5 ай бұрын
Happy to see you in the comment section Alxhr0
@Redyf5 ай бұрын
YES, I've been making my own config for 5 days now. Nixvim is amazing, also thank you for making this video!
@Aditya-ny8ur5 ай бұрын
Thank you very much for the video
@Chandramumta5 ай бұрын
Hi, mighty Vimjoyer. Could you make a video about wine, bottles and other staff in NixOS? I am trying to set them up for a month now and they don`t work for me at all.
@TheMattSturgeon5 ай бұрын
Was wondering when you'd find nixvim 🎉🎉
@ThibautLamadon5 ай бұрын
love nixvim!
@_modiX5 ай бұрын
I maintain my own vim configuration on top of NvChad, but oh boi, this is just magic, wow.
@astronemir4 ай бұрын
Awesome, thanks
@caedis_5 ай бұрын
Any thoughts on creating a video on nixos impermanence via tmpfs as root or restoring root as an empty zfs/btrfs snapshots?
@CEOofGameDev5 ай бұрын
its nix all the way down...
@eli18825 ай бұрын
You misunderstand nix.
@Official_R_deep5 ай бұрын
I'm configure neovim with nvchad. When I decide to use nixvim. I'm thing it is big mistake but after try three to five day. I'm very happy about it. But best part configuration. It come with lot of configuration. For nixos user I recommend use nixvim.
@Muaahaa5 ай бұрын
I think this is a cool approach, but I prefer to keep as much in Lua as I can, except for installing plugins and their dependencies which I do in Nix. With Lua, I'm still working with codified configuration which is the important part for me, but I still get the advantage of having a more idiomatic nvim config.
@GekoPoiss5 ай бұрын
You can just include Lua files in your Nix config.
@Muaahaa5 ай бұрын
@@GekoPoissYup, that is what I do. My neovim config can be run as a flake and isn't tied to any nix frameworks or libraries. Just some wrapNeovimUnstable neovim-unwrapped... The Lua is structured more or less like a standard nvim config (although I've rolled my own plugin manager that sets up plugins, but does not install them since I've got nix doing this).
@GekoPoiss5 ай бұрын
Nice - next step is to use a decent editor, like Emacs :) @@Muaahaa
@JonnyIrwin5 ай бұрын
Thanks for this! I recently setup my Neovim config in nixvim & while it largely works well, I’m undecided whether I want to use this or use a pure Lua config. I’ve had issues with things like getting option autocompletion working with the nixd LSP server. I’ve looked through source code and not sure if it is correct in nixvim, or my version of nixd is too old…or whether I just don’t yet know enough to set it up correctly.
@vimjoyer5 ай бұрын
Nixd is a bit hard to setup, I recommend nil_ls which mostly "just works". I'll make a video about most major nix LSPs later
@JonnyIrwin5 ай бұрын
@@vimjoyer I’ve switched to nil_ls. It was just the prospect of option completion that made nixd attractive.
@IndigoVFX5 ай бұрын
@@vimjoyeryet nixd actually uses nix to evaluate and parse the code you write as opposed to sitting on top of another parser… at least that’s the way I read it when I compared, though I might be mistaken. On my NixOS setup I have it working with Helix but have yet to try it with Nixvim 🤔
@mahmoodsagharjooghi4 ай бұрын
This is super interesting! Thanks! ❤❤ I was wondering how do you make those nice code transition effects? 🤔
@vimjoyer4 ай бұрын
software is called `motion canvas`
@mahmoodsagharjooghi4 ай бұрын
Thanks! Appreciate it! 🫶
@Redyf5 ай бұрын
Can you make a video about declarative disk partitioning and formatting with Disko?
@kokomema5 ай бұрын
It would be great to compare two interesting text editors, Emacs and Helix. Both are modular, extensible and oriented towards user customization
@ElGnomistico5 ай бұрын
Helix not so much so, it's whole motto is to be "batteries included" and to come with somewhat sensible defaults so at least for now it isn't very extensible or customizable.
@Redyf5 ай бұрын
Neovim better@@ElGnomistico
@TheSast5 ай бұрын
Is it possible to use it together with other distros (specifically the ones that are just handled as lua plugins)?
@vimjoyer5 ай бұрын
You can use them separately, but I don't think there's a way to integrate them together.
@daddyDangle5 ай бұрын
Please do a collab with @Primeagen and @TJ
@lennyescott5 ай бұрын
would it be possible to configure nixvim's colorscheme with nix-colors? I saw in the colorschemes "base16", so maybe it could be possible? Thanks
@vimjoyer5 ай бұрын
Sure, you can interpolate colors into highlight groups.
@harshilbhatt15564 ай бұрын
How do you manage multiple flakes? Are they concatenated into 1 file or is there a better way to do this?
@vimjoyer4 ай бұрын
Flakes can import other flakes with web or filesystem urls, but you can include as many projects in one flake as you want. It all depends on your specific use case.
@harshilbhatt15564 ай бұрын
So would you run a nixvim flake for each project, or modify the "global" flake at /etc/nixos in this case
@slim57825 ай бұрын
How did you get the mapleader to space? It's still bound to next character in my normal mode.
@vimjoyer5 ай бұрын
globals.mapleader = " "; Works in an empty setup without anything else, just tested.
@slim57825 ай бұрын
Thanks for responding, must be me then. Have a nice day! i'll make a donation @@vimjoyer
@underflowexception5 ай бұрын
I've been playing with NixOS over the last day and now I want to be able to pull my dotfiles from git into the OS automatically but I don't know how... can anyone point my in the right direction?
@vimjoyer5 ай бұрын
What do you mean by automatically? You can use git clone or nixos-rebuild --flake to fetch it from GitHub.
@ggorg05 ай бұрын
Kinda late here, but I use Emacs, specifically Doom Emacs because I'm lazy. It has very crappy integration with Nix and I barely managed to get it working using nix-doom-emacs. I'm actually considering switching over to Neovim (maybe also Neovide, the GUI frontend?), but I will definitely miss some of the Emacs features, especially Org mode. I really don't wanna leave the Emacs ecosystem, but it's just too unpopular to actually be useful and receive good support. Everyone just makes plugins for VSCode nevertheless...
@geryz75495 ай бұрын
Neovim has lots of Org mode alternatives, most notably Neorg, although they may not have all the functionality of Emacs' Org mode
@trejohnson76775 ай бұрын
if it makes u feel better getting prety much anything except software-you-write to work on nix is a fucking pain.
@hansdampf22845 ай бұрын
Can I install emacs?
@wiltedblackrose5 ай бұрын
Sounds amazing! What about lazy loading?
@vimjoyer5 ай бұрын
There is an issue opened called "[Feature] Lazy loading", so I guess it's coming
@wiltedblackrose5 ай бұрын
@@vimjoyer Great! Thank you!
@0xCAFEF00D5 ай бұрын
Sorry to bring some negativity. But I don't see the point. The video doesn't quite make the case for nixvim and would be greatly helped by an introduction explaining the core ideas. From this presentation it seems a marginal difference to just default neovim configuration with lazy. You have your lazy.lua with a plugin list (identified by string rather than plugins.plugin.enable like here). Plugins often require you to run a setup. Frequently just a require and a setup function call with no argument. Which you could do with the config field in lazy, it's just a very tiny difference. The *_potential_* benefit I do see is that nix might provide defaults for supported plugins that may lack them. It might resolve keymapping conflicts or overall have a system of keymapping structuring that makes it maximally consistent for whatever plugins you might use together. But that's not presented here. That would be incredibly useful for someone who wants defaults as much as possible. You set options in a very similar way, vim.o.shiftwidth=4, just not declared in a table. Of course neovim options aren't just in .o, so clearly this is good if they're now sensibly unified. I find the lsp config presentation most confusing. It would be one thing if just that server list with .enable was required and it creates nice sensible defaults for you with literally no config on your part or only exposing a set of rebinding options. In line with the key mappings idea. But you've replicated the lsp_config example config on github within a difference of maybe 5-10 lines. And you've obfuscated control. With lsp_config it's perfectly clear. It uses vim primitives like autocmd which will be used elsewhere in almost any config. The benefit is just so marginal. Maybe the big benefit isn't mentioned. Maybe the person who made nixvim absolutely loves declarative configuration and this is for those people. That's good. But from my perspective it's not that different.
@vimjoyer5 ай бұрын
I agree with you on some points, but the difference between using lspconfig and nixvim is that nixvim I also installs lsp servers for you. It's more comparable to Mason, minus installing dependencies like npm. Nixvim ensures that your setup will work on every machine.
@0xCAFEF00D5 ай бұрын
@@vimjoyer You're right, I forget I have mason becuase I don't have to touch it. Which to me doesn't make it that important to abstract away. OS support is a big plus. I would guess that newer neovim users are more likely to have to use windows some of the time.
@durhamparkour5 ай бұрын
How do you take this flake and use it as you would the regular neovim package system wide?
@vimjoyer5 ай бұрын
Many ways to achieve it: 1. Use home-manager/NixOS module 2. Add this flake as an input to your flake and take default package from there 3. Just copy the output part from this flake into your home-manager/NixOS flake systemPackages
@pmmeurcatpics3 ай бұрын
@@vimjoyerI've been struggling to wrap my head around this for 2 days now.I wanted to define the nixvim configurations in a file called nixvim.nix, and then import it into home.nix. But I get a recursion error when I do that. My setup has these 3 notable steps: 1) `modules = [./home.nix];` in flake.nix 2) `import = [./nixvim.nix];` in home.nix 3) `import = [inputs.nixHomeManagerModules.nixvim];` in nixvim.nix 4) ..and then I hope to put the actual nixvim setup inside nixvim.nix Now that I think of it, in step 3, nixvim.nix calls `inputs`, which is defined in flake.nix, which in step 1 itself calls nixvim.nix (via home.nix), and I guess that's why the recursion happens. The only solution that comes to mind is to somehow re-export inputs.nixHomeManagerModules.nixvim as nixvim from inside flake.nix, so that nixvim.nix can then just use it without causing recursion, but I'm not sure if/how one can do this. But you somehow aren't having to do any of this in your video, and use a flake instead. What I don't understand is how you connect it to your home-manager configuration. Do somehow import that flake into home.nix somehow? Or maybe even the home-manager's flake.nix? If so, how?? I honestly have no idea anymore
@GeorgeGzirishvili5 ай бұрын
Is there an easy way to convert my existing shell customizations into Nix language syntax? I use a theme, plugins, aliases, functions, set environment variables, etc. I also try to make it portable, so it works on multiple shells, and sometimes I use loops to do multiple operations. Can I replicate this wit Nix? I know Nix is functional, not procedural.
@vimjoyer5 ай бұрын
Home-manager has options for all major shells, and interpolating packages into them ensures that your shell will work the same way on any OS. Managing themes and plugins with nix is also very easy.
@adjbutler3 ай бұрын
Nixvim > lazy
@grawlixes4 ай бұрын
What if I want to install and configure nixvim entirely from my home-manager?
@vimjoyer4 ай бұрын
Use home-manager module and configure everything with `nixvim = {}` option
@grawlixes4 ай бұрын
Thank you, loving the vids @@vimjoyer
@karlwalter6663 ай бұрын
@@vimjoyerHow exactly would you go on about this solution? I'm using flakes and declaring home-manager module in my flake.nix, but I struggle to make the nixvim option visible in home.nix.
@ivanjermakov5 ай бұрын
So Nixvim maintainers need to support configuration of every plugin in existence? Does not sound sustainable.
@ivanjermakov5 ай бұрын
I checked the source code and they really have flake configuration for every plugin they support, some of them are over 500 loc long...
@GaetanLepage5 ай бұрын
I have a fairly low amount of sleep time.
@sachinchaudhary13102 ай бұрын
@@GaetanLepage sad
@GaetanLepage2 ай бұрын
More seriously, we are shifting to adopting the "settings" convention from RFC-42 for the plugins. This is much more sensible and sustainable.
@sachinchaudhary13102 ай бұрын
@@GaetanLepage means u don't have to make those settings thing ? user can do normally ?
@mzakyr3425 ай бұрын
is somoene make a package manager using brainf**k i don't know how to make it
@vimjoyer5 ай бұрын
Make a brainf**k to nix transpiler 🧠
@mzakyr3425 ай бұрын
@@vimjoyer somoene proably makes a brainf**k compiler in nix maybe somoene could do it.
@lukeE63215 күн бұрын
Have you managed to modularize your nixvim config and keep stylix working? I followed a blog post from Valentin Pratz about using "inputs.nixvim.legacyPackages.x86_64-linux.makeNixvimWithModule" to allow the config to span multiple files, but stylix doesn't seem to detect and theme nixvim anymore, and I can't work out how to tell it to.
@vimjoyer12 күн бұрын
I prefer to have a separate theme for my editor, so I didn't connect my neovim to stylix