lspconfig : add bash lsp
This commit is contained in:
parent
81801c8c33
commit
c09c0ebc3a
12
install.sh
12
install.sh
|
@ -2,7 +2,7 @@
|
||||||
BASE=$(git rev-parse --show-toplevel)
|
BASE=$(git rev-parse --show-toplevel)
|
||||||
LSP_BIN_PATH=$HOME/.local/bin
|
LSP_BIN_PATH=$HOME/.local/bin
|
||||||
|
|
||||||
default_lsp_langs="css html ts rust python"
|
default_lsp_langs="css html ts rust python bash"
|
||||||
lsp_langs=""
|
lsp_langs=""
|
||||||
|
|
||||||
choose_langs() {
|
choose_langs() {
|
||||||
|
@ -54,9 +54,9 @@ read -p "which shell do you use?: " shellname
|
||||||
echo "$shellname"
|
echo "$shellname"
|
||||||
|
|
||||||
if [ "$(get_platform)" = "Mac" ]; then
|
if [ "$(get_platform)" = "Mac" ]; then
|
||||||
gsed -i "s/bash/$shellname/g" ~/.config/nvim/lua/mappings/lua.lua
|
gsed -i "s/bash/$shellname/g" ~/.config/nvim/lua/mappings/lua.lua
|
||||||
else
|
else
|
||||||
sed -i "s/bash/$shellname/g" ~/.config/nvim/lua/mappings/lua.lua
|
sed -i "s/bash/$shellname/g" ~/.config/nvim/lua/mappings/lua.lua
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "shell changed to $shellname on nvim successfully!"
|
echo "shell changed to $shellname on nvim successfully!"
|
||||||
|
@ -86,6 +86,8 @@ install_node_deps() {
|
||||||
sudo npm install -g $@
|
sudo npm install -g $@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# install languages
|
||||||
|
|
||||||
install_ts() {
|
install_ts() {
|
||||||
install_node_deps typescript typescript-language-server prettier
|
install_node_deps typescript typescript-language-server prettier
|
||||||
}
|
}
|
||||||
|
@ -113,6 +115,10 @@ install_python() {
|
||||||
install_node_deps pyright
|
install_node_deps pyright
|
||||||
}
|
}
|
||||||
|
|
||||||
|
install_bash() {
|
||||||
|
install_node_deps bash-language-server
|
||||||
|
}
|
||||||
|
|
||||||
for lang in ${lsp_langs}; do
|
for lang in ${lsp_langs}; do
|
||||||
if fn_exists install_$lang; then
|
if fn_exists install_$lang; then
|
||||||
heading "Installing $lang language server"
|
heading "Installing $lang language server"
|
||||||
|
|
|
@ -48,12 +48,10 @@ require "bufferline".setup {
|
||||||
guifg = "#282c34",
|
guifg = "#282c34",
|
||||||
guibg = "#282c34"
|
guibg = "#282c34"
|
||||||
},
|
},
|
||||||
|
|
||||||
separator = {
|
separator = {
|
||||||
guifg = "#1e222a",
|
guifg = "#1e222a",
|
||||||
guibg = "#1e222a"
|
guibg = "#1e222a"
|
||||||
},
|
},
|
||||||
|
|
||||||
indicator_selected = {
|
indicator_selected = {
|
||||||
guifg = "#1e222a",
|
guifg = "#1e222a",
|
||||||
guibg = "#1e222a"
|
guibg = "#1e222a"
|
||||||
|
|
|
@ -39,7 +39,7 @@ function on_attach(client)
|
||||||
end
|
end
|
||||||
|
|
||||||
local lspconf = require "lspconfig"
|
local lspconf = require "lspconfig"
|
||||||
local servers = {"html", "cssls", "tsserver", "pyright"}
|
local servers = {"html", "cssls", "tsserver", "pyright" , "bashls"}
|
||||||
|
|
||||||
for k, lang in pairs(servers) do
|
for k, lang in pairs(servers) do
|
||||||
lspconf[lang].setup {
|
lspconf[lang].setup {
|
||||||
|
|
Loading…
Reference in New Issue