You've already forked dotfiles
feat: Adding nvim-lspconfig and Mason back in for now to get the config
working well for production work.
This commit is contained in:
16
lsp_check.sh
16
lsp_check.sh
@@ -5,24 +5,26 @@ RED='\033[0;31m'
|
|||||||
CLEAR='\033[0m'
|
CLEAR='\033[0m'
|
||||||
|
|
||||||
declare -A lsp_arr=(
|
declare -A lsp_arr=(
|
||||||
["pylsp"]="Install the pylsp provider: python-language-server or pylsp"
|
["pylsp"]="pylsp provider: python-language-server or pylsp"
|
||||||
["pylint"]="Install the pylint provider: pylint"
|
["pylint"]="pylint provider: pylint"
|
||||||
["rust-analyzer"]="Install the rust-analyzer provider"
|
["rust-analyzer"]="rust-analyzer provider"
|
||||||
["yaml-language-server"]="Install the yamlls provider: yaml-language-server (via npm globally or system package)"
|
["yaml-language-server"]="yamlls provider: yaml-language-server (via npm globally or system package)"
|
||||||
|
["ansible-language-server"]="ansiblels provider: "
|
||||||
|
["jinja-lsp"]="jinja-lsp provider: cargo install jinja-lsp"
|
||||||
)
|
)
|
||||||
|
|
||||||
echo '----- Checking for LSP servers...'
|
echo '----- Checking for LSP servers...'
|
||||||
|
|
||||||
for lsp in "${!lsp_arr[@]}"; do
|
for lsp in "${!lsp_arr[@]}"; do
|
||||||
echo
|
echo
|
||||||
echo "Checking for $lsp..."
|
|
||||||
|
|
||||||
which $lsp >/dev/null 2>&1
|
which $lsp >/dev/null 2>&1
|
||||||
|
|
||||||
if [[ $? -eq 1 ]]; then
|
if [[ $? -eq 1 ]]; then
|
||||||
echo -e "${RED} ${lsp_arr[$lsp]} ${CLEAR}"
|
echo "Checking for $lsp..."
|
||||||
|
echo -e "${RED} Install the ${lsp_arr[$lsp]} ${CLEAR}"
|
||||||
else
|
else
|
||||||
echo -e "${GREEN} Found $lsp ${CLEAR}"
|
echo -e "Checking for $lsp...${GREEN} Found${CLEAR}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo
|
echo
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
cmd = vim.lsp.rpc.connect('127.0.0.1', 6005),
|
cmd = vim.lsp.rpc.connect('127.0.0.1', 6005),
|
||||||
filetypes = {
|
filetypes = { 'gdscript' },
|
||||||
'gd', 'gdscript', 'gdscript3'
|
|
||||||
},
|
|
||||||
root_markers = { 'project.godot', '.git' },
|
root_markers = { 'project.godot', '.git' },
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,3 @@
|
|||||||
-- Jinja LSP setup tuned to include Tera templates
|
|
||||||
-- TODO: Not currently working correctly for Tera templates
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name = 'jinja_lsp',
|
filetypes = { 'tera', 'jinja2' },
|
||||||
cmd = { 'jinja-lsp' },
|
|
||||||
filetypes = { 'jinja', 'tera' },
|
|
||||||
root_markers = { '.git' },
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,9 +49,35 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
|||||||
})
|
})
|
||||||
|
|
||||||
vim.pack.add({
|
vim.pack.add({
|
||||||
'https://github.com/neovim/nvim-lspconfig'
|
'https://github.com/neovim/nvim-lspconfig',
|
||||||
|
'https://github.com/mason-org/mason-lspconfig.nvim',
|
||||||
|
'https://github.com/mason-org/mason.nvim',
|
||||||
})
|
})
|
||||||
|
|
||||||
|
require('mason').setup()
|
||||||
|
require('mason-lspconfig').setup {
|
||||||
|
automatic_enable = true,
|
||||||
|
ensure_installed = {
|
||||||
|
-- 'ansible-lint',
|
||||||
|
'ansiblels',
|
||||||
|
'arduino_language_server',
|
||||||
|
'bashls',
|
||||||
|
-- 'cfn-lint',
|
||||||
|
'clangd',
|
||||||
|
'html',
|
||||||
|
-- 'htmlhint',
|
||||||
|
'intelephense',
|
||||||
|
'jinja_lsp',
|
||||||
|
'lua_ls',
|
||||||
|
'marksman',
|
||||||
|
'pylsp',
|
||||||
|
'r_language_server',
|
||||||
|
'rust_analyzer',
|
||||||
|
-- 'shellcheck',
|
||||||
|
'yamlls',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
|
||||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||||
@@ -66,7 +92,7 @@ local enabled_lsps = {
|
|||||||
'arduino_language_server',
|
'arduino_language_server',
|
||||||
'clangd',
|
'clangd',
|
||||||
'bashls',
|
'bashls',
|
||||||
'gdscript',
|
'gdscript', -- Local only config
|
||||||
'html',
|
'html',
|
||||||
'intelephense',
|
'intelephense',
|
||||||
'jinja_lsp',
|
'jinja_lsp',
|
||||||
|
|||||||
Reference in New Issue
Block a user