From 6dcec7b3ca102eb82810e0984b2b9a720ce186cb Mon Sep 17 00:00:00 2001 From: FollieHiyuki Date: Thu, 8 Apr 2021 10:20:23 +0300 Subject: [PATCH] Emacs/Neovim: add tldr --- home/.config/doom/config.el | 6 ++++++ home/.config/doom/packages.el | 1 + home/.config/mpv/mpv.conf | 7 ++++--- home/.config/nvim/init.vim | 1 + home/.config/nvim/plug-config/cheat_sh.vim | 2 +- home/.config/nvim/plug-config/tldr.vim | 3 +++ home/.config/nvim/vim-plug/vim-plug.vim | 1 + 7 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 home/.config/nvim/plug-config/tldr.vim diff --git a/home/.config/doom/config.el b/home/.config/doom/config.el index 0b4029b..231f1c1 100644 --- a/home/.config/doom/config.el +++ b/home/.config/doom/config.el @@ -285,6 +285,12 @@ :sasl-password (my-fetch-password :user "FollieHiyuki" :host "irc.freenode.net") :channels ("#voidlinux" "#river" "#archlinux" "#nixos"))) +;; Cheatsheet +(use-package! tldr + :commands tldr tldr-mode + :config + (setq tldr-directory-path "~/.local/share/tldr")) + ;; Here are some additional functions/macros that could help you configure Doom: ;; ;; - `load!' for loading external *.el files relative to this one diff --git a/home/.config/doom/packages.el b/home/.config/doom/packages.el index de0b680..a217dcd 100644 --- a/home/.config/doom/packages.el +++ b/home/.config/doom/packages.el @@ -68,6 +68,7 @@ (package! ivy-emms) (package! elfeed-goodies) (package! symon) +(package! tldr) ;;(package! mentor) ;;(package! mozc-cand-posframe) ;;(package! 2048-game) diff --git a/home/.config/mpv/mpv.conf b/home/.config/mpv/mpv.conf index 85d1cf6..7d4c954 100644 --- a/home/.config/mpv/mpv.conf +++ b/home/.config/mpv/mpv.conf @@ -2,10 +2,11 @@ sub-auto=fuzzy sub-bold=yes scale=ewa_lanczossharp cscale=ewa_lanczossharp -video-sync=display-resample -interpolation -tscale=oversample +# video-sync=display-resample +# interpolation +# tscale=oversample profile=gpu-hq # gpu-context=wayland vo=gpu hwdec=vaapi +user-agent="Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0" diff --git a/home/.config/nvim/init.vim b/home/.config/nvim/init.vim index c2e0007..43242af 100644 --- a/home/.config/nvim/init.vim +++ b/home/.config/nvim/init.vim @@ -36,6 +36,7 @@ source $HOME/.config/nvim/plug-config/rooter.vim source $HOME/.config/nvim/plug-config/spaceline.vim " source $HOME/.config/nvim/plug-config/startify.vim source $HOME/.config/nvim/plug-config/tablemode.vim +source $HOME/.config/nvim/plug-config/tldr.vim source $HOME/.config/nvim/plug-config/translate-shell.vim source $HOME/.config/nvim/plug-config/undo.vim source $HOME/.config/nvim/plug-config/vim-buffet.vim diff --git a/home/.config/nvim/plug-config/cheat_sh.vim b/home/.config/nvim/plug-config/cheat_sh.vim index 20fc212..da2fd34 100644 --- a/home/.config/nvim/plug-config/cheat_sh.vim +++ b/home/.config/nvim/plug-config/cheat_sh.vim @@ -1,5 +1,5 @@ " Vim command used to open new buffer -let g:CheatSheetReaderCmd='new"' +let g:CheatSheetReaderCmd='new' " Cheat sheet file type let g:CheatSheetFt='markdown' diff --git a/home/.config/nvim/plug-config/tldr.vim b/home/.config/nvim/plug-config/tldr.vim new file mode 100644 index 0000000..2a3f5df --- /dev/null +++ b/home/.config/nvim/plug-config/tldr.vim @@ -0,0 +1,3 @@ +let g:tldr_directory_path = '~/.local/share/tldr' +let g:tldr_split_type = 'horizontal' +let g:tldr_language = 'en' diff --git a/home/.config/nvim/vim-plug/vim-plug.vim b/home/.config/nvim/vim-plug/vim-plug.vim index 58c66a4..c7ea6da 100644 --- a/home/.config/nvim/vim-plug/vim-plug.vim +++ b/home/.config/nvim/vim-plug/vim-plug.vim @@ -130,6 +130,7 @@ Plug 'mbbill/undotree' Plug 'Asheq/close-buffers.vim' " Cheatsheet Plug 'dbeniamine/cheat.sh-vim' +Plug 'wlemuel/vim-tldr' "================================================= " Live-server for html Plug 'turbio/bracey.vim', { 'do': 'npm install --prefix server' }