alexherbo2 / kakoune.cr

A command-line tool for Kakoune
https://kakoune.org
The Unlicense
54 stars 11 forks source link

want to include an autoinstaller in the config-kak? #7

Closed skewballfox closed 3 years ago

skewballfox commented 3 years ago

I was going through and updating my kak-config and noticed this as a new dependency. since I mianly needed this for auto-pairs.kak, I wrote an installer to automate the installation if kcr isn't a command (heavily based on the autoinstaller for plug.kak), this doesn't handle the dependencies but I thought you might be interested in including this in the readme for either this project or auto-pairs.kak

plug "alexherbo2/auto-pairs.kak" evaluate-commands %sh{
    current_directory=$PWD
    if [ ! -x "$(command -v kcr)" ]; then
        current_directory=$PWD
        mkdir $HOME/.config/kak/build && cd $HOME/.config/build
        git clone -q https://github.com/alexherbo2/kakoune.cr
        cd kakoune.cr && make install
        cd $current_directory
    fi

    kcr init kakoune
} 
alexherbo2 commented 3 years ago

I recommend rather the following structure.

~/.config/kak/kakrc

evaluate-commands %sh{
  kcr init kakoune
}

plug ... %{
  ...
}

As a side note, I’m not interested in including notes for a plugin manager.