Skip to content

Commit 7b654ec

Browse files
github-actions[bot]b-src
authored andcommitted
Auto generate docs
1 parent bc46266 commit 7b654ec

File tree

1 file changed

+53
-6
lines changed

1 file changed

+53
-6
lines changed

doc/lazy-nix-helper.nvim.txt

Lines changed: 53 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*lazy-nix-helper.nvim.txt* For Neovim >= 0.8.0? Last change: 2023 December 03
1+
*lazy-nix-helper.nvim.txt* For Neovim >= 0.8.0? Last change: 2023 December 04
22

33
==============================================================================
44
Table of Contents *lazy-nix-helper.nvim-table-of-contents*
@@ -17,15 +17,17 @@ Table of Contents *lazy-nix-helper.nvim-table-of-contents*
1717
1. Lazy-Nix-Helper *lazy-nix-helper.nvim-lazy-nix-helper*
1818

1919
A neovim plugin allowing a single neovim configuration with the Lazy plugin
20-
manager to be used on NixOS and other platforms. This plugin provides:
20+
manager to be used on NixOS and other platforms. This plugin makes the
21+
following arrangement possible:
2122

2223
- On NixOS:
23-
- plugins(/LSP servers/DAPs/linters/formatters?) installed via Nix
24+
- plugins (and LSP servers/DAP servers/linters/formatters) installed via Nix
2425
- configuration of plugins via Lazy
2526
- lazy loading of plugins via Lazy
2627
- On other platforms:
2728
- the same neovim configuration files you use on NixOS
28-
- plugins(/LSP servers/DAPs/linters/formatters?) installed via Lazy(/Mason?) as normal
29+
- plugins installed via Lazy installed via Lazy as normal
30+
- LSP servers/DAP servers/linters/formatters installed via Mason as normal
2931
- configuration via Lazy as normal
3032
- lazy loading of plugins via Lazy as normal
3133

@@ -226,8 +228,44 @@ will also require ".nvim" to be appended to the plugin name.
226228

227229
MASON ~
228230

229-
TODO: figure out how to play nicely with Mason included in the configuration
230-
and add instructions here.
231+
Mason is a package manager for LSP servers, DAP servers, linters, and
232+
formatters. Just like plugin management with Lazy, this conflicts with Nix. The
233+
easiest way to keep mason in your config on non-Nix platforms while disabling
234+
it on NixOS is to use the provided `mason_enabled` function to conditionally
235+
enable Mason.
236+
237+
This will require you to separately declare all your LSP servers etc. in your
238+
NixOS config, but you were doing that already, right?
239+
240+
Here’s an example mason configuration as a dependency of `nvim-lspconfig`.
241+
Notice that we are using `mason_enabled` to conditionally enable both `mason`
242+
and `mason-lspconfig
243+
244+
>lua
245+
{
246+
"neovim/nvim-lspconfig",
247+
dir = require("lazy-nix-helper").get_plugin_path("nvim-lspconfig"),
248+
dependencies = {
249+
{
250+
"williamboman/mason.nvim",
251+
dir = require("lazy-nix-helper").get_plugin_path("mason.nvim"),
252+
enable = require("lazy-nix-helper").mason_enabled(),
253+
...
254+
},
255+
{
256+
"williamboman/mason-lspconfig.nvim",
257+
dir = require("lazy-nix-helper").get_plugin_path("mason-lspconfig.nvim"),
258+
enable = require("lazy-nix-helper").mason_enabled(),
259+
...
260+
},
261+
...
262+
},
263+
...
264+
}
265+
<
266+
267+
TODO: do we have to load these things by hand now or is it sufficient to have
268+
them installed on the system?
231269

232270

233271
KNOWN LIMITATIONS *lazy-nix-helper.nvim-lazy-nix-helper-known-limitations*
@@ -260,6 +298,15 @@ HOW DO I CHECK ALL OF THE PLUGINS THAT LAZY-NIX-HELPER HAS FOUND? ~
260298
Run the `list_discovered_plugins` function manually: `lua
261299
require("lazy-nix-helper").list_discovered_plugins()`
262300

301+
302+
I DON’T THINK LAZY-NIX-HELPER IS CORRECTLY DETECTING WHEN I’M ON NIXOS ~
303+
304+
Run the `print_environment_info` function manually to see: - if Lazy-Nix-Helper
305+
thinks you’re on NixOS or not - if Lazy-Nix-Helper thinks nix-store is
306+
installed or not
307+
308+
`lua require("lazy-nix-helper").print_environment_info()`
309+
263310
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>
264311

265312
vim:tw=78:ts=8:noet:ft=help:norl:

0 commit comments

Comments
 (0)