fsctl/.nvimrc

59 lines
1.6 KiB
Plaintext

" Force-display trailing whitespaces
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
autocmd InsertLeave * match ExtraWhitespace /\s\+$/
autocmd BufWinLeave * call clearmatches()
" indicate the compiler to use
let g:ale_asm_gcc_executable = 'sh-elf-vhex-gcc'
let g:ale_c_gcc_executable = 'sh-elf-vhex-gcc'
let g:ale_c_cc_executable = 'sh-elf-vhex-gcc'
let g:ale_cpp_gcc_executable = 'sh-elf-vhex-gcc'
" Find GiteaPC include directory information
let s:_hdrflags = [
\ '-I./include/',
\ '-I'.$HOME.'/.local/share/giteapc/Lephenixnoir/gint/include/',
\ ]
let s:_cflags = [
\ '-DFXCG50',
\ '-std=c11',
\ '-Wall',
\ '-Wextra',
\ ]
let s:_asmflags = [
\ '-DFXCG50',
\ '-x assembler-with-cpp',
\ '-Wall',
\ '-Wextra',
\ '-m4-nofpu',
\ '-mb',
\ '-Wa,--dsp',
\ ]
" convert table into string
let s:_hdrflags = join(s:_hdrflags)
let s:_asmflags = join(s:_asmflags)
let s:_cflags = join(s:_cflags)
" Patch option
" @note
" - we setup cpp because header file is considered ad C++ file
" - we force sh-elf-vhex for assembly file only
let g:ale_asm_gcc_options = s:_asmflags
let g:ale_c_gcc_options = s:_cflags.' '.s:_hdrflags
let g:ale_c_cc_options = s:_cflags.' '.s:_hdrflags
let g:ale_cpp_cc_options = s:_cflags.' '.s:_hdrflags
let g:ale_cpp_gcc_options = s:_cflags.' '.s:_hdrflags
" Enable completion
let g:ale_completion_enabled = 1
" Enable linter when enter is pressed
let g:ale_lint_on_enter = 1
" Force display non-printable chars
set list