Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Rust Autocomplete #155

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ let g:vim_markdown_folding_disabled = 1
let g:go_fmt_command = "goimports"
let g:go_highlight_trailing_whitespace_error = 0

" Set Rust autocomplete trigger to control-space
inoremap <C-@> <C-x><C-o>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you wanted to limit this to rust files, you could probably do something like:

autocmd FileType rust inoremap <C-@> <C-x><C-o>

(Like the java specific stuff, https://github.com/braintreeps/vim_dotfiles/blob/master/vimrc#L271).

I do get that c-x c-o isn't rust specific, and I have no hard feelings that it should be limited to rust files. Just raising it as a possibility.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooo I like this. I think it is worth incorporating

let g:racer_experimental_completer = 1

let test#strategy = "vimux"
let test#custom_runners = {}
let test#python#runner = 'pytest'
Expand Down
1 change: 1 addition & 0 deletions vimrc.bundles
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Plug 'prabirshrestha/async.vim'
Plug 'prabirshrestha/asyncomplete.vim', { 'for': 'java' }
Plug 'prabirshrestha/asyncomplete-lsp.vim', { 'for': 'java' }
Plug 'prabirshrestha/vim-lsp'
Plug 'racer-rust/vim-racer'
Plug 'rust-lang/rust.vim'
Plug 'scrooloose/nerdtree'
Plug 'tfnico/vim-gradle'
Expand Down