From 0bf54d569c8b3aa75253956dd2478b9b17703bb6 Mon Sep 17 00:00:00 2001 From: arnaucube Date: Sun, 21 Aug 2022 11:22:24 +0200 Subject: [PATCH] update nvim config --- bin/kobo-parse-highlights | 15 +++++++++++++++ bin/ltx | 1 + init.vim | 38 ++++++++++++++++++++++---------------- 3 files changed, 38 insertions(+), 16 deletions(-) create mode 100755 bin/kobo-parse-highlights diff --git a/bin/kobo-parse-highlights b/bin/kobo-parse-highlights new file mode 100755 index 0000000..d59d8b0 --- /dev/null +++ b/bin/kobo-parse-highlights @@ -0,0 +1,15 @@ +#!/usr/bin/env python3 +# script to print all the Kobo highlights in a human readable fashion + +import sys +import xml.etree.ElementTree as ET + +tree = ET.parse(sys.argv[1]) +root = tree.getroot() + + +for annotation in root: + for target in annotation: + for fragment in target: + for text in fragment: + print("-", text.text) diff --git a/bin/ltx b/bin/ltx index 164e227..eba39c5 100755 --- a/bin/ltx +++ b/bin/ltx @@ -3,4 +3,5 @@ # clipboard CODE=$1 +python -m unicodeit.cli $CODE python -m unicodeit.cli $CODE | xclip -selection clipboard diff --git a/init.vim b/init.vim index 51905a0..51111b4 100644 --- a/init.vim +++ b/init.vim @@ -42,14 +42,17 @@ let g:rustfmt_autosave = 1 " javascript Plug 'jelera/vim-javascript-syntax' -" python -Plug 'davidhalter/jedi-vim' -Plug 'raimon49/requirements.txt.vim', {'for': 'requirements'} +" python (disabled as puts conceallevel=2, which forces markdown +" previsualization :S) +" Plug 'davidhalter/jedi-vim' +" Plug 'raimon49/requirements.txt.vim', {'for': 'requirements'} " solidity Plug 'tomlion/vim-solidity' " circom Plug 'iden3/vim-circom-syntax' +" Cairo +" Plug 'miguelmota/cairo.vim' " LaTeX support. It needs latexmk & zathura Plug 'lervag/vimtex' @@ -99,16 +102,6 @@ Plug 'morhetz/gruvbox' call plug#end() -" next 3 lines are needed for vimwiki -set nocompatible -filetype plugin on -syntax on -" vimwiki with markdown -let g:vimwiki_list = [{'path': '~/vimwiki/', - \ 'syntax': 'markdown', 'ext': '.md'}] -" prevent vimwiki of setting conceallevel=2: -let g:vimwiki_conceallevel=0 - let $NVIM_TUI_ENABLE_TRUE_COLOR=1 set termguicolors @@ -171,8 +164,9 @@ let g:airline_skip_empty_sections = 1 " errors -"" for go needs gopls installed (comes with vim-go pluggin) -"" for rust with rust-analyzer needs https://rust-analyzer.github.io/manual.html#rust-analyzer-language-server-binary installed +"" For go needs gopls installed (comes with vim-go pluggin) +"" For rust with rust-analyzer needs https://rust-analyzer.github.io/manual.html#rust-analyzer-language-server-binary installed +"" --> place it at ~.local/bin or ~/bin and make sure that the PATH is defined (eg. in .zshrc: export PATH=$PATH:.local/bin) "" [old] for rust with rls needs https://github.com/rust-lang/rls installed let g:lt_location_list_toggle_map = 'l' let g:lt_quickfix_list_toggle_map = 's' @@ -194,6 +188,17 @@ nnoremap :call LanguageClient#textDocument_rename() noremap :cn + +" next 3 lines are needed for vimwiki +set nocompatible +filetype plugin on +syntax on +" vimwiki with markdown +let g:vimwiki_list = [{'path': '~/vimwiki/', + \ 'syntax': 'markdown', 'ext': '.md'}] +" prevent vimwiki of setting conceallevel=2: +let g:vimwiki_conceallevel=0 + " rainbowparentheses let g:rainbow_active = 1 @@ -229,7 +234,7 @@ vnoremap p "+p " shortcut for theme change nnoremap :colorscheme gruvbox \| set background=dark \| highlight normal ctermbg=0 guibg=#000000 -nnoremap :colorscheme gruvbox \| set background=light +nnoremap :colorscheme one \| set background=light \| highlight normal guibg=#ffffff " colorscheme let g:gruvbox_contrast_dark = 'hard' @@ -243,5 +248,6 @@ set background=dark " colorscheme molokai colorscheme gruvbox +set conceallevel=0 highlight normal ctermbg=0 guibg=#000000