GithubHelp home page GithubHelp logo

webdesus / deoplete-rust Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sebastianmarkow/deoplete-rust

0.0 2.0 0.0 66 KB

Rust completion for Neovim (Deoplete) via Racer

License: MIT License

Vim Script 83.83% Python 16.17%

deoplete-rust's Introduction

deoplete-rust Gitter

Neovim/Deoplete auto-completion source for Rust via Racer.

Auto-completion: Screenshot auto-completion

Documentation: Screenshot documentation

Requirements

Install Racer

with cargo

cargo install racer

from source

git clone https://github.com/phildawes/racer.git; cd racer
cargo build --release

Copy binary to ./target/release/racer to a location of your choice. (e.g. to /usr/local/bin)

Get Rust source code

mkdir -p choose/a/path
git clone --depth=1 https://github.com/rust-lang/rust.git

Install Deoplete

For details see the installation guide

Installation

with vim-plug

Plug 'sebastianmarkow/deoplete-rust'

with Vundle

Plugin 'sebastianmarkow/deoplete-rust'

with NeoBundle

NeoBundle 'sebastianmarkow/deoplete-rust'

with Pathogen

git clone --depth=1 https://github.com/sebastianmarkow/deoplete-rust.git path/to/vim/bundle/deoplete-rust

Configuration (init.vim)

Set fully qualified path to racer binary. If it is in your PATH already use which racer. (required)

let g:deoplete#sources#rust#racer_binary='/path/to/racer'

Set Rust source code path (when cloning from Github usually ending on /src). (required)

let g:deoplete#sources#rust#rust_source_path='/path/to/rust/src'

Show duplicate matches.

let g:deoplete#sources#rust#show_duplicates=1

To disable default key mappings (gd & K) add the following

let g:deoplete#sources#rust#disable_keymap=1

Set max height of documentation split.

let g:deoplete#sources#rust#documentation_max_height=20

Usage

Default key mappings

These are the default key mappings

nmap <buffer> gd <plug>DeopleteRustGoToDefinitionDefault
nmap <buffer> K  <plug>DeopleteRustShowDocumentation

Additional methods to bind

Method Action
DeopleteRustGoToDefinitionSplit Open definition in horizontal split
DeopleteRustGoToDefinitionVSplit Open definition in vertical split
DeopleteRustGoToDefinitionTab Open definition in new tab

gd Go to definition

Jump to definition of the current element under the cursor.

K Show documentation

Show brief description of the current element under the cursor. To close press either q, cr or esc.

Show help

You don't have to remember it all. Run :help deoplete-rust.

License

deoplete-rust is licensed under MIT License. For additional information, see LICENSE file.

deoplete-rust's People

Contributors

sapphire-arches avatar sebastianmarkow avatar tenfyzhong avatar

Watchers

 avatar  avatar

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.