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

Deoplete: No suggestions for member fields/methods in Rust with ALE integration after typing a dot #2593

Closed
vimpunk opened this issue Jun 15, 2019 · 8 comments
Labels

Comments

@vimpunk
Copy link
Contributor

vimpunk commented Jun 15, 2019

(originally opened in deoplete repo and was redirected here)

Problems summary

No suggestions are offered for member fields/methods in Rust with ALE integration after typing a dot. Not sure if I misconfigured something or if it's a big.

Expected

When typing e.g. some_variable. I'd expect a list of suggestions for the public methods and/or fields the object has.

Environment Information

  • deoplete version: latest

  • OS: Ubuntu 19.04

  • neovim/Vim :version output:

VIM - Vi IMproved 8.1 (2018 May 18, compiled Jun 07 2019 11:42:36)
Included patches: 1-320
Modified by team+vim@tracker.debian.org
Compiled by team+vim@tracker.debian.org
Huge version with GTK3 GUI.  Features included (+) or not (-):
+acl               +clipboard         +dnd               +gettext           +localmap          +mouse_urxvt       +profile           +syntax            +user_commands     -xfontset
+arabic            +cmdline_compl     -ebcdic            -hangul_input      +lua               +mouse_xterm       -python            +tag_binary        +vartabs           +xim
+autocmd           +cmdline_hist      +emacs_tags        +iconv             +menu              +multi_byte        +python3           +tag_old_static    +vertsplit         +xpm
+autochdir         +cmdline_info      +eval              +insert_expand     +mksession         +multi_lang        +quickfix          -tag_any_white     +virtualedit       +xsmp_interact
-autoservername    +comments          +ex_extra          +job               +modify_fname      -mzscheme          +reltime           +tcl               +visual            +xterm_clipboard
+balloon_eval      +conceal           +extra_search      +jumplist          +mouse             +netbeans_intg     +rightleft         +termguicolors     +visualextra       -xterm_save
+balloon_eval_term +cryptv            +farsi             +keymap            +mouseshape        +num64             -ruby              +terminal          +viminfo
+browse            +cscope            +file_in_path      +lambda            +mouse_dec         +packages          +scrollbind        +terminfo          +vreplace
++builtin_terms    +cursorbind        +find_in_path      +langmap           +mouse_gpm         +path_extra        +signs             +termresponse      +wildignore
+byte_offset       +cursorshape       +float             +libcall           -mouse_jsbterm     +perl              +smartindent       +textobjects       +wildmenu
+channel           +dialog_con_gui    +folding           +linebreak         +mouse_netterm     +persistent_undo   +startuptime       +timers            +windows
+cindent           +diff              -footer            +lispindent        +mouse_sgr         +postscript        +statusline        +title             +writebackup
+clientserver      +digraphs          +fork()            +listcmds          -mouse_sysmouse    +printer           -sun_workshop      +toolbar           +X11

Provide a minimal init.vim/vimrc with less than 50 lines (Required!)

Unfortunately the below didn't seem to work, as in my own vimrc basic completion works except for the member completion, but with the below not even that worked. Including anyway for completeness:

set nocompatible
set hidden

call plug#begin('~/.vim/bundle')

Plug 'w0rp/ale'
if has('nvim')
  Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
else
  Plug 'Shougo/deoplete.nvim'
  Plug 'roxma/nvim-yarp'
  Plug 'roxma/vim-hug-neovim-rpc'
endif

call plug#end()

let g:ale_completion_enabled = 0 " turn off native completion in favor of deoplete
let g:ale_rust_rls_toolchain = 'stable'
let g:ale_linters = {
    \ 'rust': ['rls'],
    \ }
let g:ale_fixers = {
    \ '*': ['remove_trailing_lines', 'trim_whitespace'],
    \ 'rust': ['rustfmt'],
    \ }
let g:ale_fix_on_save = 1

let g:deoplete#enable_at_startup = 1
" use ALE for completion sources for all code
call deoplete#custom#option('sources', {
\ '_': ['ale'],
\})

Reproduction

  1. install rust and rls
  2. create a rust crate with cargo new --bin deopleterepro
  3. cd deopleterepro
  4. write this in src/main.rs:
struct Example {
    a: i32,
    b: i32,
}

