From fecb432e6cd364b66a37442b621810e725280d9f Mon Sep 17 00:00:00 2001 From: Zev Averbach Date: Sun, 26 Mar 2023 10:14:11 +0200 Subject: [PATCH] indentation, js formatting --- init.vim | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/init.vim b/init.vim index 779555e..5380204 100644 --- a/init.vim +++ b/init.vim @@ -1,9 +1,17 @@ set number relativenumber set signcolumn=yes +set shiftwidth=4 smarttab +set tabstop=4 +set expandtab +set autoindent +set smartindent +set softtabstop=4 + " Return to last edit position when opening files (You want this!) autocmd BufReadPost * if @% !~# '\.git[\/\\]COMMIT_EDITMSG$' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif +autocmd BufWritePre *.js Neoformat set hidden set undofile @@ -82,8 +90,8 @@ nmap qf (coc-fix-current) " Remap keys for applying refactor code actions nmap re (coc-codeaction-refactor) -xmap r (coc-codeaction-refactor-selected) -nmap r (coc-codeaction-refactor-selected) +xmap re (coc-codeaction-refactor-selected) +nmap re (coc-codeaction-refactor-selected) function! ShowDocumentation() if CocAction('hasProvider', 'hover') @@ -105,6 +113,7 @@ call plug#begin() Plug 'meain/vim-printer' Plug 'tpope/vim-commentary' Plug 'neoclide/coc.nvim', {'branch': 'release'} + Plug 'sbdchd/neoformat' Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} call plug#end()