Coder Social home page Coder Social logo

nvimcoc's Introduction

README

install homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

install node

Use homebrew

brew install node@10

On ubuntu:

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -

~/.bash_profile

# npm global reset to user directoy
if [ -d ~/.npm-global ]; then
    export PATH=$PATH:~/.npm-global/bin
    # export NPM_CONFIG_PREFIX=~/.npm-global
else
    mkdir ~/.npm-global
    npm config set prefix '~/.npm-global'
    npm i -g npm
    source ~/.bash_profile
fi
if [ -d /usr/local/opt/node@10/bin ]; then
    PATH=$PATH:/usr/local/opt/node@10/bin
fi

Or install use nvm

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
nvm ls-remote
nvm install v10.15.0

Install neovim and dependence

neovim coc.nvim and vim-go

brew install neovim

brew install python3

pip3 list |awk 'NR>2 {print "pip3 install --upgrade --user "$1}'|bash -

pip3 install neovim

brew install node@10

git clone https://github.com/bantana/nvimcoc

nvim  +"CocInstall coc-vetur coc-snippets coc-stylelint coc-css coc-prettier coc-yaml coc-tslint coc-html coc-tsserver coc-eslint coc-emmet coc-json"

nvim +GoInstallBinaries main.go

coc.nvim

coc-snippets

ultisnips directoy:

cd ~/.config/coc && git clone https://github.com/bantana/ultisnips.git ultisnips

golang

install go-langserver

go get -u -v github.com/sourcegraph/go-langserver

vi ~/.config/nvim/coc-settings.json

"languageserver": {
  "golang": {
    "command": "go-langserver",
      "filetypes": ["go"],
      "initializationOptions": {
        "gocodeCompletionEnabled": true,
        "diagnosticsEnabled": true,
        "lintTool": "golint"
      }
  }
}

bash

yarn global add bash-language-server

vi ~/.config/nvim/coc-settings.json

  "languageserver": {
      "bash": {
        "command": "bash-language-server",
        "args": ["start"],
        "filetypes": ["sh"],
        "ignoredRootPaths": ["~"]
      }
  }

dart

install dart sdk

brew tap dart-lang/dart
brew install dart
brew upgrade dart

install dart_language_server

pub global activate dart_language_server

vi ~/.config/nvim/coc-settings.json

"languageserver": {
  "dart": {
    "command": "dart_language_server",
    "args": [],
    "filetypes": ["dart"],
    "initializationOptions": {},
    "settings": {
      "dart": {
        "validation": {},
        "completion": {}
      }
    }
  },
}

Dockerfile

install dockerfile-language-server-nodejs

yarn global add dockerfile-language-server-nodejs

~/.config/nvim/coc-settings.json

"languageserver": {
  "dockerfile": {
    "command": "docker-langserver",
    "filetypes": ["dockerfile"],
    "args": ["--stdio"]
  }
}

typescript

yarn global add javascript-typescript-langserver

c, c++, object/c

brew tap twlz0ne/homebrew-ccls
brew install ccls
    "ccls": {
      "command": "ccls",
      "filetypes": ["c", "cpp", "objc", "objcpp"],
      "rootPatterns": [
        ".ccls",
        "compile_commands.json",
        ".vim/",
        ".git/",
        ".hg/"
      ],
      "initializationOptions": {
        "cacheDirectory": "/tmp/ccls"
      }
    },

vimtex mactex skim

latex support

~/.config/nvim/init.nvim

Plug 'lervag/vimtex', {'for': ['tex', 'plaintex', 'bst']}
brew cask install mactex skim
if [[ -d /usr/local/texlive/2018/bin/x86_64-darwin ]]; then
  #statements
  export PATH=$PATH:/usr/local/texlive/2018/bin/x86_64-darwin
fi
" vimtex {{{
" require: brew cask install mactex skim
let g:tex_flavor='latex'
let g:vimtex_view_method='skim'
let g:vimtex_quickfix_mode=0
set conceallevel=1
let g:tex_conceal='abdmg'
let g:Tex_CompileRule_pdf='xelatex -interaction=nonstopmode $*'
let g:vimtex_compiler_enabled=1
let g:vimtex_view_general_options
    \ = '-reuse-instance -forward-search @tex @line @pdf'
let g:vimtex_view_general_options_latexmk = '-reuse-instance'

" TOC settings
let g:vimtex_toc_config = {
      \ 'name' : 'TOC',
      \ 'layers' : ['content', 'todo', 'include'],
      \ 'resize' : 1,
      \ 'split_width' : 50,
      \ 'todo_sorted' : 0,
      \ 'show_help' : 1,
      \ 'show_numbers' : 1,
      \ 'mode' : 2,
      \}
"
" }}}

vim command:

:vimtexCompile

floobits.com

plugin:

Plug 'floobits/floobits-neovim'

visit floobits.com to register a account.

universal-ctags

https://github.com/universal-ctags/ctags

Install:

brew install --HEAD universal-ctags/universal-ctags/universal-ctags

rust

install rust:

curl https://sh.rustup.rs -sSf | sh

# rust bin

if [[ -f "$HOME/.cargo/env" ]]; then
source "\$HOME/.cargo/env"
fi

# Bash (macOS/Homebrew)

# $ rustup completions bash > $(brew --prefix)/etc/bash_completion.d/rustup.bash-completion

[https://github.com/rust-lang/rls](see https://github.com/rust-lang/rls)

rustup update
rustup component add rls rust-analysis rust-src

nvimcoc's People

Contributors

bantana avatar

Stargazers

jamieww avatar

Watchers

 avatar

Forkers

jamieww

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.