# Nixvim This module provides some defaults to quickly set up Nixvim with some plugins. View the [*synix* Home Manager module on Forgejo](https://git.sid.ovh/sid/synix/tree/master/modules/home/nixvim). ## Config Here is an example configuration: ```nix # flake.nix inputs = { nixvim.url = "github:nix-community/nixvim"; nixvim.inputs.nixpkgs.follows = "nixpkgs"; }; ``` ```nix # home/YOU/default.nix { inputs, lib, config, pkgs, ... }: { imports = [ inputs.synix.homeModules.stylix # This module works great with stylix inputs.synix.homeMmodules.nixvim # You need to import this module ]; programs.nixvim = { enable = true; #colorschemes.SCHEME.enable = true; # If you do not use the stylix module, set a scheme manually # This module provides defaults for the following plugins. # They are all enabled by default. plugins = { cmp.enable = true; # Auto completion dap.enable = true; # Debugging lsp.enable = true; # Language server lualine.enable = true; # Statusline luasnip.enable = true; # Coding snippets markdown-preview.enable = true; # Markdown preview in Browser telescope.enable = true; # Fuzzy finder treesitter.enable = true; # Syntax highlighting trouble.enable = true; # Diagnostic messages }; }; stylix = { enable = true; scheme = "dracula"; # This automatically sets the nixvim scheme as well }; } ``` ## Keymaps This module sets some keymaps. Here are some important ones: > `` defaults to the space key key | action ---|--- `pv` | ex command (file explorer) `s` | search and replace `` | select whole buffer `ss` | toggle spell checking `se` | switch to english spell checking `sg` | switch to german spell checking `z=` | correction suggestions for a misspelled word `zg` | add word to spell list `` | confirm selection in completion menu `` | select next item in completion menu `` | select previous item in completion menu `gd` | go to definition `K` | display more information about word under cursor `bl` | list buffers `` | next buffer `` | previous buffer `fb` or `` | open file browser `ff` | find files by name `fg` or `` | find files containing string `xd` | toggle diagnostics `xq` | toggle quick fix list `m` | run make command `xl` | toggle loclist list `xx` | toggle diagnostics list `xq` | toggle quifick list `` | previous quickfix item `` | next quickfix item `ca` | apply code action See [keymaps.nix](https://git.sid.ovh/sid/synix/blob/master/modules/home/nixvim/keymaps.nix) and [plugins](https://git.sid.ovh/sid/synix/blob/master/modules/home/nixvim/plugins/) for more details. These commands do not have keymaps yet but might be useful anyway: command | action ---|--- `:MarkdownPreview` | live render the current markdown buffer