Skip to content
Snippets Groups Projects
Commit c3ecee05 authored by Henrik Tjäder's avatar Henrik Tjäder
Browse files

Cleanup ErrorMsg, Python and add GDB integration. FZF fix

parent e2d417d7
Branches
No related tags found
No related merge requests found
......@@ -70,6 +70,8 @@ if has('nvim')
Plug 'ms-jpq/coq_nvim', {'branch': 'coq'}
" 9000+ Snippets
Plug 'ms-jpq/coq.artifacts', {'branch': 'artifacts'}
" Neovim GDB/LLDB integration
Plug 'sakhnik/nvim-gdb', { 'do': ':!./install.sh' }
endif
" Ack, similar like grep
......@@ -366,14 +368,8 @@ hi DiffChanged ctermfg=NONE ctermbg=NONE
hi DiffRemoved ctermfg=Blue ctermbg=LightRed
hi DiffText ctermfg=Yellow ctermbg=LightRed
hi Error ctermfg=Black ctermbg=Red guifg=Black guibg=Red
hi! ErrorMsg ctermfg=Black ctermbg=Red guifg=Black guibg=Red
" Make ErrorMsg the same as Error
"hi! link ErrorMsg Error
"hi! ErrorMsg ctermfg=Black ctermbg=Red
"hi! link NvimInternalError Error
"hi Error ctermfg=Black ctermbg=Red guifg=Black guibg=Red
au ColorScheme * hi Error ctermfg=Black ctermbg=Red guifg=Black guibg=Red
au ColorScheme * hi ErrorMsg ctermfg=Black ctermbg=Red guifg=Black guibg=Red
" Fix the difficult-to-read default setting for diff text highlighting. The
" bang (!) is required since we are overwriting the DiffText setting. The highlighting
......@@ -458,13 +454,13 @@ endif
set fileformat=unix
set fileformats=unix,dos
if has('python3')
silent! python3 1
endif
"if has('python3')
" silent! python3 1
"endif
" enable all Python syntax highlighting features
let python_highlight_all = 1
let g:pymode_python = 'python3'
"let g:pymode_python = 'python3'
let g:pymode_rope=0
" Highlight whitespaces
......@@ -527,9 +523,6 @@ let g:coq_settings = {
" Clear a search instead of searching random stuff
nmap <silent> ,/ :nohlsearch<CR>
" Make ripgrep use smart-case
let g:rg_command = 'rg --vimgrep -S'
" ctrlsf settings search
let g:ctrlsf_search_mode = 'async'
let g:ctrlsf_default_root = 'project'
......@@ -791,6 +784,22 @@ set laststatus=2
" Python and C debugger pyclewn
let g:pyclewn_args = "--pgm=/usr/bin/arm-none-eabi-gdb"
" We're going to define single-letter keymaps, so don't try to define them
" in the terminal window. The debugger CLI should continue accepting text commands.
function! NvimGdbNoTKeymaps()
tnoremap <silent> <buffer> <esc> <c-\><c-n>
endfunction
let g:nvimgdb_config_override = {
\ 'key_next': 'n',
\ 'key_step': 's',
\ 'key_finish': 'f',
\ 'key_continue': 'c',
\ 'key_until': 'u',
\ 'key_breakpoint': 'b',
\ 'set_tkeymaps': "NvimGdbNoTKeymaps",
\ }
" OCAML
set rtp^="/home/henrik/.opam/system/share/ocp-indent/vim"
......@@ -1027,6 +1036,8 @@ let g:vimtex_compiler_latexmk = {
" \ 'build_dir' : 'build',
" \}
" Suggested by :checkhealth
let g:vimtex_compiler_progname = 'nvr'
" Default off, enable vimtex folding
let g:vimtex_fold_enabled = 1
......@@ -1072,10 +1083,8 @@ let g:fzf_preview_window = 'right:60%'
let g:fzf_buffers_jump = 1 " [Buffers] to existing split
"let $FZF_DEFAULT_OPTIONS='--ansi -i --inline-info'
"let $FZF_DEFAULT_COMMAND="rg --vimgrep --column --line-number --no-heading --color=always --smart-case --hidden"
"let $FZF_DEFAULT_COMMAND="rg --files --vimgrep --column --line-number --no-heading --color=always --smart-case --hidden"
let $FZF_DEFAULT_COMMAND='rg --vimgrep --no-heading --color=always --smart-case --hidden -g!.git -g!.pijul "{}" || git ls-tree -r --name-only HEAD || fd --type f || find .'
let $FZF_DEFAULT_COMMAND='rg --vimgrep --no-heading --color=never --smart-case --hidden --files-with-matches -g\!.git -g\!.pijul . || git ls-tree -r --name-only HEAD || fd --type f || find .'
"Get Files
"command! -bang -nargs=? -complete=dir Files
......@@ -1090,7 +1099,7 @@ let $FZF_DEFAULT_COMMAND='rg --vimgrep --no-heading --color=always --smart-case
" Ripgrep advanced
function! RipgrepFzf(query, fullscreen)
let command_fmt = 'rg --column --line-number --no-heading --color=always --smart-case %s || true'
let command_fmt = 'rg --column --line-number --no-heading --color=always --smart-case --hidden %s || true'
let initial_command = printf(command_fmt, shellescape(a:query))
let reload_command = printf(command_fmt, '{q}')
let spec = {'options': ['--phony', '--query', a:query, '--bind', 'change:reload:'.reload_command]}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment