diff --git a/.config/lf/lf.zsh b/.config/lf/lf.zsh new file mode 100644 index 0000000..be3650a --- /dev/null +++ b/.config/lf/lf.zsh @@ -0,0 +1,33 @@ +#compdef lf + +# Autocompletion for zsh shell. +# src: https://github.com/gokcehan/lf/blob/f04401ba4d43f21a084e603a52cf20f80b0c437d/etc/lf.zsh +# +# You need to rename this file to _lf and add containing folder to $fpath in +# ~/.zshrc file: +# +# fpath=(/path/to/directory/containing/the/file $fpath) +# autoload -U compinit +# compinit +# + +local arguments + +arguments=( + '-command[command to execute on client initialization]' + '-config[path to the config file (instead of the usual paths)]' + '-cpuprofile[path to the file to write the CPU profile]' + '-doc[show documentation]' + '-last-dir-path[path to the file to write the last dir on exit (to use for cd)]' + '-log[path to the log file to write messages]' + '-memprofile[path to the file to write the memory profile]' + '-remote[send remote command to server]' + '-selection-path[path to the file to write selected files on open (to use as open file dialog)]' + '-server[start server (automatic)]' + '-single[start a client without server]' + '-version[show version]' + '-help[show help]' + '*:filename:_files' +) + +_arguments -s $arguments diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index f590b93..a4cb46c 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -76,6 +76,13 @@ let g:jupytext_style = 'hydrogen' nmap ]x ctrih/^# %% luafile $HOME/.config/nvim/plugins.lua +" gokcehan/lf +let lfvim = "~/.config/lf/lf.vim" +if filereadable(lfvim) + exec "source " . lfvim +endif +nnoremap l :LF + " python stuff " let g:python3_host_prog = "$HOME/.venvs/nvim/bin/python" let g:python4_host_prog = "$HOME/.config/nvim/python" diff --git a/.zshrc b/.zshrc index 79c2b12..6789c21 100644 --- a/.zshrc +++ b/.zshrc @@ -125,6 +125,8 @@ fi # zsh auto-complete if type brew &>/dev/null; then FPATH=$(brew --prefix)/share/zsh-completions:$FPATH + # zsh completions for lf + fpath=(~/.config/lf $fpath) autoload -Uz compinit compinit diff --git a/makefile b/makefile index 283c757..38f29a8 100644 --- a/makefile +++ b/makefile @@ -64,6 +64,11 @@ setup_brew: test -r ~/.bash_profile && echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> ~/.bash_profile echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> ~/.profile +setup_lf: + brew install lf + ln -s -f ~/dotfiles/.config/lf/lf.zsh ~/.config/lf/lf.zsh + ln -s -f ~/dotfiles/.config/lf/lf.vim ~/.config/lf/lf.vim + setup_fzf: brew install fzf $(brew --prefix)/opt/fzf/install --key-bindings --completion --no-bash --no-fish --all