Skip to content

coder2004/cli-dev

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cli develop env

os

  • ubuntu
  • centos
  • mac

language

  • php
  • c/c++
  • go
  • bash
  • viml
  • java
  • python
  • lua

setup

ubuntu

./init.sh --with_php --with_c  --with_vim_go --with_java \
--with_lua  --with_leetcode --with_man --with_dict --with_bash

mac and centos

./init.sh

usage

  • leader ,
  • cf clang format
  • w search copy word

language server

java

  • 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()],
    \ }

php

  • 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'],
    \ }

python

  • install python language server
pip install python-language-server
  • add to your vimscript
let g:LanguageClient_serverCommands = {
\ 'python': ['pyls'],
    \ }

lua

  • 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'],
    \ }

fe

  • 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'],
\ }

bash

  • 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'], \ }

About

dev under cli using linux tools

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 60.3%
  • Vim Script 32.3%
  • JavaScript 7.4%