Skip to content

Commit

Permalink
fix: update lazy.nvim with latest info
Browse files Browse the repository at this point in the history
  • Loading branch information
KFearsoff committed Sep 21, 2024
1 parent e3d45fc commit 3dbf151
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/lazynvim-nixos.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ programs.neovim = {
~ },
dev = {
path = "${pkgs.vimUtils.packDir config.home-manager.users.USERNAME.programs.neovim.finalPackage.passthru.packpathDirs}/pack/myNeovimPackages/start",
patterns = {"folke"}, -- Specify that "folke/which-key.nvim" will use our dev dir
patterns = {""}, -- Specify that all of our plugins will use the dev dir. Empty string is a wildcard!
},
~ install = {
~ -- Safeguard in case we forget to install a plugin with Nix
Expand All @@ -209,16 +209,9 @@ programs.neovim = {
And at this point, you can `git add .` and rebuild your configuration; you should
now have Neovim set up with `lazy.nvim` and `which-key` plugin. Congrats!

```admonish question
If you've been paying close attention to what changed between the steps, you have
probably noticed that in the last step, we added `dev.patterns = {"folke"}`. Why
not wildcard?
The sad answer is that there's no wildcard. The pattern matcher used in `lazy.nvim`
doesn't support them. Which means that we unfortunately have to add new entries
to it when we add a new plugin: if we installed a plugin "hrsh7th/nvim-cmp", we
need to add "hrsh7th" to `dev.patterns`. I'm about to submit an issue to fix that,
pinky swear. But for now it is what it is.
```admonish tip
In the last step, we have added `dev.patterns = {""}` line. The empty string functions
as a wild card, as pointed out by [lazy.nvim creator](https://github.com/folke/lazy.nvim/pull/1676#issuecomment-2248942233).
```

## Installing Treesitters
Expand Down Expand Up @@ -259,6 +252,13 @@ return {

There, we basically override the location for compiling treesitters to `~/.cache/nvim/treesitters`.

## Other Incompatibilities

Make sure you don't install [mason.nvim](https://github.com/williamboman/mason.nvim) and [mason-lspconfig.nvim](https://github.com/williamboman/mason-lspconfig.nvim).
Reading the intro README tells us all we need to know: mason.nvim is a package manager. We don't want
that! We already have one of our own. The same applies to [mason-nvim-dap.nvim](https://github.com/jay-babu/mason-nvim-dap.nvim)
and other extensions for mason.nvim - you don't want to install packages with Neovim.

## Examples

As an example, you can check my Neovim config on NixOS!
Expand Down

0 comments on commit 3dbf151

Please sign in to comment.