lspconfig : add bash lsp

This commit is contained in:
siduck76 2021-04-26 13:56:27 +05:30
parent 81801c8c33
commit c09c0ebc3a
3 changed files with 10 additions and 6 deletions

View File

@ -2,7 +2,7 @@
BASE=$(git rev-parse --show-toplevel)
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=""
choose_langs() {
@ -54,9 +54,9 @@ read -p "which shell do you use?: " shellname
echo "$shellname"
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
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
echo "shell changed to $shellname on nvim successfully!"
@ -86,6 +86,8 @@ install_node_deps() {
sudo npm install -g $@
}
# install languages
install_ts() {
install_node_deps typescript typescript-language-server prettier
}
@ -113,6 +115,10 @@ install_python() {
install_node_deps pyright
}
install_bash() {
install_node_deps bash-language-server
}
for lang in ${lsp_langs}; do
if fn_exists install_$lang; then
heading "Installing $lang language server"

View File

@ -48,12 +48,10 @@ require "bufferline".setup {
guifg = "#282c34",
guibg = "#282c34"
},
separator = {
guifg = "#1e222a",
guibg = "#1e222a"
},
indicator_selected = {
guifg = "#1e222a",
guibg = "#1e222a"

View File

@ -39,7 +39,7 @@ function on_attach(client)
end
local lspconf = require "lspconfig"
local servers = {"html", "cssls", "tsserver", "pyright"}
local servers = {"html", "cssls", "tsserver", "pyright" , "bashls"}
for k, lang in pairs(servers) do
lspconf[lang].setup {