blob: d0199ebf5e8c6a288f997cd00a2fd3074fa59485 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
post_install() {
chown -R "$(logname)" /opt/pylance-language-server
BBLUE='\033[1;34m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
printf "${BBLUE}Example configuration using [coc.nvim](https://github.com/neoclide/coc.nvim):${GREEN}\n\n"
cat << EOF
"pylance": {
"enable": true,
"filetypes": ["python"],
"command": "pylance-language-server",
"args": ["--stdio"],
"initializationOptions": {},
"settings": {
"python.analysis.typeCheckingMode": "basic",
"python.analysis.diagnosticMode": "openFilesOnly",
"python.analysis.stubPath": "./typings",
"python.analysis.autoSearchPaths": true,
"python.analysis.extraPaths": [],
"python.analysis.diagnosticSeverityOverrides": {},
"python.analysis.useLibraryCodeForTypes": true,
"python.analysis.autoImportCompletions": true,
"python.analysis.completeFunctionParens": false
}
}
EOF
printf "\n${BBLUE}All available configuration options can be found in ${GREEN}https://github.com/microsoft/pylance-release#settings-and-customization${NC}\n"
}
post_upgrade() {
chown -R "$(logname)" /opt/pylance-language-server
}
post_remove() {
rm -rf /opt/pylance-language-server
}
|