fn main() {
    println!("Hello, world!");

    let e = Example { a: 1, b: 2 };
}
  1. vim src/* -u <vimrc path>
  2. after let e = ... type: e. and wait for completion. None are given.

:ALEInfo


 Current Filetype: rust
Available Linters: ['cargo', 'rls', 'rustc']
  Enabled Linters: ['rls']
 Suggested Fixers: 
  'remove_trailing_lines' - Remove all blank lines at the end of a file.
  'rustfmt' - Fix Rust files with Rustfmt.
  'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.
 Linter Variables:

let g:ale_rust_rls_config = {}
let g:ale_rust_rls_executable = 'rls'
let g:ale_rust_rls_toolchain = 'stable'
 Global Variables:

let g:ale_cache_executable_check_failures = v:null
let g:ale_change_sign_column_color = 0
let g:ale_command_wrapper = ''
let g:ale_completion_delay = 100
let g:ale_completion_enabled = 0
let g:ale_completion_max_suggestions = 50
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%code: %%s'
let g:ale_echo_msg_info_str = 'Info'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_fix_on_save = 1
let g:ale_fixers = {'*': ['remove_trailing_lines', 'trim_whitespace'], 'rust': ['rustfmt']}
let g:ale_history_enabled = 1
let g:ale_history_log_output = 1
let g:ale_keep_list_window_open = 0
let g:ale_lint_delay = 200
let g:ale_lint_on_enter = 1
let g:ale_lint_on_filetype_changed = 1
let g:ale_lint_on_insert_leave = 1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'normal'
let g:ale_linter_aliases = {}
let g:ale_linters = {'rust': ['rls']}
let g:ale_linters_explicit = 0
let g:ale_list_vertical = 0
let g:ale_list_window_size = 10
let g:ale_loclist_msg_format = '%code: %%s'
let g:ale_lsp_root = {}
let g:ale_max_buffer_history_size = 20
let g:ale_max_signs = -1
let g:ale_maximum_file_size = v:null
let g:ale_open_list = 0
let g:ale_pattern_options = v:null
let g:ale_pattern_options_enabled = v:null
let g:ale_set_balloons = 0
let g:ale_set_highlights = 1
let g:ale_set_loclist = 1
let g:ale_set_quickfix = 0
let g:ale_set_signs = 1
let g:ale_sign_column_always = 0
let g:ale_sign_error = '>>'
let g:ale_sign_info = '--'
let g:ale_sign_offset = 1000000
let g:ale_sign_style_error = '>>'
let g:ale_sign_style_warning = '--'
let g:ale_sign_warning = '--'
let g:ale_statusline_format = v:null
let g:ale_type_map = {}
let g:ale_use_global_executables = v:null
let g:ale_virtualtext_cursor = 0
let g:ale_warn_about_trailing_blank_lines = 1
let g:ale_warn_about_trailing_whitespace = 1
  Command History:

(executable check - success) rls
(started) ['/usr/bin/zsh', '-c', '''rls'' +''stable''']
@vimpunk vimpunk changed the title Deoplete: Code Issues 3 Pull requests 2 Projects 0 Wiki Security Insights No suggestions for member fields/methods in Rust with ALE integration after typing a dot Deoplete: No suggestions for member fields/methods in Rust with ALE integration after typing a dot Jun 15, 2019
@w0rp w0rp added the triage label Jun 16, 2019
@w0rp
Copy link
Member

w0rp commented Jun 16, 2019

Do you receive completion data from any Deoplete completion source?

@vimpunk
Copy link
Contributor Author

vimpunk commented Jun 17, 2019

@w0rp To be fair I'm not sure how to verify that. When I start typing variable names, I do get completions, and after typing a member field's or method's name after the dot, I also get completions. So I suspect the answer would be yes, but let me know if there is something I can run that gives you more data.

@w0rp
Copy link
Member

w0rp commented Jun 19, 2019

I'll eventually try this myself and see if I can repeat the issue mentioned here. One thing you could try is updating ALE and making sure there aren't any other versions installed in runtimepath.

@w0rp
Copy link
Member

w0rp commented Jun 19, 2019

I have a hunch that the code in #2601 might fix your issue.

@vimpunk
Copy link
Contributor Author

vimpunk commented Jun 22, 2019

@w0rp That would be great, thanks for keeping me posted.

@w0rp
Copy link
Member

w0rp commented Jul 14, 2019

@mandreyel I finally had the time to review and merge the pull request. Let me know if it fixes your issue.

@nospam2998
Copy link
Contributor

This seems to be a rls specific issue. That language server has been deprecated and sunset. With it rls no longer available nor working, can we suggest this ticket to be closed?

@w0rp
Copy link
Member

w0rp commented Mar 15, 2023

Deoplete itself has been abandoned, as has rls, so I'll just close this.

@w0rp w0rp closed this as completed Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants