From d2610e77bd94f98d76b497f27d151a9ddc8c4322 Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Sun, 26 Sep 2021 22:24:00 +0200 Subject: [PATCH] vimrc: Add alias, prefer :up to :w, update diagnostics --- nvimrc | 44 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/nvimrc b/nvimrc index a7ce53b..1bdcdd5 100644 --- a/nvimrc +++ b/nvimrc @@ -127,7 +127,7 @@ imap nmap ]q :cn nmap [q :cp -nnoremap w :w +nnoremap w :up nnoremap / :nohlsearch nnoremap :nohlsearch " Select just-pasted text: @@ -142,6 +142,9 @@ nnoremap s :split nnoremap rp "_ddP nnoremap dq ggVG"_d:wq +" abbrevs +iabbrev esdebug debugger; // eslint-disable-line no-debugger + lua <F', 'silent Format', { noremap=true, silent=true }) +EOF + " enable inline vim highlighting: let g:vimsyn_embed= 'lPr' @@ -643,11 +676,16 @@ local filetypes = { typescript = "eslint", typescriptreact = "eslint", } + +-- diagnosticls + local linters = { eslint = { sourceName = "eslint", - command = "eslint", - rootPatterns = {".eslintrc.js", "package.json"}, + -- fallback to global eslint if the local is not found? + -- https://github.com/creativenull/diagnosticls-configs-nvim/blob/e7d6f7e99f6b416d2aeee89314bc46fc36df7b22/lua/diagnosticls-configs/fs.lua#L20 + command = "./node_modules/.bin/eslint", + rootPatterns = {".eslintrc", ".eslintrc.js"}, debounce = 100, args = {"--stdin", "--stdin-filename", "%filepath", "--format", "json"}, parseJson = {