- ubuntu
- centos
- mac
- php
- c/c++
- go
- bash
- viml
- java
- python
- lua
./init.sh --with_php --with_c --with_vim_go --with_java \
--with_lua --with_leetcode --with_man --with_dict --with_bash
./init.sh
- leader ,
- cf clang format
- w search copy word
- Install Eclipse JDT Language Server
mkdir -p ~/lsp/eclipse.jdt.ls
cd ~/lsp/eclipse.jdt.ls
curl -L https://download.eclipse.org/jdtls/milestones/0.35.0/jdt-language-server-0.35.0-201903142358.tar.gz -O
tar xf jdt-language-server-0.35.0-201903142358.tar.gz
- Create executable jdtls in path (e.g., /usr/local/bin/jdtls), with content
#!/usr/bin/env sh
server="/root/lsp"
java \
-Declipse.application=org.eclipse.jdt.ls.core.id1 \
-Dosgi.bundles.defaultStartLevel=4 \
-Declipse.product=org.eclipse.jdt.ls.core.product \
-noverify \
-Xms1G \
-jar $server/eclipse.jdt.ls/plugins/org.eclipse.equinox.launcher_1.*.jar \
-configuration $server/eclipse.jdt.ls/config_linux/ \
"$@"
- Add to your vim config:
let g:LanguageClient_serverCommands = {
\ 'java': ['/usr/local/bin/jdtls', '-data', getcwd()],
\ }
- install intelephense
npm -g install intelephense
- add to your vim script
let g:LanguageClient_serverCommands = {
\ 'php': ['node', '/usr/local/lib/node_modules/intelephense/lib/intelephense.js', '--stdio'],
\ }
- install python language server
pip install python-language-server
- add to your vimscript
let g:LanguageClient_serverCommands = {
\ 'python': ['pyls'],
\ }
- install lua language server
apt install lua5.3-dev luarocks
luarocks install --server=http://luarocks.org/dev lua-lsp
- add to vim config
let g:LanguageClient_serverCommands = {
\ 'lua': ['lua-lsp'],
\ }
- install css js typescript language server
npm install -g typescript typescript-language-server
npm install -g vscode-css-languageserver-bin
- add to vim config
let g:LanguageClient_serverCommands = {
\ 'css': ['css-languageserver', '--stdio'],
\ 'less': ['css-languageserver', '--stdio'],
\ 'sass': ['css-languageserver', '--stdio'],
\ 'javascript': ['typescript-language-server', '--stdio'],
\ 'javascript.jsx': ['typescript-language-server', '--stdio'],
\ 'typescript': ['typescript-language-server', '--stdio'],
\ 'typescript.tsx': ['typescript-language-server', '--stdio'],
\ }
- install bash language server
sudo npm i -g bash-language-server --unsafe-perm
- add to vim config let g:LanguageClient_serverCommands = { \ 'sh': ['bash-language-server','start'], \ }