aboutsummaryrefslogtreecommitdiff

Node5 - nvim config

Run

nix run git+https://git.node5.net/nix/nvim

Install

Add this to your NixOS flake inputs

node5-nvim.url = "git+https://git.node5.net/nix/nvim";

And this to environment.systemPackages

inputs.node5-nvim.packages.x86_64-linux.default

Print current config: nvf-print-config nvim | bat --language lua

Handy shortcuts

  • leader is space
  • <leader>ld show linter error / warning list at bottom
  • <leader>/ find text in files - grep text in files
  • <leader>. find files - grep files names
  • CTRL+T terminal
  • <leader>g show git diff pop up

Code

  • <leader>ln rename variable
  • CTRL+Left click Go to definition
  • <leader>lgr find all references

Handy commands

  • :StripWhitespace - remove unwanted trailing whitespace
  • :Noice command to show a full message history

TODO

  • [ ] TODO Markdown preview new window
  • [ ] TODO Smoothscrolling
  • [ ] TODO Undo tree

Troubleshooting

Hyper error on startup

If you get an error on startup that looks like:

Error executing vim.schedule lua callback: ...k/mnw/start/dashboard-nvim/lua/dashboard/theme/hyper.lua:136: [string "return { "/home/user/dot-files", "/home/user/..."]:1: unfinished string
near '<eof>'
stack traceback:
        [C]: in function 'assert'
        ...k/mnw/start/dashboard-nvim/lua/dashboard/theme/hyper.lua:136: in function 'read_project'
        ...k/mnw/start/dashboard-nvim/lua/dashboard/theme/hyper.lua:164: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>
Press ENTER or type command to continue

Then delete this folder, to fix it

rm -r ~/.cache/nvf/dashboard/

See: https://github.com/nvimdev/dashboard-nvim/issues/499