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 = {