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
Procedure argument completion #112
Comments
So it looks like the Neovim LS plugin doesn't support snippets with placeholders well. The solution from that issue seemed to be disabling snippets in autocomplete. I will work on adding support for this. |
Thank you for the fast work on it! (And for this great program in general. ;-) ) I think it makes more sense if the snippet is: if self.autocomplete_no_snippets:
snippet = '' instead of If one does this change, then call plug#begin('~/.local/share/nvim/plugged')
Plug 'autozimu/LanguageClient-neovim', {
\ 'branch': 'next',
\ 'do': 'bash install.sh',
\ }
let g:LanguageClient_autoStart = 1
let g:LanguageClient_autoStop = 0
let g:LanguageClient_hasSnippetSupport = 0
let g:LanguageClient_serverCommands = {
\ 'python': ['pyls'],
\ 'fortran': ['fortls', '--symbol_skip_mem', '--incremental_sync',
\ '--lowercase_intrinsics', '--autocomplete_no_snippets']
\ }
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
let g:deoplete#enable_at_startup = 1
Plug 'Shougo/neosnippet.vim'
" Plugin key-mappings.
" Note: It must be "imap" and "smap". It uses <Plug> mappings.
imap <C-k> <Plug>(neosnippet_expand_or_jump)
smap <C-k> <Plug>(neosnippet_expand_or_jump)
xmap <C-k> <Plug>(neosnippet_expand_target)
" SuperTab like snippets behavior.
" Note: It must be "imap" and "smap". It uses <Plug> mappings.
imap <expr><TAB>
\ pumvisible() ? "\<C-n>" :
\ neosnippet#expandable_or_jumpable() ?
\ "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"
smap <expr><TAB> neosnippet#expandable_or_jumpable() ?
\ "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"
" For conceal markers.
if has('conceal')
set conceallevel=2 concealcursor=niv
endif
Plug 'Shougo/neosnippet-snippets'
Plug 'Shougo/echodoc.vim'
set cmdheight=2
let g:echodoc#enable_at_startup = 1
let g:echodoc#type = 'signature'
set signcolumn=yes
call plug#end()
leads to a nice behaviour for Fortran subroutines. (And only for them) While using these settings I found a bug (I can open a new Issue for this): subroutine incr(arg)
integer, intent(inout) :: arg(:)
arg = arg + 1
end subroutine
integer function f(x)
integer, intent(in) :: x
f = 2 * x
end function
! Correctly displays the signature at the bottom of the screen.
call incr(
! Does not display the signature.
f( I don't know if this a bug in echodoc or in fortls. But since echodoc should be language agnostic and works for languages that have only one kind of procedure, I guess it is a bug in fortls. |
I think some users like getting the call signature in the autocomplete, however it is obviously a subjective thing. On most platforms, when As for the |
That would be great. Thank you! Of course it is a subjective thing, but I am pretty sure, that I am not the only one who would like to use your tool in that way. (And actually I could solve it for myself in my local
Did they work for you from inside neovim or another editor? |
Apparently the echodoc documentation says:
So it seems to act independent of the language server client. |
|
Complete only the name of procedures. Closes hansec#112
The issue with echodoc is solved. I made the mistake of testing one character function names. This works with echodoc. integer function double(x)
integer, intent(in) :: x
double = 2 * x
end function So a |
Add option to complete only the name of procedures, fixes #112
I am using:
Neovim: 0.3.5
fortls: 1.8.2
and have a similar issue like here
Simply, when I complete a function which has arguments I get explicit placeholders and I couldn't find a way to rewind through them e.g.:
I would expect either no placeholders like in vanilla deoplete or some way to jump through various arguments until all placeholders are gone without leaving Insert mode.
The text was updated successfully, but these errors were encountered: