From 4dcab39d5b9a86e63b414de8df71ae953fa042ec Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Fri, 15 Jan 2021 09:46:31 +0100 Subject: [PATCH] Added eslint config --- nvim/coc-settings.json | 23 ++++++++++++----------- nvim/init.vim | 2 ++ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/nvim/coc-settings.json b/nvim/coc-settings.json index e62329f..ee438e2 100644 --- a/nvim/coc-settings.json +++ b/nvim/coc-settings.json @@ -1,15 +1,16 @@ { "coc.preferences.formatOnSaveFiletypes": [ - "cpp", - "javascript", - "typescript", - "typescriptreact", - "json", - "markdown", - "python", - "rust", - "toml", - "yaml" + "cpp", + "javascript", + "typescript", + "typescriptreact", + "json", + "markdown", + "python", + "rust", + "toml", + "yaml" ], - "clangd.path": "/home/mandlm/.config/coc/extensions/coc-clangd-data/install/11.0.0/clangd_11.0.0/bin/clangd" + "clangd.path": "/home/mandlm/.config/coc/extensions/coc-clangd-data/install/11.0.0/clangd_11.0.0/bin/clangd", + "eslint.format.enable": true } diff --git a/nvim/init.vim b/nvim/init.vim index 2ec7a66..1f99bb0 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -159,6 +159,7 @@ set updatetime=300 let g:coc_global_extensions = [ \ 'coc-clangd', \ 'coc-cmake', + \ 'coc-eslint', \ 'coc-html', \ 'coc-json', \ 'coc-python', @@ -174,6 +175,7 @@ nnoremap K :call CocAction('doHover') nmap gd (coc-definition) nmap gr (coc-references) +nmap ga (coc-codeaction) nmap rn (coc-rename) " use for trigger completion and navigate to the next complete item