From 808c20d1f9af8b8e644e7c615cfa535cee5ee72d Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Tue, 4 Oct 2022 00:13:08 +0100 Subject: [PATCH] fix example.nix --- example.nix | 120 +++++++++++++++++++++++++++------------------------- 1 file changed, 62 insertions(+), 58 deletions(-) diff --git a/example.nix b/example.nix index 19c96491..0fe208b1 100644 --- a/example.nix +++ b/example.nix @@ -10,66 +10,70 @@ # Equivalent to nnoremap ; : ";" = ":"; # Equivalent to nmap gg Man - "gg" = { silent = true; remap = false; action = "Man" - # Etc... - }; - - # We can set the leader key: - leader = ","; - - # We can create maps for every mode! - # There is .normal, .insert, .visual, .operator, etc! - - # We can also set options: - options = { - tabstop = 4; - shiftwidth = 4; - expandtab = false; - - mouse = "a"; - - # etc... - }; - - # Of course, we can still use comfy vimscript: - extraConfigVim = builtins.readFile ./init.vim; - # Or lua! - extraConfigLua = builtins.readFile ./init.lua; - - # One of the big advantages of NixVim is how it provides modules for - # popular vim plugins - # Enabling a plugin this way skips all the boring configuration that - # some plugins tend to require. - plugins = { - lightline = { - enable = true; - - # This is optional - it will default to your enabled colorscheme - colorscheme = "wombat"; - - # This is one of lightline's example configurations - active = { - left = [ - [ "mode", "paste" ] - [ "redaonly", "filename", "modified", "helloworld" ] - ]; - }; - - component = { - helloworld = "Hello, world!"; - }; + "gg" = { + silent = true; + remap = false; + action = "Man"; + # Etc... }; - # Of course, there are a lot more plugins available. - # You can find an up-to-date list here: - # https://nixvim.pta2002.com/plugins + # We can set the leader key: + leader = ","; + + # We can create maps for every mode! + # There is .normal, .insert, .visual, .operator, etc! + + # We can also set options: + options = { + tabstop = 4; + shiftwidth = 4; + expandtab = false; + + mouse = "a"; + + # etc... + }; + + # Of course, we can still use comfy vimscript: + extraConfigVim = builtins.readFile ./init.vim; + # Or lua! + extraConfigLua = builtins.readFile ./init.lua; + + # One of the big advantages of NixVim is how it provides modules for + # popular vim plugins + # Enabling a plugin this way skips all the boring configuration that + # some plugins tend to require. + plugins = { + lightline = { + enable = true; + + # This is optional - it will default to your enabled colorscheme + colorscheme = "wombat"; + + # This is one of lightline's example configurations + active = { + left = [ + [ "mode" "paste" ] + [ "redaonly" "filename" "modified" "helloworld" ] + ]; + }; + + component = { + helloworld = "Hello, world!"; + }; + }; + + # Of course, there are a lot more plugins available. + # You can find an up-to-date list here: + # https://nixvim.pta2002.com/plugins + }; + + # There is a separate namespace for colorschemes: + colorschemes.gruvbox.enable = true; + + # What about plugins not available as a module? + # Use extraPlugins: + extraPlugins = with pkgs.vimPlugins; [ vim-toml ]; }; - - # There is a separate namespace for colorschemes: - colorschemes.gruvbox.enable = true; - - # What about plugins not available as a module? - # Use extraPlugins: - extraPlugins = with pkgs.vimPlugins; [ vim-toml ]; }; }