-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: SUDO variable in install scripts, vim-go for gomod ft
- Loading branch information
1 parent
68786ee
commit 62945bd
Showing
9 changed files
with
73 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
#!/bin/bash | ||
|
||
. install/git.sh | ||
|
||
commit=$1 | ||
|
||
apt-get -y install libssl-dev | ||
$SUDO apt-get -y install libssl-dev | ||
|
||
function _uninstall() { | ||
make uninstall | ||
$SUDO make uninstall | ||
} | ||
|
||
function _install() { | ||
./bootstrap && make && make install | ||
./bootstrap && make && $SUDO make install | ||
} | ||
|
||
. install/git.sh | ||
main https://gitlab.kitware.com/cmake/cmake.git cmake $commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
#!/bin/bash | ||
|
||
. install/git.sh | ||
|
||
PYTHON=/usr/bin/python3 | ||
|
||
commit=$1 | ||
apt-get -y install ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config unzip | ||
$SUDO apt-get -y install ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config unzip | ||
$PYTHON -m pip install -U neovim | ||
|
||
function _uninstall() { | ||
cmake --build build/ --target uninstall | ||
$SUDO cmake --build build/ --target uninstall | ||
} | ||
|
||
function _install() { | ||
make CMAKE_BUILD_TYPE=RelWithDebInfo | ||
make install | ||
$SUDO make install | ||
} | ||
|
||
. install/git.sh | ||
main https://github.com/neovim/neovim.git neovim $commit | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
#!/bin/bash | ||
|
||
. install/git.sh | ||
|
||
commit=$1 | ||
|
||
if [ -x "$(command -v apt)" ]; then | ||
apt-get install -y automake pkg-config libpcre3-dev zlib1g-dev liblzma-dev | ||
$SUDO apt-get install -y automake pkg-config libpcre3-dev zlib1g-dev liblzma-dev | ||
elif [ -x "$(command -v yum)" ]; then | ||
yum -y install pkgconfig automake gcc zlib-devel pcre-devel xz-devel | ||
$SUDO yum -y install pkgconfig automake gcc zlib-devel pcre-devel xz-devel | ||
fi | ||
|
||
function _uninstall() { | ||
make uninstall | ||
$SUDO make uninstall | ||
} | ||
|
||
function _install() { | ||
./build.sh | ||
make install | ||
$SUDO make install | ||
} | ||
|
||
. install/git.sh | ||
main https://github.com/satanson/the_silver_searcher the_silver_searcher $commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
#!/bin/bash | ||
|
||
. install/git.sh | ||
|
||
commit=$1 | ||
|
||
apt-get install libevent-dev ncurses-dev build-essential bison pkg-config automake | ||
$SUDO apt-get install libevent-dev ncurses-dev build-essential bison pkg-config automake | ||
|
||
function _uninstall() { | ||
make uninstall | ||
$SUDO make uninstall | ||
} | ||
|
||
function _install() { | ||
sh autogen.sh | ||
./configure && make | ||
make install | ||
$SUDO make install | ||
} | ||
|
||
. install/git.sh | ||
main https://github.com/tmux/tmux.git tmux $commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
#!/bin/bash | ||
|
||
. install/git.sh | ||
|
||
commit=$1 | ||
|
||
MAKE_FLAG=${MAKE_FLAG:-"-j$((`nproc`-2))"} | ||
|
||
apt-get -y install libgtk-3-dev libxt-dev libncurses-dev | ||
$SUDO apt-get -y install libgtk-3-dev libxt-dev libncurses-dev | ||
|
||
function _uninstall() { | ||
make uninstall | ||
$SUDO make uninstall | ||
} | ||
|
||
function _install() { | ||
./configure --with-features=huge --enable-fontset=yes --enable-cscope=yes --enable-multibyte --enable-python3interp=yes --with-python3-config-dir --enable-gui --with-x | ||
make ${MAKE_FLAG} | ||
make install | ||
$SUDO make install | ||
} | ||
|
||
. install/git.sh | ||
main https://github.com/vim/vim.git vim $commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
vim:ft=help | ||
|
||
*golang.txt* | ||
|
||
1. `godef`:godef 是 Go 语言的一个老工具,可以快速找到定义的位置。它的优点是简单快捷,但缺点是功能相对单一,不支持如代码提示、重构和诊断等功能。 | ||
2. `guru`:guru 提供了更多高级功能,如查找所有引用、查找接口实现等。然而,它的使用相对更复杂,也需要更多的计算资源。 | ||
3. `gopls`:gopls 是 Go 团队发布的官方语言服务器,功能最为全面,包括代码自动完成、查找定义、重构、诊断等。由于是官方工具,与最新的 Go 语言特性和改动的兼容性也最好。然而,它可能会比较消耗计算资源。 | ||
|
||
现在来看,`gopls`可能是最全面且最实用的选择。作为官方的 Go 语言服务器,它可以提供全面的 IDE 功能,并且可以完全兼容最新的 Go 语言特性。然而,如果你只需要一些简单的功能,比如快速查找定义,那么`godef`可能就足够了。而`guru`则介于两者之间,提供了一些更高级的功能,但也更复杂一些。 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters