cohama / lexima.vim

Auto close parentheses and repeat by dot dot dot...
995 stars 46 forks source link

E132: Function call depth is higher than 'maxfuncdepth' #98

Closed davidsa closed 2 years ago

davidsa commented 4 years ago

Hi,

when ever i try to do <CR> between () or {} i get an error:

for example if i type

function(){|} <--- hi <CR>
Error detected while processing function lexima#insmode#_map_impl[1]..<SNR>47_map_impl[35]..<SNR>47_input[22]..GetJsxIndent[25]..GetJsxIndent[25
]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25
]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25
]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25
]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25
]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25
]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25
]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25
]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25
]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25
]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25
]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25
]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[25]..GetJsxIndent[8]..SynXMLish:
line    1:
E132: Function call depth is higher than 'maxfuncdepth'

VIM version

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jun 10 2020 16:42:10)
macOS version
Included patches: 1-950
Compiled by Homebrew
Huge version without GUI.  Features included (+) or not (-):
+acl               +cryptv            +fork()            +modify_fname      +persistent_undo   +syntax            +visualextra
+arabic            +cscope            +gettext           +mouse             +popupwin          +tag_binary        +viminfo
+autocmd           +cursorbind        -hangul_input      -mouseshape        +postscript        -tag_old_static    +vreplace
+autochdir         +cursorshape       +iconv             +mouse_dec         +printer           -tag_any_white     +wildignore
-autoservername    +dialog_con        +insert_expand     -mouse_gpm         +profile           -tcl               +wildmenu
-balloon_eval      +diff              +ipv6              -mouse_jsbterm     -python            +termguicolors     +windows
+balloon_eval_term +digraphs          +job               +mouse_netterm     +python3           +terminal          +writebackup
-browse            -dnd               +jumplist          +mouse_sgr         +quickfix          +terminfo          -X11
++builtin_terms    -ebcdic            +keymap            -mouse_sysmouse    +reltime           +termresponse      -xfontset
+byte_offset       +emacs_tags        +lambda            +mouse_urxvt       +rightleft         +textobjects       -xim
+channel           +eval              +langmap           +mouse_xterm       +ruby              +textprop          -xpm
+cindent           +ex_extra          +libcall           +multi_byte        +scrollbind        +timers            -xsmp
-clientserver      +extra_search      +linebreak         +multi_lang        +signs             +title             -xterm_clipboard
+clipboard         -farsi             +lispindent        -mzscheme          +smartindent       -toolbar           -xterm_save
+cmdline_compl     +file_in_path      +listcmds          +netbeans_intg     -sound             +user_commands
+cmdline_hist      +find_in_path      +localmap          +num64             +spell             +vartabs
+cmdline_info      +float             +lua               +packages          +startuptime       +vertsplit
+comments          +folding           +menu              +path_extra        +statusline        +virtualedit
+conceal           -footer            +mksession         +perl              -sun_workshop      +visual
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X -DMACOS_X_DARWIN  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: clang   -L. -fstack-protector-strong -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/re
adline/lib  -L/usr/local/lib -o vim        -lncurses -liconv -lintl -framework AppKit  -L/usr/local/opt/lua/lib -llua5.3 -mmacosx-version-min=10
.15 -fstack-protector-strong -L/usr/local/lib  -L/usr/local/Cellar/perl/5.30.3/lib/perl5/5.30.3/darwin-thread-multi-2level/CORE -lperl -lm -luti
l -lc  -L/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/config-3.8-darwin -lpython3.8 -framework CoreFoundatio
n  -lruby.2.7

my vimrc


set incsearch
set ignorecase
set smartcase
set laststatus=2
set hidden
set number
set completeopt-=preview
set clipboard=unnamedplus,unnamed
set splitright 
set splitbelow 
set autoindent
set expandtab
set tabstop=2
set softtabstop=2
set shiftwidth=2
set relativenumber
set guifont=DejaVuSansMono_Nerd_Font:h16
set backspace=indent,eol,start

set rtp+=~/.vim/bundle/Vundle.vim
set rtp+=/usr/local/opt/fzf

" ---------- filetype ----------

filetype plugin indent on 

" ---------- plugins ----------

call plug#begin('~/.vim/plugged')

