diff --git a/.SpaceVim.d/init.toml b/.SpaceVim.d/init.toml index 700f8e6..dd54a3f 100644 --- a/.SpaceVim.d/init.toml +++ b/.SpaceVim.d/init.toml @@ -22,6 +22,7 @@ statusline_inactive_separator = "arrow" buffer_index_type = 4 autocomplete_method = 'deoplete' +# autocomplete_method = 'lsp' enable_tabline_filetype_icon = true enable_statusline_display_mode = false vim_help_language = "cn" @@ -44,7 +45,10 @@ default_position = 'bottom' default_height = 30 [[layers]] -name = "lang#go" +name = "lang#golsp" + +#[[layers]] +#name = "lang#go" [[layers]] name = "lang#python" diff --git a/.zshrc b/.zshrc index a928610..266f5af 100644 --- a/.zshrc +++ b/.zshrc @@ -103,3 +103,6 @@ bindkey "^f" forward-word [ -f ~/.zprofile ] && source ~/.zprofile [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh + +# add nvim +PATH=$PATH:/usr/local/nvim/bin diff --git a/init.py b/init.py old mode 100644 new mode 100755 index 7104636..4fc49b3 --- a/init.py +++ b/init.py @@ -1,6 +1,32 @@ +#!/usr/bin/env python3 import os +import argparse + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument("-i","--install", help="install tools",type=str) + args = parser.parse_args() + install_val = args.install + if install_val == "": + print("install value is empty") + exit() + if install_val in install_map: + install_map.get(args.install)() + else: + print("cmd not support, install: "+args.install) + # install neovim -os.chdir("/usr/local") -os.system("wget https://github.com/neovim/neovim/releases/download/v0.6.0/nvim-macos.tar.gz") -os.system("tar zxf nvim-macos.tar.gz") +def install_neovim(): + os.chdir("/usr/local") + os.system("wget https://github.com/neovim/neovim/releases/download/v0.6.0/nvim-macos.tar.gz") + os.system("tar zxf nvim-macos.tar.gz") + os.system("ln -s /usr/local/nvim-osx64 /usr/local/nvim") + +install_map = { + "neovim": install_neovim, +} + + +if __name__ == '__main__': + main() diff --git a/init.sh b/init.sh index 084c12f..7fb8944 100644 --- a/init.sh +++ b/init.sh @@ -8,3 +8,7 @@ ln -sf ~/.dotfile/laily.zsh-theme ~/.oh-my-zsh/themes/ ln -sf ~/.dotfile/.tmux.conf ~/ ln -sf ~/.dotfile/.gitconfig ~/.gitconfig +# install neovim +cd /usr/local +wget https://github.com/neovim/neovim/releases/download/v0.6.0/nvim-macos.tar.gz +tar zxvf nvim-macos.tar.gz