From 14dc82fc4e6c0c08078f97a24a6c1639c1cc5113 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Tue, 14 Apr 2020 13:17:26 +0200 Subject: Update --- after/ftplugin/javascript.vim | 4 ++-- after/ftplugin/llvm.vim | 26 ++++++++++++++++++-------- after/ftplugin/tsx.vim | 4 ++-- after/indent/tsx.vim | 2 ++ after/syntax/javascript/graphql.vim | 2 +- after/syntax/typescript/graphql.vim | 2 +- 6 files changed, 26 insertions(+), 14 deletions(-) (limited to 'after') diff --git a/after/ftplugin/javascript.vim b/after/ftplugin/javascript.vim index 4c1549a8..663e2d8a 100644 --- a/after/ftplugin/javascript.vim +++ b/after/ftplugin/javascript.vim @@ -39,11 +39,11 @@ if exists("loaded_matchup") let b:match_skip = 's:comment\|string' endif -let b:original_commentstring = &l:commentstring +let b:jsx_pretty_old_cms = &l:commentstring augroup jsx_comment autocmd! CursorMoved - autocmd CursorMoved call jsx_pretty#comment#update_commentstring(b:original_commentstring) + autocmd CursorMoved call jsx_pretty#comment#update_commentstring(b:jsx_pretty_old_cms) augroup end setlocal suffixesadd+=.jsx diff --git a/after/ftplugin/llvm.vim b/after/ftplugin/llvm.vim index d67c94b5..fbd4b7ff 100644 --- a/after/ftplugin/llvm.vim +++ b/after/ftplugin/llvm.vim @@ -57,7 +57,7 @@ function! s:is_section_delim(line, func_delim) abort return 0 endif let kind = sec[0] - return kind == s:KIND_BLOCK_PREC || kind == s:KIND_BLOCK_FOLLOW || kind == func_delim + return kind == s:KIND_BLOCK_PREC || kind == s:KIND_BLOCK_FOLLOW || kind == a:func_delim endfunction function! s:next_section(stop_func_begin) abort @@ -85,11 +85,16 @@ function! s:prev_section(stop_func_begin) abort endwhile endfunction +nnoremap (llvm-next-section-begin) :call next_section(1) +nnoremap (llvm-prev-section-begin) :call prev_section(1) +nnoremap (llvm-next-section-end) :call next_section(0) +nnoremap (llvm-prev-section-end) :call prev_section(0) + if !g:llvm_ext_no_mapping - nnoremap ]] :call next_section(1) - nnoremap [[ :call prev_section(1) - nnoremap ][ :call next_section(0) - nnoremap [] :call prev_section(0) + nmap ]] (llvm-next-section-begin) + nmap [[ (llvm-prev-section-begin) + nmap ][ (llvm-next-section-end) + nmap [] (llvm-prev-section-end) endif function! s:function_range_at(linum) abort @@ -222,9 +227,12 @@ function! s:move_to_following_block() abort endtry endfunction +nnoremap (llvm-move-block-prev) :call move_to_pred_block() +nnoremap (llvm-move-block-next) :call move_to_following_block() + if !g:llvm_ext_no_mapping - nnoremap [b :call move_to_pred_block() - nnoremap ]b :call move_to_following_block() + nmap [b (llvm-move-block-prev) + nmap ]b (llvm-move-block-next) endif function! s:get_func_identifiers(line) abort @@ -438,8 +446,10 @@ function! s:goto_definition() abort echom "No definition for '" . ident . "' found" endfunction +nnoremap (llvm-goto-definition) :call goto_definition() + if !g:llvm_ext_no_mapping - nnoremap K :call goto_definition() + nmap K (llvm-goto-definition) endif function! s:run_lli(...) abort diff --git a/after/ftplugin/tsx.vim b/after/ftplugin/tsx.vim index e29d1e41..7cca61cf 100644 --- a/after/ftplugin/tsx.vim +++ b/after/ftplugin/tsx.vim @@ -20,11 +20,11 @@ if exists("loaded_matchup") let b:match_skip = 's:comment\|string' endif -let b:original_commentstring = &l:commentstring +let b:jsx_pretty_old_cms = &l:commentstring augroup jsx_comment autocmd! CursorMoved - autocmd CursorMoved call jsx_pretty#comment#update_commentstring(b:original_commentstring) + autocmd CursorMoved call jsx_pretty#comment#update_commentstring(b:jsx_pretty_old_cms) augroup end setlocal suffixesadd+=.tsx diff --git a/after/indent/tsx.vim b/after/indent/tsx.vim index dd8ee271..084cac57 100644 --- a/after/indent/tsx.vim +++ b/after/indent/tsx.vim @@ -25,6 +25,8 @@ if exists('s:did_indent') let b:did_indent = s:did_indent endif +runtime! indent/typescript.vim + setlocal indentexpr=GetJsxIndent() setlocal indentkeys=0.,0{,0},0),0],0?,0\*,0\,,!^F,:,<:>,o,O,e,<>>,=*/ diff --git a/after/syntax/javascript/graphql.vim b/after/syntax/javascript/graphql.vim index 1c5732ca..f085a301 100644 --- a/after/syntax/javascript/graphql.vim +++ b/after/syntax/javascript/graphql.vim @@ -1,6 +1,6 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 -" Copyright (c) 2016-2019 Jon Parise +" Copyright (c) 2016-2020 Jon Parise " " Permission is hereby granted, free of charge, to any person obtaining a copy " of this software and associated documentation files (the "Software"), to diff --git a/after/syntax/typescript/graphql.vim b/after/syntax/typescript/graphql.vim index f30c4efd..30075e6d 100644 --- a/after/syntax/typescript/graphql.vim +++ b/after/syntax/typescript/graphql.vim @@ -1,6 +1,6 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 -" Copyright (c) 2016-2019 Jon Parise +" Copyright (c) 2016-2020 Jon Parise " " Permission is hereby granted, free of charge, to any person obtaining a copy " of this software and associated documentation files (the "Software"), to -- cgit v1.2.3