Plug 'itchyny/lightline.vim'
Plug 'sheerun/vim-polyglot'
Plug 'vim-syntastic/syntastic'
Plug 'pangloss/vim-javascript'
Plug 'mxw/vim-jsx'
Plug 'prettier/vim-prettier'
Plug 'moll/vim-node'
Plug 'junegunn/fzf.vim'
Plug 'terryma/vim-multiple-cursors'
Plug 'scrooloose/nerdtree'
Plug 'editorconfig/editorconfig-vim'
Plug 'airblade/vim-gitgutter'
Plug 'leafgarland/typescript-vim'
Plug 'joshdick/onedark.vim'
Plug 'NovaDev94/lightline-onedark'
Plug 'scrooloose/nerdcommenter'
Plug 'tpope/vim-surround'
Plug 'mileszs/ack.vim'
Plug 'mattn/emmet-vim'
Plug 'zivyangll/git-blame.vim'
Plug 'SirVer/ultisnips'
Plug 'Ivo-Donchev/vim-react-goto-definition'
Plug 'itchyny/vim-gitbranch'
Plug 'tpope/vim-fugitive'
Plug 'dense-analysis/ale'
Plug 'ap/vim-css-color'
Plug 'ryanoasis/vim-devicons'
Plug 'yggdroot/indentline'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'cohama/lexima.vim'

call plug#end()

" ---------- let ----------
let g:lightline = {
      \ 'colorscheme': 'onedark',
      \ 'active': {
      \   'left': [ [ 'mode', 'paste' ],
      \             [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
      \ },
      \ 'component_function': {
      \   'gitbranch': 'gitbranch#name'
      \ },
      \ }
let g:NERDTreeDirArrowExpandable = '▸'
let g:NERDTreeDirArrowCollapsible = '▾'
let g:NERDTreeNodeDelimiter = "\u00a0"
let NERDTreeShowHidden=1
let g:NERDTreeWinSize = 40 
let g:UltiSnipsExpandTrigger='<c-j>'
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
let g:UltiSnipsEditSplit="vertical"
let g:UltiSnipsSnippetsDir="~/.vim/UltiSnips"
let g:UltiSnipsSnippetDirectories=["/Users/davidsttivend/.vim/UltiSnips", "UltiSnips"]
let g:user_emmet_settings = {
\  'javascript' : {
\      'extends' : 'jsx',
\  },
\}
let g:prettier#autoformat = 1
let g:ale_fixers = {'javascript': ['eslint', 'prettier']}
let g:ale_fix_on_save = 1
let g:vim_json_syntax_conceal = 0

let g:indentLine_char = 'c'
let g:indentLine_char_list = ['⎸']
let g:lexima_enable_newline_rules = 1

"autocmd BufWritePre *.js,*.jsx,*.mjs,*.ts,*.tsx,*.css,*.less,*.scss,*.json,*.graphql,*.md,*.vue,*.yaml,*.html PrettierAsync

" --------- Leader ---------

let mapleader = "\<Space>"

"---------- NerdTree ---------

highlight NERDTreeCWD ctermfg=white

"---------- Mapping ---------

nnoremap <C-o> :NERDTreeToggle<CR> 
nnoremap <C-f> :NERDTreeFind<CR> 
nnoremap <leader>o :GFiles<CR>
nnoremap <leader>f :Ag 
nnoremap <leader>s :<C-u>call gitblame#echo()<CR>
nnoremap <silent> <Leader>* :Ag <C-R><C-W><CR>
nnoremap <CR> :nohlsearch<cr>
noremap <leader>g :call ReactGotoDef()<CR>
" window switching
nnoremap <leader>w <c-w>w
nnoremap <leader>N :bp<CR>
nnoremap <leader>p :Prettier<CR>
nnoremap <leader>n :bn<CR>
nnoremap <leader>b :Buffers<CR>
nnoremap <leader>d :bd<CR>

nnoremap <c-h> <c-w>h 
nnoremap <c-j> <c-w>j
nnoremap <c-k> <c-w>k
nnoremap <c-l> <c-w>l
cnoremap <expr> %% getcmdtype() ==# ':' ? fnameescape(expand('%:h')) . '/' : '%%'

" ---------- Folds ----------

nnoremap <leader>c zfiB

" ---------- Theme ----------

syntax on
colorscheme onedark

" ---------- Calls ----------

call lexima#add_rule({'char': "'", 'input_after': "'", 'filetype': 'javascript'})

" use <tab> for trigger completion and navigate to the next complete item
function! s:check_back_space() abort
  let col = col('.') - 1
  return !col || getline('.')[col - 1]  =~ '\s'
endfunction

inoremap <silent><expr> <Tab>
      \ pumvisible() ? "\<C-n>" :
      \ <SID>check_back_space() ? "\<Tab>" :
      \ coc#refresh()

Thanks for the help!

cohama commented 4 years ago

I cannot repro. Please report minimal vimrc.