- Notifications
You must be signed in to change notification settings - Fork1.7k
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Here is how to setup LazyVim using Nix and home-manager. This can reuse files from pkgs.vimPlugins.*, works without internet after nix build. {config,lib,pkgs, ...}:{programs.neovim={extraPackages=withpkgs;[# LazyVimlua-language-serverstylua# Telescoperipgrep];plugins=withpkgs.vimPlugins;[lazy-nvim];extraLuaConfig=letplugins=withpkgs.vimPlugins;[# LazyVimLazyVimbufferline-nvimcmp-buffercmp-nvim-lspcmp-pathcmp_luasnipconform-nvimdashboard-nvimdressing-nvimflash-nvimfriendly-snippetsgitsigns-nvimindent-blankline-nvimlualine-nvimneo-tree-nvimneoconf-nvimneodev-nvimnoice-nvimnui-nvimnvim-cmpnvim-lintnvim-lspconfignvim-notifynvim-spectrenvim-treesitternvim-treesitter-contextnvim-treesitter-textobjectsnvim-ts-autotagnvim-ts-context-commentstringnvim-web-deviconspersistence-nvimplenary-nvimtelescope-fzf-native-nvimtelescope-nvimtodo-comments-nvimtokyonight-nvimtrouble-nvimvim-illuminatevim-startuptimewhich-key-nvim{name="LuaSnip";path=luasnip;}{name="catppuccin";path=catppuccin-nvim;}{name="mini.ai";path=mini-nvim;}{name="mini.bufremove";path=mini-nvim;}{name="mini.comment";path=mini-nvim;}{name="mini.indentscope";path=mini-nvim;}{name="mini.pairs";path=mini-nvim;}{name="mini.surround";path=mini-nvim;}];mkEntryFromDrv=drv:iflib.isDerivationdrvthen{name="${lib.getNamedrv}";path=drv;}elsedrv;lazyPath=pkgs.linkFarm"lazy-plugins"(builtins.mapmkEntryFromDrvplugins);in'' require("lazy").setup({ defaults = { lazy = true, }, dev = { -- reuse files from pkgs.vimPlugins.* path = "${lazyPath}", patterns = { "" }, -- fallback to download fallback = true, }, spec = { { "LazyVim/LazyVim", import = "lazyvim.plugins" }, -- The following configs are needed for fixing lazyvim on nix -- force enable telescope-fzf-native.nvim { "nvim-telescope/telescope-fzf-native.nvim", enabled = true }, -- disable mason.nvim, use programs.neovim.extraPackages { "williamboman/mason-lspconfig.nvim", enabled = false }, { "williamboman/mason.nvim", enabled = false }, -- import/override with your plugins { import = "plugins" }, -- treesitter handled by xdg.configFile."nvim/parser", put this line at the end of spec to clear ensure_installed { "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = {} } }, }, }) '';};# https://github.com/nvim-treesitter/nvim-treesitter#i-get-query-error-invalid-node-type-at-positionxdg.configFile."nvim/parser".source=letparsers=pkgs.symlinkJoin{name="treesitter-parsers";paths=(pkgs.vimPlugins.nvim-treesitter.withPlugins(plugins:withplugins;[clua])).dependencies;};in"${parsers}/parser";# Normal LazyVim config here, see https://github.com/LazyVim/starter/tree/main/luaxdg.configFile."nvim/lua".source=./lua;} |
BetaWas this translation helpful?Give feedback.
All reactions
❤️ 29🚀 2👀 6
Replies: 30 comments 87 replies
-
Where do I put my own LazyVim config? For examplehttps://github.com/multivac61/.config/blob/main/nvim/lua/config/lazy.lua |
BetaWas this translation helpful?Give feedback.
All reactions
-
How do you install mason? Or do you use something instead? |
BetaWas this translation helpful?Give feedback.
All reactions
😄 1
-
Read the comments of spec. For more references, seehttps://github.com/azuwis/nix-config/tree/master/common/lazyvim |
BetaWas this translation helpful?Give feedback.
All reactions
-
So you don't use mason at all. Do you use anything else to maintain and install lsps? |
BetaWas this translation helpful?Give feedback.
All reactions
-
Use |
BetaWas this translation helpful?Give feedback.
All reactions
👍 11
-
Thank you for your kind replies. Greatly appreciated. |
BetaWas this translation helpful?Give feedback.
All reactions
😕 1
-
I'm getting the following error withthis config. |
BetaWas this translation helpful?Give feedback.
All reactions
-
I added a lua dir (empty) and I'm no longer getting an error but I still don't have an init.lua |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Missing |
BetaWas this translation helpful?Give feedback.
All reactions
👍 2
-
Thanks for the quick reply. I decided to usenixvim instead. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Is it possible to use this without home-manager so it can be run with the nix run command? |
BetaWas this translation helpful?Give feedback.
All reactions
-
A demo to setup LazyVim using NixVimhttps://github.com/azuwis/lazyvim-nixvim/tree/master |
BetaWas this translation helpful?Give feedback.
All reactions
-
@azuwis Any idea how to also include treesitter parsers in the nixvim flake? |
BetaWas this translation helpful?Give feedback.
All reactions
-
https://nix-community.github.io/nixvim/plugins/treesitter/index.html should work. |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
It did not, since rtp gets cleared when lazy.nvim starts :) |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
I really like this. But what i don't get. How can i use the LazyExtras. First of all how does it working through the IDE, cause i can't find the settings it does? -> ok this is comming by default with LazyVim found under lazyPath from nix config. So i think the json just activates it then. So then i just need to find out how to overwrite the lua configs with nix and how to manage lazyvim.json with nix And second, how can i insert the lazyvim.json in nix (the file which saves the enabled extras)? |
BetaWas this translation helpful?Give feedback.
All reactions
-
I'm just stepping into (and loving) Nix/nix-darwin/Home Manager world and have been keeping this discussion in mind. This morning I adopted this config (module? function? 🤷♂️) and it's working great. Thanks@azuwis for sharing this and your broader Nix configuration, super helpful! |
BetaWas this translation helpful?Give feedback.
All reactions
-
Thanks, this config works great! My only issue is that when I startup neovim, I get this error message: "No specs found for module plugins". How can I fix this? |
BetaWas this translation helpful?Give feedback.
All reactions
-
Same issue here, not (yet) gone for me. Replying to keep the discussion active |
BetaWas this translation helpful?Give feedback.
All reactions
-
Remove those lines if you don't setup any LazyVim plugins: |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1
-
Yup, that removed the error! Could you explain to me what that does? I don't have much understanding of the Nix language, so I simply copy-pasted your code 😅 |
BetaWas this translation helpful?Give feedback.
All reactions
-
I think I see what happened. Removing |
BetaWas this translation helpful?Give feedback.
All reactions
👀 2
-
i am trying to override some of the configuration that lazyvim has setup, and I am so very confused on to do this, given the fact that lazyvim is being setup by nixvim through the Here is my configuration, (i am trying to implement the@azuwis way of things but in my home-manager)https://github.com/shivajreddy/dotfiles/blob/main/home/apps/nixvim/default.nix |
BetaWas this translation helpful?Give feedback.
All reactions
-
What is the purpose of the plugin list in the |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Using vimPlugins from nixpkgs make the setup reproducible, and works in air-gapped environment. In Nix, the build binary cache can be shared using You can make the plugin an empty list |
BetaWas this translation helpful?Give feedback.
All reactions
👍 2
-
Hey there, sorry for the newb comment/ question, but I am new to both nix, and nvim. I have been trying to add obsidian-nvim to this setup. I think I have gotten 75% of the way there, but I keep getting this error ``` - ERROR Issues were reported when loading your specs:
and, obsidian is showing as installed, but not loaded when running lazy. I have also manually set the plugin in xdg.config file, and no change.. any advice is appreiciated. TIA |
BetaWas this translation helpful?Give feedback.
All reactions
-
Maybe share a little configuration? It's not clear from context what ...extraLuaConfig=letplugins=withpkgs.vimPlugins;[# LazyVimLazyVim...obsidian-nvim... |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
For anyone interested, I have created a standalone flake based on this (without nixvim ;) ), with additional fixes for treesitter and all the configuration done in regular lua :) |
BetaWas this translation helpful?Give feedback.
All reactions
❤️ 8
-
how could I copy all the downloaded stuffs to another offline machine so that I could bundle the dev env in ci and copy them on those offine machines |
BetaWas this translation helpful?Give feedback.
All reactions
-
@qlibp you look at my dotfiles and the nvim config, i added comments there on how to get lazyvim to get to work with nixos. |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1
-
can I use it on non-nixos machine? |
BetaWas this translation helpful?Give feedback.
All reactions
-
This no longer seems to be working for me after updating today (using unstable). Treesitter seems to point to its own dir now. When trying to set parser_install_dir... And when setting it to my neovim config dir specifically, it states that parser needs to be read/write (which it obviously isn't in this case). |
BetaWas this translation helpful?Give feedback.
All reactions
-
Same for me, related#3702 |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1
-
require("lazy").setup({...spec= { {"LazyVim/LazyVim",import="lazyvim.plugins"},... {"nvim-treesitter/nvim-treesitter",opts=function(_,opts)opts.ensure_installed= {}end, }, }, }) This seems to do the trick. |
BetaWas this translation helpful?Give feedback.
All reactions
👍 12
-
Thanks for setting this up. I did get it to work, but for some reason it is installing both cattpuccin and tokyonight even after I removed both from the nix config and the lazy.lua file. It is also defaulting to tokyonight, and not the colorscheme I've istalled and asked to use. The same setup works with my own standlone lazyvim install.. so I'm kind of lost to what what is happening here. Any thoughts? |
BetaWas this translation helpful?Give feedback.
All reactions
-
Try add this to your lazyvim spec: |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Thanks. I had it as I don't know what the cattpuccin was all about.. |
BetaWas this translation helpful?Give feedback.
All reactions
-
One thing that I noticed is that I'm not getting any lsp autocomplete suggestion on cmp. Anything that I should add to my lua config to get it to work? |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Ok, tried a few different approaches, and got it workng by simply adding the following code to a |
BetaWas this translation helpful?Give feedback.
All reactions
-
I made a more up-to-date Home Manager module for LazyVim. All you need to do is enable it: |
BetaWas this translation helpful?Give feedback.
All reactions
👍 8❤️ 1
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Nice work on this@matadaniel! Something along these lines seems like the most sustainable approach. Some would likely argue it should be refactored to integrate with nixvim and eventually be able to take advantage of the work there on providing modules for other plugins not included in LazyVim+extras. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Thank you! I have not had a good look at everything that nixvim has to offer as most of what I need is provided by LazyVim. The few plugins I configure myself were brought in from my old setup without nix. The module lets me use the same configuration and has lazy.nvim take care of everything, just as it always has. |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Yea possibly there's no need. I'm not sure if you get a bit of type safety for free by reusing the nixvim modules a bit more likenvix since you're already manually including binding for each of the lazyvim extras (e.g.here and the other leaves of thelazyvim/extra tree). I don't know enough about how lazyvim itself functions to be sure if there's a significant difference to replicating each of its plugins/extras in nix modules or pushing everything down to the direct management of LazyVim/lazy.nvim. It's possible what you've done here is the best way to avoid a situation where you'd have to essentially copy and paste lots of lua from the LazyVim repo itself into a system designed to mirror it from nix. The latter is obviously not desirable! In any case, this is probably worthy of separate discussion in LazyVim-module's issues. Many thanks again for putting this together! |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
@azuwis your solution is certainly a great way to get started here so many thanks for posting this nice solution and creating the discussion. I'd be curious to know if you agree@matadaniel's home-manager module provides a sane way to maintain a feature-complete and extensible mirror of lazyvim that's accessible from nix. It would be nice to eventually coalesce around a single repo that could become a candidate to include in nix-community or similar. |
BetaWas this translation helpful?Give feedback.
All reactions
-
I created a place to discuss LazyVim on Nix:matadaniel/LazyVim-module#5. Please share your thoughts! |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1
-
Wanted to share my setup for lazyvim in my nixos+hm flake. inputs.lazyvim={url="github:PaideiaDilemma/LazyVim";flake=false;}; and link the configuration into XDG_CONFIG_HOME like this: {config,inputs,lib,pkgs, ...}:{# These could also go into programs.neovim.extraPackages.# When i am developing and notice I am missing something I usually just launch myself into a nix shell or i add it here.home.packages=withpkgs;[clang-toolsfdgccgitgolazygitnodejsripgrepunzipjdk17zig];xdg.configFile."lazyvim/init.lua"={source="${inputs.lazyvim}/init.lua";};xdg.configFile."lazyvim/lua"={source="${inputs.lazyvim}/lua";};programs.neovim={enable=true;vimAlias=true;vimdiffAlias=true;defaultEditor=true;};};} Then I have my repo cloned and a symlink Has been working well for me. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Two things I forgot to mention:
xdg.configFile."lazyvim/lazyvim.json"={source="${inputs.lazyvim}/lazyvim.json";}; But then you cannot update via lazy.nvim, since it will obviously be read only. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Hey, I am having some issues with setting up and installing new plugins for example if I wanted to installharpoon2, I thought that doing this would be enough Add the plugin Set it up return { {"ThePrimeagen/harpoon",lazy=false,-- thought this would helpconfig=function()end,-- had to add this since I was getting errors if notopts= {... },keys=function()localkeys= {...}returnkeysend,dependencies= { {"nvim-lua/plenary.nvim"}, }, }, But I keep getting The plugin itself is installed I probably have some kind of misunderstanding of the concepts involved Same issue with Thanks! Myconfig for reference |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Hi@Nikola-Milovic, it looks like there's both aharpoon2 andluasnip extra for lazyvim i tried it on my setup and it looks like the secret sauce is that lazyvim extras expects it to be harpoon instead of harpoon2.. it looks like the same requirement for luasnip (LuaSnip instead of luasnip) after rebuilding your home manager config, go to lazy extras and enable: |
BetaWas this translation helpful?Give feedback.
All reactions
-
Thank you! Very interesting! So basically for some packages I have to update the name to match to whatever |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
looks like it, if you want to use those plugins as lazy extras 😆 i think it relates to the lightblue names in Lazy extras.. maybe someone more knowledgeable can chime in |
BetaWas this translation helpful?Give feedback.
All reactions
👍 2
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
This is incorrect. Despite its name, patterns does not accept patterns. It is find with plain marked as true. To achieve the desired effect you need You should check out the lazy.nvim wrapper in nixCats for ideas https://github.com/BirdeeHub/nixCats-nvim/blob/main/templates/luaUtils/lua/nixCatsUtils/lazyCat.lua and also a demonstration of it being used to implement kickstart.nvim https://github.com/BirdeeHub/nixCats-nvim/tree/main/templates/kickstart-nvim You could do similar for LazyVim distro in nixCats with the wrapper, it just takes care of the boilerplate of setting those options for you and doing the RTP reset correctly. |
BetaWas this translation helpful?Give feedback.
All reactions
-
You're right. I believe the code ishttps://github.com/folke/lazy.nvim/blob/56ead98e05bb37a4ec28930a54d836d033cf00f2/lua/lazy/core/meta.lua#L219 It works by coincidence: All the plugins url contains a |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
yes that is the code for it :) Ah yeah that is quite funny XD It wasnt working by accident for nixCats in the lazy.nvim wrapper, not sure why that is, although I am using the shorthand urls, but doesnt really matter "" works better and is more correct anyway |
BetaWas this translation helpful?Give feedback.
All reactions
-
Thanks! This script has made it possible for me to fully switch to NixOS (as Neovim + LazyVim is essential for my workflow). One noob question: What's the difference between |
BetaWas this translation helpful?Give feedback.
All reactions
-
Well, plugins is a thing created directly in the code snippet you followed. extraPackages isnt, extraPackages is actually part of the module, and you can look up what it does This takes that plugins list and makes them into a lazyPath variable which you presumeably then told lazy about. mkEntryFromDrv=drv:iflib.isDerivationdrvthen{name="${lib.getNamedrv}";path=drv;}elsedrv;lazyPath=pkgs.linkFarm"lazy-plugins"(builtins.mapmkEntryFromDrvplugins); |
BetaWas this translation helpful?Give feedback.
All reactions
-
Thanks! But I was talking about not the one inside the let-binding, but the one for the |
BetaWas this translation helpful?Give feedback.
All reactions
-
For those still having issues with treesitter moaning about needing a writable parser directory, even though specifying This ensures LazyVim does not load ANY builtin treesitter defaults that would cause that error message. I'm still having to import all my plugins with require, the import='plugins' just won't work as LazyVim can't find them, even though all the paths are present in the runtime paths... |
BetaWas this translation helpful?Give feedback.
All reactions
-
Am I crazy or this just doesn't seem worth managing with nix yet? The added layers of complexity vs. benefit just don't make sense to me. Don't get me wrong, Nix is great for a lot of things, but doesn't have to be used for everything. |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1👎 1
-
No, I get that. But is it well aligned with what Neo/LazyVim do best? I mean, a huge part of the reason to use Neo/Lazy is the ability to iterate over configuration and plugin combinations almost instantly. And the rollback/version control use cases are completely covered by LazyVim + Git (or other VCS). I feel like by managing N/L with Nix you introduce unnecessary complexity in the middle of that quick iteration/instant feedback process without adding significant benefits. This is especially felt when you're in the middle of working and want to quickly remove some annoyance or improve experience without losing the flow. Then again, perhaps I'm crazy. |
BetaWas this translation helpful?Give feedback.
All reactions
-
I have the lua outside of the nix, I'm not a fan of writing one language in another, it makes it harder to debug in general. I'm using home-manager for basic setup and configuration. Apps like neovim etc I configure as separate flakes and profiles I install. Iterating over neovim configuration in a flake doesn't force a home-manager rebuild and running a |
BetaWas this translation helpful?Give feedback.
All reactions
-
You give me too much credit. I am not, just getting familiar with Nix. I have to fiddle more with this. Thanks! |
BetaWas this translation helpful?Give feedback.
All reactions
-
I started using this approach last month, which is when I started using NixOS for my desktop. It works fine IMO. I've used LazyVim for the past few years, Vim for little more than a decade. I agree that LazyVim does not work smoothly with Nix, but I think this is the best option for now due to the functionality of LazyVim (it just works) + reproducibility of Nix. Though I believe there's a plenty big room for improvement. I guess you can check outNixvim as an alternative. I'm planning to check it out in a near future when I have some time---the nix rabbit hole has already wasted my time enough for now 🥲 |
BetaWas this translation helpful?Give feedback.
All reactions
-
One way to retain the fast iteration of the nvim config (without the need to home.file={".config/nvim".source=config.lib.file.mkOutOfStoreSymlink"${home.homeDirectory}/.config/home-manager/where/every/you/want/to/put/it/nvim"; Note, that there was abug in an old version of nix that prevented this from working. |
BetaWas this translation helpful?Give feedback.
All reactions
❤️ 1
-
The one thing I have not gotten to work is lazyvim automatically loading config/keymaps.lua, config/options.lua and config/autocmds.lua... also import="plugins" doesn't work. However if I do require 'plugins.my-plugin' it works... and yes, all the paths have been added to runtime. Anyone else have to specify all imports manually? |
BetaWas this translation helpful?Give feedback.
All reactions
-
Why is lazy removing/adding paths? It prevents me from having other directory and module paths under the lua directory., @folke would be great if you can shed some light. I am sure I've got something wrong somewhere... before loading lazy.nvim Lua package.cpath: Neovim runtime paths: after loading lazy.nvim Lua package.cpath: Neovim runtime paths: |
BetaWas this translation helpful?Give feedback.
All reactions
-
I loaded LazyVim in a separate module file... and restored the config path doing the following: |
BetaWas this translation helpful?Give feedback.
All reactions
-
why enable |
BetaWas this translation helpful?Give feedback.
All reactions
-
LazyVim check if LazyVim/lua/lazyvim/plugins/extras/editor/telescope.lua Lines 69 to 73 ind1529f6
LazyVim/lua/lazyvim/plugins/extras/editor/telescope.lua Lines 7 to 13 ind1529f6
In Nix, we probably don't want this behavior, and should enable or disable it explicitly. If you dont need |
BetaWas this translation helpful?Give feedback.
All reactions
-
LazyVim v14 makes fzf the default picker, so this is no longer necessary unless you explicitly enable the telescope extra. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Hello, I think use nix to manage neovim config is a bad idea. I just install neovim, nix-ld and use neovim config as separate repository is enough. If you want your neovim config in your nix config, just symlink it as I do in my confighttps://github.com/binhtran432k/dotfiles/blob/master/home/neovim.nix. And here is my LazyVim config if you want a referencehttps://github.com/binhtran432k/dotfiles/tree/master/nvim |
BetaWas this translation helpful?Give feedback.
All reactions
-
@minusfive If you get a setup with LazyVim that you're happy with, please do share it, I ended up going a different route and I would like to do something similar to what you described |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1
-
Also if you wanted to PR a LazyVim template I'd accept it, as long as it doesn't have many customizations or use things in LazyVim that are likely to change. (The kickstart template has been fairly low maintenance and I'd love to keep that trend haha) |
BetaWas this translation helpful?Give feedback.
All reactions
👍 2
-
@minusfive Although nixCats is an awesome package manager, my module has a more narrow focus on providing the experience you described with LazyVim and Home Manager. |
BetaWas this translation helpful?Give feedback.
All reactions
👍 3
-
Also check out my comment on this thread:#1972 (comment) |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
from what I understand, minusfive is already basically doing that paideia. nixCats is somewhat like this as well, but it takes care of including the directory for you, and with more available options, and it is much easier to pass arbitrary info from nix to lua in an organized way. In addition, things are then bundled on the derivation level meaning you can then run it via nix run from anywhere, as opposed to being tied to a home manager config. |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
https://github.com/BirdeeHub/nixCats-nvim/tree/main/templates/LazyVim ^ template that achieves basically the same thing but using nixCats so that your config can be more flexible than the home manager module is |
BetaWas this translation helpful?Give feedback.
All reactions
-
@azuwis I try your nix config, and it build successfully, but I get this error when I run nvim |
BetaWas this translation helpful?Give feedback.
All reactions
-
BetaWas this translation helpful?Give feedback.
All reactions
-
Thanks, very helpful. It’s due to the plugin loading order. |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Hi, appreciate this Can anyone tell me how to install the LazyExtra packages? {"nvim-treesitter/nvim-treesitter",opts={ensure_installed={"dockerfile"}},}
Im also now unsure how to install any new plugin (even those not provided by extras), I just did the same thing but it didn't work (with rainbow delimiters) |
BetaWas this translation helpful?Give feedback.
All reactions
-
I'm using nix to manage the packages and lua to manage the config. I do not use nix to manage and translate my config to lua. Hope this helps. |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
@ck3mp3r Hi, thank you for the response, in all honestly, im pretty new to nix & I dont use flakes nor can I understand the code or how to transfer my config Is there a way I could just transfer my LazyVim config over to nixos with little work? |
BetaWas this translation helpful?Give feedback.
All reactions
-
@notjiatan I am afraid you are going to have to do some leg work yourself here. I've given you everything I discovered myself and help from others pointing me in the right direction... |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
@ck3mp3r I read your config too see what you are doing, you added the package |
BetaWas this translation helpful?Give feedback.
All reactions
-
Hey@notjiatan what you're missing isthis part in@ck3mp3r's repo what's happening is we're bypassing the part where lazyvim goes to the repo and downloads the plugin by using nix to install it for us, but then you still have to tell lazyvim to use it there are quite a few ways to seup lazyvim using nix..@ck3mp3r and I have followed the instructions@azuwis wrote down. I strongly suggest reading through this thread. Important bits arehere and then thisupdate (caused by a treesitter breaking change i think) so, to recap, add extraLuaConfig=letplugins=withpkgs.vimPlugins;[rainbow-delimiters-nvim then add a plugin file
return {"HiPhish/rainbow-delimiters.nvim",event= {"BufRead"},} |
BetaWas this translation helpful?Give feedback.
All reactions
-
I just installed LazyVim on Home-Manager and it works very well, like the LazyVim native I have. However when if start it with My native installed LazyVim has no problem with this. I tried add |
BetaWas this translation helpful?Give feedback.
All reactions
-
Finally discovered the problem. I had two neovim config active at the same time. This caused plugins to be loaded incorrectly. |
BetaWas this translation helpful?Give feedback.
All reactions
-
I've been using this for almost a year, and it works really well. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Yes, that's basically what I do at least. Lazy shows which plugins are installed from source and which from nixpkgs. If a plugin is added, new plugins will install - which you can see in the lazy window that pops up as well. I then go through the list and add those plugins to my flake. It's manual but works reasonably well. Both install sources work so it is no blocker for me. I'm curious if someone has a different workflow. |
BetaWas this translation helpful?Give feedback.
All reactions
-
I have a script that shows the different between list of plugins required by lazyvim and provided by nix: https://github.com/azuwis/nix-config/blob/master/common/lazyvim/base/diff-plugins.sh |
BetaWas this translation helpful?Give feedback.
All reactions
❤️ 1
-
I spent some time vibe coding to create a nix flake that replicates this setup. https://github.com/pfassina/lazyvim-nix feel free to contribute or report any bugs that you find, and I will take a look. |
BetaWas this translation helpful?Give feedback.
All reactions
👀 1
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Does it support extending typescript lsp with vue lsp? Currently this issue might be breaking it#6236 |
BetaWas this translation helpful?Give feedback.
All reactions
-
Pretty sure your AI hallucinated the existence of |
BetaWas this translation helpful?Give feedback.
All reactions
-
Is that just adding vue treesitter parser and enabling it on your LSP config?If so, it should work. …On Sat, Jul 19, 2025 at 10:20 PM, elf Pavlik < ***@***.***(mailto:On Sat, Jul 19, 2025 at 10:20 PM, elf Pavlik <<a href=)> wrote: Does it support extending typescript lsp with vue lsp?https://www.lazyvim.org/extras/lang/vue — Reply to this email directly, [view it on GitHub](#1972 (reply in thread)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AAOJC52PSH3TYTSZRJV7XGL3JMRJPAVCNFSM6AAAAAA7CLSO7OVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGOBSGE2DOMA). You are receiving this because you commented.Message ID: ***@***.***> |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
If you're like me who use NixOS and in a hurry and want to use the current LazyVim config as is, just addnix-ld to your |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1
-
If you use flakes, my plugin should replicate the current lazyvim experience with a simple lazyvim.enable = true; |
BetaWas this translation helpful?Give feedback.
All reactions
❤️ 1
-
yeah, after trying few different approaches nix-ld turned out the only approach whichjust works |
BetaWas this translation helpful?Give feedback.
All reactions
-
Lazy tells me to update nvim-treesitter and nvim is a bit laggy at startup. I think this might be related to the switch to |
BetaWas this translation helpful?Give feedback.
All reactions
-
Basically this line?https://github.com/pfassina/lazyvim-nix/blob/3efc1e659c2d62001490d1244f4d8f5afa5db44a/nix/lib/config-generation.nix#L69 That does not seem to do anything for me (not using your flake though) |
BetaWas this translation helpful?Give feedback.
All reactions
-
You might also have to disable lazy version checker. Try that, and see if it works for you. |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
You mean like |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
It's this line that bothers me
I've now replace the config attribute with my own function removing that check but curiously the message still is displayed. Previously I saw it two messages... |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
{"nvim-treesitter/nvim-treesitter",build=false,opts= {auto_install=false,ensure_installed= {},-- ... other opts },}If that doesn't work, I'm not sure why it is still giving you the notifications. There might be some override somewhere. You could also try the flake, and see if it works for you. You shouldn't get the notification with it. |
BetaWas this translation helpful?Give feedback.




