From d7298c2f85668a846e245c6c4d495519d61bdec1 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Sat, 7 Nov 2020 16:58:33 +0100 Subject: [PATCH] Remove nvim --- .gitmodules | 3 - home/.config/nvim/LanguageClient.json | 3 - home/.config/nvim/UltiSnips/rust.snippets | 7 - home/.config/nvim/UltiSnips/tex.snippets | 19 -- home/.config/nvim/UltiSnips/texmath.snippets | 23 --- home/.config/nvim/autoload/plug.vim | 1 - home/.config/nvim/ftdetect/filetypes.vim | 34 ---- home/.config/nvim/ftplugin/python.vim | 20 --- home/.config/nvim/init.vim | 177 ------------------- vim-plug | 1 - 10 files changed, 288 deletions(-) delete mode 100644 home/.config/nvim/LanguageClient.json delete mode 100644 home/.config/nvim/UltiSnips/rust.snippets delete mode 100644 home/.config/nvim/UltiSnips/tex.snippets delete mode 100644 home/.config/nvim/UltiSnips/texmath.snippets delete mode 120000 home/.config/nvim/autoload/plug.vim delete mode 100644 home/.config/nvim/ftdetect/filetypes.vim delete mode 100644 home/.config/nvim/ftplugin/python.vim delete mode 100644 home/.config/nvim/init.vim delete mode 160000 vim-plug diff --git a/.gitmodules b/.gitmodules index 264081a..9b450b1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,9 +4,6 @@ [submodule "mpv-gallery-view"] path = mpv-gallery-view url = https://github.com/occivink/mpv-gallery-view -[submodule "vim-plug"] - path = vim-plug - url = https://github.com/junegunn/vim-plug [submodule "grml-etc-core"] path = grml-etc-core url = https://github.com/grml/grml-etc-core diff --git a/home/.config/nvim/LanguageClient.json b/home/.config/nvim/LanguageClient.json deleted file mode 100644 index a816e35..0000000 --- a/home/.config/nvim/LanguageClient.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "rust.clippy_preference": "on" -} diff --git a/home/.config/nvim/UltiSnips/rust.snippets b/home/.config/nvim/UltiSnips/rust.snippets deleted file mode 100644 index bd23a3b..0000000 --- a/home/.config/nvim/UltiSnips/rust.snippets +++ /dev/null @@ -1,7 +0,0 @@ -snippet disp "Display trait implentation" -impl fmt::Display for ${1:Struct} { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "${2}", ${3}) - } -}${0} -endsnippet diff --git a/home/.config/nvim/UltiSnips/tex.snippets b/home/.config/nvim/UltiSnips/tex.snippets deleted file mode 100644 index 64359ba..0000000 --- a/home/.config/nvim/UltiSnips/tex.snippets +++ /dev/null @@ -1,19 +0,0 @@ -extends tex - -snippet s "Section" b -\section{$1} - - -endsnippet - -snippet ss "Subsection" b -\subsection{$1} - - -endsnippet - -snippet sss "Subsubsection" b -\subsubsection{$1} - - -endsnippet diff --git a/home/.config/nvim/UltiSnips/texmath.snippets b/home/.config/nvim/UltiSnips/texmath.snippets deleted file mode 100644 index 13c76a1..0000000 --- a/home/.config/nvim/UltiSnips/texmath.snippets +++ /dev/null @@ -1,23 +0,0 @@ -extends texmath - -snippet qf "Quadratic formula (user is responsible for parentheses)" w -\frac{-${2:b} \pm \sqrt{$2^2 - 4 \cdot ${1:a} \cdot ${3:c}}}{2 \cdot $1}$0 -endsnippet - -snippet aligned "aligned environment (in math mode)" w -\begin{aligned} - $1 &= $0 \\\\ -\end{aligned} -endsnippet - -snippet si "Insert SI unit (only works with simple numbers)" w -\SI{${1:amount}}{${2:unit}} -endsnippet - -snippet · "Insert multiplication sign" A -\cdot $0 -endsnippet - -snippet // "Fraction" iA -\frac{$1}{$2}$0 -endsnippet diff --git a/home/.config/nvim/autoload/plug.vim b/home/.config/nvim/autoload/plug.vim deleted file mode 120000 index fdac7be..0000000 --- a/home/.config/nvim/autoload/plug.vim +++ /dev/null @@ -1 +0,0 @@ -../../../../vim-plug/plug.vim \ No newline at end of file diff --git a/home/.config/nvim/ftdetect/filetypes.vim b/home/.config/nvim/ftdetect/filetypes.vim deleted file mode 100644 index 75f22db..0000000 --- a/home/.config/nvim/ftdetect/filetypes.vim +++ /dev/null @@ -1,34 +0,0 @@ -" Set unknown filetypes -autocmd BufRead,BufNewFile *.scad set filetype=openscad -autocmd BufRead,BufNewFile *.vpy set filetype=python -autocmd BufRead,BufNewFile *.tex set filetype=tex - -" Set properties -autocmd Filetype arduino setlocal ts=2 sw=2 sts=2 expandtab -autocmd Filetype c setlocal ts=4 sw=4 sts=4 expandtab -autocmd Filetype cpp setlocal ts=4 sw=4 sts=4 expandtab -autocmd Filetype css setlocal ts=2 sw=2 sts=2 expandtab -autocmd Filetype dockerfile setlocal ts=4 sw=4 sts=4 expandtab -autocmd Filetype dot setlocal ts=2 sw=2 sts=2 expandtab -autocmd Filetype gitcommit setlocal colorcolumn=72 -autocmd Filetype go setlocal ts=4 sw=4 sts=4 -autocmd Filetype haskell setlocal ts=4 sw=4 sts=4 expandtab -autocmd Filetype html setlocal ts=2 sw=2 sts=2 expandtab -autocmd Filetype jinja.html setlocal ts=2 sw=2 sts=2 expandtab -autocmd Filetype javascript setlocal ts=2 sw=2 sts=2 expandtab -autocmd Filetype jinja setlocal ts=2 sw=2 sts=2 expandtab -autocmd Filetype json setlocal ts=2 sw=2 sts=2 expandtab -autocmd Filetype lua setlocal ts=4 sw=4 sts=4 expandtab -autocmd Filetype markdown setlocal ts=2 sw=2 sts=2 expandtab -autocmd Filetype openscad setlocal ts=2 sw=2 sts=2 expandtab -autocmd Filetype python setlocal ts=4 sw=4 sts=4 expandtab -autocmd Filetype sass setlocal ts=2 sw=2 sts=2 expandtab -autocmd Filetype scss setlocal ts=2 sw=2 sts=2 expandtab -autocmd Filetype sh setlocal ts=4 sw=4 sts=4 -autocmd Filetype tex setlocal ts=1 sw=1 sts=1 expandtab -autocmd Filetype toml setlocal ts=2 sw=2 sts=2 expandtab -autocmd Filetype vim setlocal ts=2 sw=2 sts=2 expandtab -autocmd Filetype vue setlocal ts=2 sw=2 sts=2 expandtab -autocmd Filetype xml setlocal ts=2 sw=2 sts=2 expandtab -autocmd Filetype yaml setlocal ts=2 sw=2 sts=2 expandtab -autocmd Filetype zsh setlocal ts=4 sw=4 sts=4 expandtab diff --git a/home/.config/nvim/ftplugin/python.vim b/home/.config/nvim/ftplugin/python.vim deleted file mode 100644 index ed43982..0000000 --- a/home/.config/nvim/ftplugin/python.vim +++ /dev/null @@ -1,20 +0,0 @@ -let b:black_disable = 0 -autocmd BufWritePre if b:black_disable != 1 | execute 'silent Black' | endif -map b :let b:black_disable = (b:black_disable + 1) % 2 - -" Show icon in airline when black is disabled -" Adapted from https://github.com/ryanoasis/vim-devicons/blob/a5750c6507602a7238e1c87669c64a6d820a319d/plugin/webdevicons.vim#L567 -function! BlackIconStatus() - if &filetype ==# 'python' && b:black_disable == 1 - return "  " - else - return "" - endif -endfunction - -function! AirlineBlackIcon(...) - let w:airline_section_x = get(w:, 'airline_section_x', get(g:, 'airline_section_x', '')) - let w:airline_section_x .= '%{BlackIconStatus()}' -endfunction - -call airline#add_statusline_func('AirlineBlackIcon') diff --git a/home/.config/nvim/init.vim b/home/.config/nvim/init.vim deleted file mode 100644 index 59ffa55..0000000 --- a/home/.config/nvim/init.vim +++ /dev/null @@ -1,177 +0,0 @@ -" Basic display -set number -set colorcolumn=80 - -" Persistent undo -set undofile -set undolevels=4096 -set undoreload=16384 - -" Search -set ignorecase - -" Hide search when enter is pressed -nnoremap :nohlsearch - -" Autoload settings from file -set modeline - -" Use system clipboard -set clipboard=unnamedplus - -" Support more file encodings -set fileencodings=ucs-bom,utf-8,default,sjis,latin1 - -" Scroll before reaching top/bottom -set scrolloff=5 - -" Conceal when line is not active -set conceallevel=1 - -" Just hide buffer instead of unloading -set hidden - -" Remap leader key -let mapleader = "," - -" Jump to the last position -if has("autocmd") - au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") - \| exe "normal! g`\"" | endif -endif - -call plug#begin('~/.local/share/nvim/plugged') - -" Multi-entry selection UI -Plug 'junegunn/fzf', { 'tag': trim(system('fzf --version')) } -" FIXME: update once nixpkgs stable has fzf ≥ 0.23 -Plug 'junegunn/fzf.vim', { 'commit': '0fe8e198a3a501b54dbc4f9587526c097599f95a' } - -" Per-project settings -Plug 'editorconfig/editorconfig-vim' - -" Tagbar -Plug 'majutsushi/tagbar' -nmap :TagbarToggle - -" Snippets -if has('python3') - Plug 'SirVer/ultisnips' - let g:UltiSnipsExpandTrigger = '' - let g:UltiSnipsJumpForwardTrigger = '' - let g:UltiSnipsJumpBackwardTrigger = '' - Plug 'honza/vim-snippets' -endif - -" Deoplete -Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } -let g:deoplete#enable_at_startup = 1 - -" Airline -Plug 'vim-airline/vim-airline' -Plug 'vim-airline/vim-airline-themes' -let g:airline_powerline_fonts = 1 -let g:airline_solarized_bg='dark' -let g:airline_theme='solarized' - -" Airline for tmux -Plug 'edkolev/tmuxline.vim' - -" NERDTree -Plug 'preservim/nerdtree' -Plug 'jistr/vim-nerdtree-tabs' -map N NERDTreeTabsToggle -map n NERDTreeFocusToggle -Plug 'Xuyuanp/nerdtree-git-plugin' - -" Icons for NERDTree and airline -Plug 'ryanoasis/vim-devicons' - -" Git integration -Plug 'tpope/vim-fugitive' - -" Intra word motion -Plug 'chaoren/vim-wordmotion' - -" Trailing whitespace highlighting -Plug 'ntpeters/vim-better-whitespace' - -" Syntax highlighting/Language support -Plug 'Glench/Vim-Jinja2-Syntax', { 'for': 'jinja' } -Plug 'LnL7/vim-nix', { 'for': 'nix' } -Plug 'cespare/vim-toml', { 'for': 'toml' } -Plug 'mechatroner/rainbow_csv' -Plug 'posva/vim-vue', { 'for': 'vue' } -Plug 'sirtaj/vim-openscad', { 'for': 'openscad' } - -" Language Client -Plug 'autozimu/LanguageClient-neovim', { - \ 'branch': 'next', - \ 'do': 'bash install.sh', - \ } - -let g:LanguageClient_serverCommands = { - \ 'rust': ['nix-shell', '--quiet', '-p', 'rls', '--run', 'rls'], - \ 'go': ['nix-shell', '--quiet', '-p', 'gopls', '--run', 'gopls'], - \ 'python': ['nix-shell', '--quiet', '-p', 'python38Packages.python-language-server', '--run', 'pyls'], - \ 'typescript': ['nix-shell', '--quiet', '-p', 'nodePackages.javascript-typescript-langserver', '--run', 'javascript-typescript-stdio'], - \ 'javascript': ['nix-shell', '--quiet', '-p', 'nodePackages.javascript-typescript-langserver', '--run', 'javascript-typescript-stdio'], - \ 'haskell': ['nix-shell', '--quiet', '-p', 'haskellPackages.haskell-language-server', '--run', 'haskell-language-server --lsp'], - \ } - -let g:LanguageClient_loggingFile = '~/.local/share/nvim/LanguageClient.log' -let g:LanguageClient_settingsPath = '~/.config/nvim/LanguageClient.json' - -function LC_maps() - if has_key(g:LanguageClient_serverCommands, &filetype) - nnoremap :call LanguageClient_contextMenu() - nnoremap K :call LanguageClient#textDocument_hover() - nnoremap gd :call LanguageClient#textDocument_definition() - nnoremap :call LanguageClient#textDocument_rename() - set formatexpr=LanguageClient#textDocument_rangeFormatting_sync() - endif -endfunction - -autocmd FileType * call LC_maps() - -" Rust -Plug 'rust-lang/rust.vim' -let g:rustfmt_autosave_if_config_present = 1 -let g:rust_fold = 1 -map rt :RustTest - -" Black (python formatter) -Plug 'psf/black', { 'commit': '1d3fb871bec82d1263940ba1d32095d660fea2ab', 'for': 'python' } - -" LaTeX helpers -Plug 'lervag/vimtex' -let g:tex_flavor='latex' -let g:vimtex_view_method='zathura' -let g:tex_conceal='abdmg' -let g:vimtex_syntax_autoload_packages = [ - \'amsmath', - \'luacode', - \] -" this disables some helful warnings that often have a reason why I ignore them -let g:vimtex_quickfix_ignore_filters = [ - \'Underfull \\hbox (badness [0-9]*) in ', - \'Overfull \\hbox ([0-9]*.[0-9]*pt too wide) in ', - \'Overfull \\vbox ([0-9]*.[0-9]*pt too high) detected ', - \'Package hyperref Warning: Token not allowed in a PDF string', - \'Package typearea Warning: Bad type area settings!', - \] -" When using math environments vim does not know if if it currently is in one -" or outside of one unless it parses the file from the start. Parsing the -" file from the start each time fixes this but leads to a performance drop -" (depending on the number of lines). -" Also, somehow using FileType tex does not work, so this will enable slow -" syntax highlighting everywhere once a *.tex file is opened. -autocmd BufEnter *.tex syntax sync fromstart - -" Color schemes -Plug 'altercation/vim-colors-solarized' - -call plug#end() - -set background=dark -silent! colorscheme solarized diff --git a/vim-plug b/vim-plug deleted file mode 160000 index 3aa3b5a..0000000 --- a/vim-plug +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3aa3b5a4e85620dd58302926b571860c92fdbb2f