mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-01 12:54:30 +02:00
docs: Introduce an user guide (#1121)
This commit is contained in:
parent
d656834e3d
commit
ad8aa72490
6 changed files with 117 additions and 6 deletions
26
docs/user-guide/faq.md
Normal file
26
docs/user-guide/faq.md
Normal file
|
@ -0,0 +1,26 @@
|
|||
# Frequently Asked Questions
|
||||
|
||||
## How do I use a plugin not implemented in nixvim
|
||||
|
||||
Using a plugin not supported by nixvim, but packaged in nixpkgs is straightforward:
|
||||
|
||||
- Register the plugin through `extraPlugins`: `extraPlugins = [pkgs.vimPlugins."<plugin name>"]`.
|
||||
- Configure the plugin through `extraConfigLua`: `extraConfigLua = "require('my-plugin').setup({foo = "bar"})";`
|
||||
|
||||
## How do I use a plugin not packaged in nixpkgs
|
||||
|
||||
This is straightforward too, you can add the following to `extraPlugins` for a plugin hosted on GitHub:
|
||||
|
||||
```nix
|
||||
extraPlugins = [(pkgs.vimUtils.buildVimPlugin {
|
||||
name = "my-plugin";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "<owner>";
|
||||
repo = "<repo>";
|
||||
rev = "<commit hash>";
|
||||
hash = "<nix NAR hash>";
|
||||
};
|
||||
})];
|
||||
```
|
||||
|
||||
The [nixpkgs manual](https://nixos.org/manual/nixpkgs/stable/#managing-plugins-with-vim-packages) has more information on this.
|
Loading…
Add table
Add a link
Reference in a new issue