Fork me on GitHub
#vim
<
2021-09-12
>
zendevil.eth15:09:09

Hi I have some issues with editing clojure in vim

zendevil.eth15:09:41

when I press tab, I go to the next x % 2 = 0 column, which is nice. But when I press return, the new line is indented by only one space of the beginning of previous line and not 2. Does anyone know how to make it indent 2 spaces on a return?

dominicm17:09:25

@ps which plugins are you using? I believe parinfer messes with this stuff.

zendevil.eth17:09:03

Here’s the complete config. Yes using parinfer:

call plug#begin()
Plug 'tpope/vim-sensible'
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'junegunn/vim-github-dashboard', { 'on': ['GHDashboard', 'GHActivity'] }
Plug 'junegunn/vader.vim',  { 'on': 'Vader', 'for': 'vader' }
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'vim-airline/vim-airline'
Plug 'bhurlow/vim-parinfer'
Plug 'luochen1990/rainbow'
Plug 'tpope/vim-fireplace'
Plug 'tomlion/vim-solidity'
Plug 'tpope/vim-fugitive'
Plug 'myusuf3/numbers.vim'
" Plug 'dense-analysis/ale'
Plug 'morhetz/gruvbox'
Plug 'guns/vim-clojure-static'
Plug 'guns/vim-clojure-highlight'
Plug 'guns/vim-sexp'
Plug 'joshdick/onedark.vim'
Plug 'wlangstroth/vim-racket'
call plug#end()

" let g:ale_linters = {
"       \ 'clojure': ['clj-kondo']
"       \}
set number
colorscheme onedark
syntax on
let g:rainbow_active = 1
filetype plugin indent on
" " show existing tab with 4 spaces width
set tabstop=4
" " when indenting with '>', use 4 spaces width
set shiftwidth=4
" " On pressing tab, insert 4 spaces
set expandtab
set mouse=a
let mapleader=","
let g:airline_powerline_fonts = 1
set cursorline

dominicm17:09:17

@ps Try removing parinfer, seems like a likely candidate.

dominicm17:09:11

@ps Confirm that parinfer is the problem. I don't know of a fix.

dominicm17:09:48

https://github.com/shaunlebron/parinfer/issues/59 I believe this is the corresponding parinfer issue.

schmee19:09:55

I strongly suggest https://github.com/eraserhd/parinfer-rust for Parinfer, the performance is way better and it seems to do less weird stuff overall

👆 6