Giter VIP home page Giter VIP logo

vimfiles's Introduction

This repository is intended to be checked out as ~/.vim on linux-like systems or %HOME%\vimfiles for Windows. Clone recursively, or open a command prompt within the cloned directory to run git submodule update --init --recursive, to pull in the plugin directories.

The configured plugins are

  • vim-maktaba, which provides a "standard library" of methods used by other plugins.
  • vim-codefmt, which provides on-save hooks for auto-formatting code. Currently only gofmt (for golang) and buildifier are enabled because I spend too much time editing legacy code where clang-format, autopep8, or js-beautify would cause a distracting number of off-target changes. Re-enabling them is a matter of uncommenting the appropriate line in vimrc.
  • vim-go provides more extensive integration with various golang refactoring tools (such as goimports and gopls).
  • YouCompleteMe provides more extensive code completion options. In order to use it, it must be built. Instructions for how I built it follow below.

Martian syntax

The martian ftdetect is pretty strightforward. The syntax highlighting file is a private development fork of the one provided in the martian repository.

Building ycmd

If using this on Windows, I'd advise just skipping YCM by deleting the submodule. If you want the things it provides on Windows you're probably better off just using VsCode.

For reasons I'd rather not get into here, I build ycmd against a crosstool-built sysroot with clang. I also used a version of python from miniconda rather than the system-provided distribution.

# Supply your own locations for these
$ export MINICONDA=$HOME/miniconda
$ export LLVM=$TOOLCHAINS/versions/latest/tools/clang
$ cd ~/
$ mkdir ycm_build
$ cd ycm_build
# Build ycm_core
$ cmake -GNinja \
        -DPYTHON_LIBRARY=$MINICONDA/lib/libpython2.7.so \
        -DPYTHON_INCLUDE_DIR=$MINICONDA/include/python2.7 \
        -DEXTERNAL_LIBCLANG_PATH=$LLVM/lib/libclang.so \
        -DUSE_CLANG_TIDY=ON \
        ~/.vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/cpp
$ cmake --build . --target ycm_core --config Release
$ cd ..
# Build plugins
$ mkdir regex_build
$ cd regex_build
$ cmake -GNinja \
        -DPYTHON_LIBRARY=$MINICONDA/lib/libpython2.7.so \
        -DPYTHON_INCLUDE_DIR=$MINICONDA/include/python2.7 \
        ~/.vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/cregex
$ cmake --build . --target _regex --config Release
# Next, configure the golang plugins.
$ cd ~/.vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/go/src/github.com/mdempsky/gocode
$ GOPATH=$HOME/.vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/go go build
$ cd ../../rogpeppe/godef
$ GOPATH=$HOME/.vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/go go build
# javascript
$ cd ../../../../../tern_runtime
$ npm install --production
# rust
$ cd ../racerd/
$ cargo build --release

At some point I'll need to update the submodule'd versions of these tools, and with them these instructions.

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.