Compare commits
No commits in common. "aae0389dcaa4a7e2e6bcfd71152657c40df06307" and "ca2760f4773b9fcefc7e4bf5422c1c5e633dce82" have entirely different histories.
aae0389dca
...
ca2760f477
@ -1,2 +0,0 @@
|
|||||||
---
|
|
||||||
- location: ~/.vim
|
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,2 @@
|
|||||||
.netrwhist
|
.netrwhist
|
||||||
bundle/*
|
plugs/*
|
||||||
|
@ -86,3 +86,7 @@ endsnippet
|
|||||||
snippet *[ "GitHub style checkbox"
|
snippet *[ "GitHub style checkbox"
|
||||||
* [${1: }] $0
|
* [${1: }] $0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
snippet [[ "lit named ID match" i
|
||||||
|
[[${1:name}:%[a-zA-Z0-9]+]]
|
||||||
|
endsnippet
|
||||||
|
@ -32,13 +32,13 @@ class ${1:name} {
|
|||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet template "Template"
|
snippet template "Template"
|
||||||
template <class ${1:type}>$0
|
template <class ${1:T}$2>$0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet namespace "Named or anonymous namespace"
|
snippet namespace "Named or anonymous namespace"
|
||||||
namespace $1${1/(\w+)/ /}{
|
namespace $1${1/(\w+)/ /}{
|
||||||
$0
|
$0
|
||||||
} // ${1/(\w*)/(?1:$1:anonymous)/}
|
} // namespace${1/(\w*)/(?1: $1:)/}
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet const_cast "Const cast" i
|
snippet const_cast "Const cast" i
|
||||||
|
7
after/ftdetect/python.vim
Normal file
7
after/ftdetect/python.vim
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
function! s:set_lit_cfg_filetype()
|
||||||
|
set filetype=python
|
||||||
|
ALEDisableBuffer
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
au BufNewFile,BufReadPost lit.cfg call s:set_lit_cfg_filetype()
|
||||||
|
au BufNewFile,BufReadPost lit.local.cfg call s:set_lit_cfg_filetype()
|
@ -5,6 +5,7 @@ hi link markdownHeadingDelimiter PreProc
|
|||||||
hi link markdownLinkDelimiter PreProc
|
hi link markdownLinkDelimiter PreProc
|
||||||
hi link markdownLinkTextDelimiter PreProc
|
hi link markdownLinkTextDelimiter PreProc
|
||||||
hi link markdownUrl Include
|
hi link markdownUrl Include
|
||||||
|
hi link markdownError None
|
||||||
|
|
||||||
" Add match for GitHub style check boxes
|
" Add match for GitHub style check boxes
|
||||||
syn match markdownCheckboxTick '\[\zsx\ze\]' contained
|
syn match markdownCheckboxTick '\[\zsx\ze\]' contained
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
syn keyword zshOption interactivecomments INTERACTIVE_COMMENTS
|
syn region zshParentheses matchgroup=Delimiter start='(' skip='\\)' end=')' transparent fold
|
||||||
syn region zshBlock matchgroup=zshParans start="{" end="}" transparent fold
|
syn region zshParentheses matchgroup=Delimiter start="{" end="}" transparent fold
|
||||||
hi link zshParans Delimiter
|
|
||||||
|
" TODO: Correctly highlight associative array assignment, see zshVariableDef.
|
||||||
|
|
||||||
|
hi link zshOperator Operator
|
||||||
|
@ -20,6 +20,8 @@ function! do#rstrip_lines()
|
|||||||
call cursor(l:line, l:column)
|
call cursor(l:line, l:column)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
" TODO: Strip white space from left of all lines, retains relative indentation.
|
||||||
|
|
||||||
" Set the tab width for the current filetype
|
" Set the tab width for the current filetype
|
||||||
function! do#set_tab_width(width)
|
function! do#set_tab_width(width)
|
||||||
execute 'setlocal tabstop='.a:width
|
execute 'setlocal tabstop='.a:width
|
||||||
|
@ -95,7 +95,7 @@ if has('gui_running') || &t_Co == 256
|
|||||||
call s:hi('Cursor', '', '', 'reverse')
|
call s:hi('Cursor', '', '', 'reverse')
|
||||||
call s:hi('CursorIM', '', '', '')
|
call s:hi('CursorIM', '', '', '')
|
||||||
call s:hi('CursorColumn', '235', '', '')
|
call s:hi('CursorColumn', '235', '', '')
|
||||||
call s:hi('CursorLine', '', '', '')
|
call s:hi('CursorLine', '', '0', '')
|
||||||
call s:hi('Directory', '', '', '')
|
call s:hi('Directory', '', '', '')
|
||||||
call s:hi('DiffAdd', '2', '', '')
|
call s:hi('DiffAdd', '2', '', '')
|
||||||
call s:hi('DiffChange', '', '', '')
|
call s:hi('DiffChange', '', '', '')
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
" Set .ll files to LLVM IR filetype
|
" Set .ll files to LLVM IR filetype
|
||||||
au BufNewFile,BufReadPost *.ll set filetype=llvm
|
au BufNewFile,BufReadPost *.ll set filetype=llvm
|
||||||
|
au BufNewFile,BufReadPost *.test set filetype=llvm
|
||||||
|
@ -5,6 +5,8 @@ command! ISort call do#isort()
|
|||||||
" TODO: Make RStripLines work on a range
|
" TODO: Make RStripLines work on a range
|
||||||
command! RStripLines call do#rstrip_lines()
|
command! RStripLines call do#rstrip_lines()
|
||||||
|
|
||||||
|
" TODO: Strip white space from left of all lines, retains relative indentation.
|
||||||
|
|
||||||
" Set tab width
|
" Set tab width
|
||||||
command! -nargs=1 TabWidth call do#set_tab_width(<f-args>)
|
command! -nargs=1 TabWidth call do#set_tab_width(<f-args>)
|
||||||
|
|
||||||
|
@ -21,6 +21,8 @@ endif
|
|||||||
set laststatus=2
|
set laststatus=2
|
||||||
" Show the line and colum number of a cursor position
|
" Show the line and colum number of a cursor position
|
||||||
set ruler
|
set ruler
|
||||||
|
" Show the current line with different highlighting
|
||||||
|
set cursorline
|
||||||
|
|
||||||
" Enhanced command line completion
|
" Enhanced command line completion
|
||||||
set wildmenu
|
set wildmenu
|
||||||
@ -91,7 +93,7 @@ set noshowmode
|
|||||||
|
|
||||||
" Show relative line numbers & current line number
|
" Show relative line numbers & current line number
|
||||||
set number
|
set number
|
||||||
if has('relativenumber')
|
if exists('+relativenumber')
|
||||||
set relativenumber
|
set relativenumber
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -37,6 +37,9 @@ syn keyword cppConstant __cplusplus
|
|||||||
|
|
||||||
" C++11
|
" C++11
|
||||||
if !exists('cpp_no_cpp11')
|
if !exists('cpp_no_cpp11')
|
||||||
|
" Identifiers with special meaning: override final
|
||||||
|
" TODO: These should not be keyword's, instead highlight based on context
|
||||||
|
" since these can be used as regular identifiers outside of those contexts.
|
||||||
syn keyword cppModifier override final
|
syn keyword cppModifier override final
|
||||||
syn keyword cppType char16_t char32_t nullptr_t
|
syn keyword cppType char16_t char32_t nullptr_t
|
||||||
syn keyword cppExceptions noexcept
|
syn keyword cppExceptions noexcept
|
||||||
@ -51,11 +54,55 @@ if !exists('cpp_no_cpp11')
|
|||||||
" however if the match starts before the beginning of the keyword it will be
|
" however if the match starts before the beginning of the keyword it will be
|
||||||
" chosen instead so we can specialze for this case.
|
" chosen instead so we can specialze for this case.
|
||||||
syn match cppStatement '=\s*\(delete\|default\)\>\ze\s*;\?' contains=cOperator display
|
syn match cppStatement '=\s*\(delete\|default\)\>\ze\s*;\?' contains=cOperator display
|
||||||
|
|
||||||
|
" Attribute Specifier Sequence
|
||||||
|
" Match: [[attribute-list]]
|
||||||
|
syn region cppAttributeDelimiter matchgroup=cppDelimiter start='\[\[' skip='\[\[' end='\]\]' transparent contains=cppAttribute,cppNamespace,cppAttributeUsing,cppAttributeUsingNamespace,cDelimiter,cString,cOperator,cNumber,cppFunction,cFunction
|
||||||
|
|
||||||
|
" Standard Attributes
|
||||||
|
syn keyword cppAttribute noreturn carries_dependency contained
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" C++14
|
" C++14
|
||||||
if !exists('cpp_no_cpp14')
|
if !exists('cpp_no_cpp14')
|
||||||
syn match cppNumber display '\<0b[01]\+\(u\=l\{0,2}\|ll\=u\)\>'
|
syn match cppNumber display '\<0b[01]\+\(u\=l\{0,2}\|ll\=u\)\>'
|
||||||
|
" Standard Attributes
|
||||||
|
syn keyword cppAttribute deprecated contained
|
||||||
|
endif
|
||||||
|
|
||||||
|
" C++17
|
||||||
|
if !exists('cpp_no_cpp17')
|
||||||
|
" Attribute Specifier Sequence
|
||||||
|
" Match: [[using attribute-namespace: attribute-list]]
|
||||||
|
syn match cppAttributeUsingNamespace '\s\+\zs\w\+\ze\s*:' contained contains=cppAttributeUsing
|
||||||
|
syn keyword cppAttributeUsing using contained
|
||||||
|
|
||||||
|
" Standard Attributes
|
||||||
|
syn keyword cppAttribute fallthrough nodiscard maybe_unused contained
|
||||||
|
|
||||||
|
hi def link cppAttributeUsing cppStatement
|
||||||
|
hi def link cppAttributeUsingNamespace cInclude
|
||||||
|
hi def link cppAttributeUsingDelimiter cppDelimiter
|
||||||
|
endif
|
||||||
|
|
||||||
|
" C++20
|
||||||
|
if !exists('cpp_no_cpp20')
|
||||||
|
syn keyword cppStatement concept requires
|
||||||
|
|
||||||
|
" TODO: Attribute Specifier Sequence
|
||||||
|
" Match: [[contract-attribute-token contract-level(opt) identifier(opt): expression]]
|
||||||
|
"
|
||||||
|
" Standard Attributes
|
||||||
|
syn keyword cppAttribute likely unlikely no_unique_address contained
|
||||||
|
syn keyword cppAttribute expects ensures assert contained
|
||||||
|
|
||||||
|
" Contract Levels
|
||||||
|
syn keyword cppAttribute default audit axiom contained
|
||||||
|
"
|
||||||
|
" TODO: These should not be keyword's, instead highlight based on context
|
||||||
|
" since these can be used as regular identifiers outside of those contexts.
|
||||||
|
" These only occur inside an contracts generalised attribute.
|
||||||
|
syn keyword cppModifier audit axiom
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if !exists('cpp_no_function')
|
if !exists('cpp_no_function')
|
||||||
@ -73,14 +120,14 @@ if !exists('cpp_no_delimiters')
|
|||||||
|
|
||||||
" Match: nested namespace expressions: expr::
|
" Match: nested namespace expressions: expr::
|
||||||
" ^^^^
|
" ^^^^
|
||||||
syn match cppNestedName '\w\+::' display contains=cppDelimiter
|
syn match cppNamespace '\w\+::' display contains=cppDelimiter
|
||||||
|
|
||||||
" Match: label: as a Label and public: protected: private: as a Statement
|
" Match: label: as a Label and public: protected: private: as a Statement
|
||||||
" ^^^^^ ^^^^^^ ^^^^^^^^^ ^^^^^^^
|
" ^^^^^ ^^^^^^ ^^^^^^^^^ ^^^^^^^
|
||||||
syn match cUserCont "^\s*\I\i*\s*:$" contains=cUserLabel,cppAccess display
|
syn match cUserCont "^\s*\I\i*\s*:$" contains=cUserLabel,cppAccess display
|
||||||
|
|
||||||
hi default link cppDelimiter cDelimiter
|
hi default link cppDelimiter cDelimiter
|
||||||
hi default link cppNestedName cInclude
|
hi default link cppNamespace cInclude
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if !exists('cpp_no_operators') && !exists('cpp_no_delimiters')
|
if !exists('cpp_no_operators') && !exists('cpp_no_delimiters')
|
||||||
@ -114,5 +161,6 @@ hi def link cppConstant Constant
|
|||||||
hi def link cppRawStringDelimiter Delimiter
|
hi def link cppRawStringDelimiter Delimiter
|
||||||
hi def link cppRawString String
|
hi def link cppRawString String
|
||||||
hi def link cppNumber Number
|
hi def link cppNumber Number
|
||||||
|
hi def link cppAttribute Keyword
|
||||||
|
|
||||||
let b:current_syntax = 'cpp'
|
let b:current_syntax = 'cpp'
|
||||||
|
7
vimrc
7
vimrc
@ -48,7 +48,7 @@ if !platform#is_windows()
|
|||||||
let g:ycm_warning_symbol = '▸'
|
let g:ycm_warning_symbol = '▸'
|
||||||
let g:ycm_goto_buffer_command = 'horizontal-split'
|
let g:ycm_goto_buffer_command = 'horizontal-split'
|
||||||
endif
|
endif
|
||||||
if has('python') || has('python3')
|
if has('python')
|
||||||
" ultisnips - snippet engine
|
" ultisnips - snippet engine
|
||||||
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
|
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
|
||||||
endif
|
endif
|
||||||
@ -175,8 +175,11 @@ let g:sh_fold_enabled = 1
|
|||||||
" xterm-color-table.vim - view term and hex colors
|
" xterm-color-table.vim - view term and hex colors
|
||||||
Plug 'guns/xterm-color-table.vim'
|
Plug 'guns/xterm-color-table.vim'
|
||||||
|
|
||||||
" CMake, GLSL, HLSL, OpenCL C syntax
|
" SPIR-V syntax
|
||||||
Plug 'kbenzie/vim-spirv'
|
Plug 'kbenzie/vim-spirv'
|
||||||
|
let g:spirv_current_id_highlight = 'ctermbg=234, guibg=#1c1c1c'
|
||||||
|
|
||||||
|
" CMake, GLSL, HLSL, OpenCL C syntax
|
||||||
Plug 'rperier/vim-cmake-syntax'
|
Plug 'rperier/vim-cmake-syntax'
|
||||||
Plug 'tikhomirov/vim-glsl'
|
Plug 'tikhomirov/vim-glsl'
|
||||||
Plug 'beyondmarc/hlsl.vim'
|
Plug 'beyondmarc/hlsl.vim'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user