From a8f0f6be8d5d8694215825465ea14c126fc38655 Mon Sep 17 00:00:00 2001 From: z3rOR0ne Date: Thu, 21 Jul 2022 11:26:56 -0700 Subject: [PATCH] :memo: Installed jest unit testing --- nvim/lua/keybindings.lua | 5 ++++- nvim/lua/packages.lua | 4 +++- updates.txt | 5 ++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/nvim/lua/keybindings.lua b/nvim/lua/keybindings.lua index 259a383a..339adcca 100644 --- a/nvim/lua/keybindings.lua +++ b/nvim/lua/keybindings.lua @@ -23,7 +23,7 @@ keymap('n', '', ':nohl', {silent = true}) -- Can't quite get working yet -- keybind map Ctrl + m to :MarkdownPreview -- vim.cmd[[nmap MarkdownPreviewToggle]] -keymap('n', '', ':MarkdownPreview', {}) +keymap('n', '', ':MarkdownPreview', {}) -- -- Toggle Multi-Cursor with j or k vim.cmd[[nmap ]] @@ -38,6 +38,9 @@ vim.cmd[[ inoremap cll console.log()i]] -- Alias replace all to shift + S vim.cmd[[nnoremap S :%s///gI]] +-- Alias jest unit testing for current file +vim.cmd[[nnoremap T :lua require"jester".run_file()]] + -- Prettify using shortcut gp (careful, only use on files that have a parser) -- vim.cmd[[nnoremap gp :silent %!prettier --stdin-filepath %]] diff --git a/nvim/lua/packages.lua b/nvim/lua/packages.lua index 92505287..44e6b230 100644 --- a/nvim/lua/packages.lua +++ b/nvim/lua/packages.lua @@ -42,12 +42,14 @@ require('packer').startup(function() use {'lewis6991/gitsigns.nvim'} use 'Yggdroot/indentLine' use 'mg979/vim-visual-multi'-- {'branch': 'master'} - use {'iamcco/markdown-preview.nvim'} -- :call mkdp#util#install() + use {'iamcco/markdown-preview.nvim'} -- call mkdp#util#install() use 'luochen1990/rainbow' use 'windwp/nvim-autopairs' use 'simeji/winresizer' use '907th/vim-auto-save' + use 'David-Kunz/jester' -- for unit tests using jest use 'jremmen/vim-ripgrep' use 'rhysd/vim-clang-format' -- formatter for c and c++ use 'arrufat/vala.vim' -- for vala programming language + use 'chemzqm/neovim' end) diff --git a/updates.txt b/updates.txt index 805e3ea6..e8282831 100644 --- a/updates.txt +++ b/updates.txt @@ -28,9 +28,8 @@ curl https://raw.githubusercontent.com/SharUpOff/pkgtop/main/dist/pkgtop.sh -so sudo chmod 755 /usr/local/bin/pkgtop -Reinstall npm, nodemon, and prettier +Reinstall npm, nodemon, and prettier, and jest doas pacman -S npm (delete what is necessary to get this to go through) -doas npm install -g nodemon -doas npm install -g prettier +doas npm install -g nodemon prettier jest