summaryrefslogtreecommitdiffstats
path: root/after
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-04-14 13:17:26 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2020-04-14 13:17:26 +0200
commit14dc82fc4e6c0c08078f97a24a6c1639c1cc5113 (patch)
treedea8d2398a9377a0eee7786776e3cd420ce1ee89 /after
parente86e0ad36ef9501acbc3e8c63a1d4fab104e47cb (diff)
downloadvim-polyglot-14dc82fc4e6c0c08078f97a24a6c1639c1cc5113.tar.gz
vim-polyglot-14dc82fc4e6c0c08078f97a24a6c1639c1cc5113.zip
Update
Diffstat (limited to 'after')
-rw-r--r--after/ftplugin/javascript.vim4
-rw-r--r--after/ftplugin/llvm.vim26
-rw-r--r--after/ftplugin/tsx.vim4
-rw-r--r--after/indent/tsx.vim2
-rw-r--r--after/syntax/javascript/graphql.vim2
-rw-r--r--after/syntax/typescript/graphql.vim2
6 files changed, 26 insertions, 14 deletions
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 <buffer>
- autocmd CursorMoved <buffer> call jsx_pretty#comment#update_commentstring(b:original_commentstring)
+ autocmd CursorMoved <buffer> 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 <buffer><Plug>(llvm-next-section-begin) :<C-u>call <SID>next_section(1)<CR>
+nnoremap <buffer><Plug>(llvm-prev-section-begin) :<C-u>call <SID>prev_section(1)<CR>
+nnoremap <buffer><Plug>(llvm-next-section-end) :<C-u>call <SID>next_section(0)<CR>
+nnoremap <buffer><Plug>(llvm-prev-section-end) :<C-u>call <SID>prev_section(0)<CR>
+
if !g:llvm_ext_no_mapping
- nnoremap <buffer><silent>]] :<C-u>call <SID>next_section(1)<CR>
- nnoremap <buffer><silent>[[ :<C-u>call <SID>prev_section(1)<CR>
- nnoremap <buffer><silent>][ :<C-u>call <SID>next_section(0)<CR>
- nnoremap <buffer><silent>[] :<C-u>call <SID>prev_section(0)<CR>
+ nmap <buffer><silent>]] <Plug>(llvm-next-section-begin)
+ nmap <buffer><silent>[[ <Plug>(llvm-prev-section-begin)
+ nmap <buffer><silent>][ <Plug>(llvm-next-section-end)
+ nmap <buffer><silent>[] <Plug>(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 <buffer><Plug>(llvm-move-block-prev) :<C-u>call <SID>move_to_pred_block()<CR>
+nnoremap <buffer><Plug>(llvm-move-block-next) :<C-u>call <SID>move_to_following_block()<CR>
+
if !g:llvm_ext_no_mapping
- nnoremap <buffer><silent>[b :<C-u>call <SID>move_to_pred_block()<CR>
- nnoremap <buffer><silent>]b :<C-u>call <SID>move_to_following_block()<CR>
+ nmap <buffer><silent>[b <Plug>(llvm-move-block-prev)
+ nmap <buffer><silent>]b <Plug>(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 <buffer><Plug>(llvm-goto-definition) :<C-u>call <SID>goto_definition()<CR>
+
if !g:llvm_ext_no_mapping
- nnoremap <buffer><silent>K :<C-u>call <SID>goto_definition()<CR>
+ nmap <buffer><silent>K <Plug>(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 <buffer>
- autocmd CursorMoved <buffer> call jsx_pretty#comment#update_commentstring(b:original_commentstring)
+ autocmd CursorMoved <buffer> 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 <jon@indelible.org>
+" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
"
" 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 <jon@indelible.org>
+" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>
"
" Permission is hereby granted, free of charge, to any person obtaining a copy
" of this software and associated documentation files (the "Software"), to