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

javalsp - no completion available #1994

Closed
Jeansen opened this issue Oct 14, 2018 · 36 comments · Fixed by #2119
Closed

javalsp - no completion available #1994

Jeansen opened this issue Oct 14, 2018 · 36 comments · Fixed by #2119

Comments

@Jeansen
Copy link

Jeansen commented Oct 14, 2018

Information

VIM version

VIM - Vi IMproved 8.1 (2018 May 18, compiled Aug 22 2018 23:46:39)
Included patches: 1-320

Operating System:

Debian GNU/Linux buster/sid

What went wrong

There is no completion offered at all when writing Java code.

Reproducing the bug

Follow the instructions to install javalsp.
I installed javalsp in Visual Studio Code and it works.
I tried another LSP (for bash) and it sort of works. At least, I get a popup with suggestions as I type. Though the popup is not as elaborate as in VS Code.

:ALEInfo

 Current Filetype: java
Available Linters: ['checkstyle', 'javac', 'javalsp', 'pmd']
  Enabled Linters: ['javalsp']
 Suggested Fixers: 
  'google_java_format' - Fix Java files with google-java-format.
  'remove_trailing_lines' - Remove all blank lines at the end of a file.
  'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.
  'uncrustify' - Fix C, C++, C#, ObjectiveC, ObjectiveC++, D, Java, Pawn, and VALA files with uncrustify.
 Linter Variables:

let g:ale_java_javalsp_jar = '/home/marcel/git-clones/java-language-server/out/fat-jar.jar'
 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 = 1
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 = '%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 = {'javascript': ['eslint']}
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 = 0
let g:ale_lint_on_enter = 1
let g:ale_lint_on_filetype_changed = 1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'always'
let g:ale_lint_on_insert_leave = 0
let g:ale_linter_aliases = {}
let g:ale_linters = {'markdown': ['remark'], 'sh': ['language_server'], 'java': ['javalsp'], 'javascript': ['eslint']}
let g:ale_linters_explicit = 0
let g:ale_list_window_size = 5
let g:ale_list_vertical = 0
let g:ale_loclist_msg_format = '%s'
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 = 0
let g:ale_set_quickfix = 1
let g:ale_set_signs = 1
let g:ale_sign_column_always = 1
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 = ['✗ %d', '⚠ %d', '✓ ok']
let g:ale_type_map = {}
let g:ale_use_global_executables = v:null
let g:ale_warn_about_trailing_blank_lines = 1
let g:ale_warn_about_trailing_whitespace = 1
  Command History:

(started) ['bash', '-c', '''java -cp /home/marcel/git-clones/java-language-server/out/fat-jar.jar -Xverify:none org.javacs.Main''']
@w0rp
Copy link
Member

w0rp commented Oct 15, 2018

How did you try to use autocompletion in Java? Can you share any example code you were testing with, and where you positioned your cursor?

@Jeansen
Copy link
Author

Jeansen commented Oct 15, 2018

@w0rp
I tried this one: https://github.com/carnellj/spmia-chapter3/blob/master/licensing-service/src/main/java/com/thoughtmechanix/licenses/Application.java

And started doing something simple like defining a String variable and then accessing its length, e.g.

String s = "test";
s.{waiting for popup}

Or just try to use any of the static methods from String.

@w0rp
Copy link
Member

w0rp commented Oct 17, 2018

Did you set let g:ale_completion_enabled = 1 before any plugins are loaded, or after they are loaded?

@Jeansen
Copy link
Author

Jeansen commented Oct 17, 2018

All plugin-specific settings are done after they are loaded. Should I try the other way around?

@w0rp
Copy link
Member

w0rp commented Oct 18, 2018

Yes, you must set that setting before ALE is loaded.

@w0rp
Copy link
Member

w0rp commented Oct 18, 2018

I updated the documentation to tell people to set that setting to 1 before the plugin is loaded in every place that it's mentioned.

@Jeansen
Copy link
Author

Jeansen commented Oct 18, 2018

OK, tried it. But still I do not get any completion ;-(

@shawnohare
Copy link

shawnohare commented Oct 20, 2018

Out of curiosity, do you utilize any delimiter auto-pairing plug ins?

I ask this because I find that ALE's (python) completion for me breaks fairly easily with auto-pairing enabled (whereas other language clients still complete, so I assume it has to do with processing before the completion suggestions are generated).

ALEInfo
 Current Filetype: python
Available Linters: ['flake8', 'mypy', 'prospector', 'pycodestyle', 'pyflakes', 'pylint', 'pyls', 'pyre', 'vulture']
  Enabled Linters: ['flake8', 'pyls']
 Suggested Fixers:
  'add_blank_lines_for_python_control_statements' - Add blank lines before control statements.
  'autopep8' - Fix PEP8 issues with autopep8.
  'black' - Fix PEP8 issues with black.
  'isort' - Sort Python imports with isort.
  'remove_trailing_lines' - Remove all blank lines at the end of a file.
  'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.
  'yapf' - Fix Python files with yapf.
  'remove_trailing_lines' - Remove all blank lines at the end of a file.
  'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.
  'yapf' - Fix Python files with yapf.
 Linter Variables:
let g:ale_python_flake8_auto_pipenv = 0
let g:ale_python_flake8_change_directory = 1
let g:ale_python_flake8_executable = 'flake8'
let g:ale_python_flake8_options = ''
let g:ale_python_flake8_use_global = 0
let g:ale_python_pyls_auto_pipenv = 0
let g:ale_python_pyls_executable = 'pyls'
let g:ale_python_pyls_use_global = 0
 Global Variables:
let g:ale_cache_executable_check_failures = v:null
let g:ale_change_sign_column_color = v:null
let g:ale_command_wrapper = ''
let g:ale_completion_delay = 100
let g:ale_completion_enabled = 1
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 = '[%linter%]% 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'], 'python': ['black']}
let g:ale_history_enabled = 1
let g:ale_history_log_output = 1
let g:ale_keep_list_window_open = v:null
let g:ale_lint_delay = 200
let g:ale_lint_on_enter = 0
let g:ale_lint_on_filetype_changed = 1
let g:ale_lint_on_save = 0
let g:ale_lint_on_text_changed = 'never'
let g:ale_lint_on_insert_leave = 0
let g:ale_linter_aliases = {}
let g:ale_linters = {'python': ['pyls', 'flake8']}
let g:ale_linters_explicit = 0
let g:ale_list_window_size = v:null
let g:ale_list_vertical = v:null
let g:ale_loclist_msg_format = v:null
let g:ale_max_buffer_history_size = 20
let g:ale_max_signs = v:null
let g:ale_maximum_file_size = v:null
let g:ale_open_list = 1
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 = v:null
let g:ale_sign_error = '✖'
let g:ale_sign_offset = v:null
let g:ale_sign_style_error = v:null
let g:ale_sign_style_warning = v:null
let g:ale_sign_warning = '⚠'
let g:ale_statusline_format = v:null
let g:ale_type_map = v:null
let g:ale_use_global_executables = v:null
let g:ale_warn_about_trailing_blank_lines = 1
let g:ale_warn_about_trailing_whitespace = 1

The following snippet completes as expected:

# python snippet in neovim, no auto-pairing plugin:
class MyBase:
    pass

class K(My # <C-x><C-o> suggests MyBase 

Wheras the same snippet with manually paired parens (or auto-paired via a plugin) produces:

tty

The gif above is less clear than I'd like, but effectively:

# class MyClass:
    pass

class K(My #  <C-x><C-o> fails. # )

@Jeansen
Copy link
Author

Jeansen commented Oct 20, 2018

@shanesmith Thank you for your hint but actually I have not additional plugins installed for this test. Here's my stripped down vimrc.

#!/usr/bin/vim

augroup vimrc
  autocmd!
augroup END


unlet! g:skip_defaults_vim
silent! source $VIMRUNTIME/defaults.vim

set encoding=utf-8
scriptencoding utf-8
set termencoding=utf-8
set shell=bash             
filetype plugin indent on  
syntax on

let g:ale_sign_column_always = 1
let g:ale_statusline_format = ['✗ %d', '⚠ %d', '✓ ok']
let g:ale_sign_error = '┃'
let g:ale_sign_warning = '┃'

let g:ale_set_loclist = 0
let g:ale_set_quickfix = 1
let g:ale_open_list = 0
" let g:ale_keep_list_window_open = 1
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%s'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_lint_delay = 0
" let g:ale_lint_on_enter = 1
let g:ale_lint_on_save = 1
let g:ale_fix_on_save = 1
" let g:ale_fixers.markdown = ['remove_trailing_lines']
let g:ale_list_window_size=5
let g:ale_completion_enabled = 1
let g:ale_perl_perlcritic_showrules = 1
let g:ale_java_javalsp_jar = '/home/marcel/git-clones/java-language-server/out/fat-jar.jar'

let g:ale_linters = {
            \   'markdown': ['remark'],
            \   'javascript': ['eslint'],
            \   'java': ['javalsp'],
            \}

let g:ale_fixers = {
            \   'javascript': ['eslint'],
            \}

function! s:LoadPlugins() abort
  " Notes on adding plugins:
  " - Absolutely do not use 'for' if the plugin provides an `ftdetect/`
    Plug 'w0rp/ale'

endfunction


let g:dko#vim_dir = '/home/marcel/.vim/'
let g:dko#plug_dir = '/plugged/'
let g:dko#plug_absdir = g:dko#vim_dir . g:dko#plug_dir

let g:plug_window = 'tabnew'


let s:has_plug = !empty(glob(expand(g:dko#vim_dir . '/autoload/plug.vim')))
" Load vim-plug and its plugins?
if !s:has_plug
  if executable('curl')
    execute 'silent !curl -fLo '
          \ . g:dko#vim_dir . '/autoload/plug.vim '
          \ . 'https://raw.githubusercontent.com/'
          \ . 'junegunn/vim-plug/master/plug.vim'
    let s:has_plug = 1
  endif
endif

if s:has_plug
  call plug#begin(g:dko#plug_absdir)
  call s:LoadPlugins()
  if !isdirectory(expand(g:dko#plug_absdir))
    PlugInstall
    source $MYVIMRC
  endif
  call plug#end()
endif

@w0rp
Copy link
Member

w0rp commented Oct 22, 2018

<C-x><C-o> isn't used for triggering ALE completion. Suggestions are shown while you type.

@shawnohare
Copy link

<C-x><C-o> isn't used for triggering ALE completion. Suggestions are shown while you type.

Fair enough, but the trivial example of completion failing inside parenthesis occurs even when ALE completion is automatically triggered after the delay. Obviously it is a separate issue to the original one concerning Java, so if anything once I get some time I will try to go through the steps of creating a new issue.

@hsanson
Copy link
Contributor

hsanson commented Dec 4, 2018

@w0rp I am also unable to get auto-completion working with ale. Not sure at what point I updated that broke this but was working before (I wrote javalsp support).

ALEInfo shows the LSP command is executed and started but completion, go-to-definition, and friends do not do anything.

Is there a way to debug the communication between ALE and the LSP server?? like output the request/response between in the channels to a file to see what is going on?

I am also currently implementing LSP support for Eclipse LSP #1996, it is almost ready (see hsanson/ale) but it does not seem to do anything like javalsp.

I also tested the javalsp with visual studio code and there it work perfectly. I can get autocompletion and jump to definition/references without problem.

@w0rp
Copy link
Member

w0rp commented Dec 4, 2018

Yes, the easiest way to debug ALE and LSP communication is to use the ch_logfile function. Write all of the communication to a file, and you can open it in Vim or watch it with tail. You have to run Vim 8 or above for that. There is no equivalent in NeoVim, without editing the code heavily.

@w0rp
Copy link
Member

w0rp commented Dec 4, 2018

call ch_logfile(expand('~/something.log'), 'w') is probably what you want.

@hsanson
Copy link
Contributor

hsanson commented Dec 5, 2018

I created a docker container with Ubuntu:18.10 to try this but in the packaged vim 8.0 I get the following error when opening a java file:

Error detected while processing function ale#events#LintOnEnter[5]..ale#Queue[33]..<SNR>77_Lint[25]..ale#engine#RunLinters[14]..<SNR>75_
RunLinter[2]..ale#lsp_linter#CheckWithLSP[2]..ale#lsp_linter#StartLSP[59]..ale#lsp#OpenDocument[11]..ale#lsp#Send[15]..<SNR>88_SendMessa
geData[2]..ale#job#SendRaw:
line    4:
E631: ch_sendraw(): write failed

Other linters seem to work correctly.

Also tried installing vim 8.1 from this repo and got the same error. Not sure if this is the issue affecting neovim or is a different problem.

@w0rp
Copy link
Member

w0rp commented Dec 5, 2018

E631: ch_sendraw(): write failed

That's potentially something we can't fix, but we can maybe catch the error and ignore it at least. See this ancient issue: #39 I don't use ch_sendraw for any regular linting jobs, but it's required for LSP communication in Vim. It can break on some machines for various reasons where < doesn't. You may have to report your issue as a bug in Vim itself, if it's not working when it ought to be. The bug is difficult to reproduce.

@hsanson
Copy link
Contributor

hsanson commented Dec 5, 2018

Ok when running vim 8.0 within a docker container I get the error above. I installed vim 8.0 from apt-get in my dev machine and was able to get the following log:

==== start log session ====
  0.077471 : Starting job: /bin/bash  -c  'java -cp /home/ryujin/.config/nvim/tools/javacs.jar -Xverify:none org.javacs.Main'                                                                                                                 
  0.077547 on 0: Created channel
  0.079150 SEND on 0: 'Content-Length: 234

{"method":"initialize","jsonrpc":"2.0","id":1,"params":{"initializationOptions":{},"rootUri":"file:///home/ryujin/Projects/Join/join-rest-api","capabilities":{},"rootPath":"/home/ryujin/Projects/Join/join-rest-api","processId":10081}}'   
  0.079447 on 0: channel_select_check(): Read EOF from ch_part[1], closing
  0.079482 RECV on 0: '/bin/bash: java -cp /home/ryujin/.config/nvim/tools/javacs.jar -Xverify:none org.javacs.Main: No such file or directory                                                                                                
'
  0.079488 on 0: channel_select_check(): Read EOF from ch_part[2], closing
  0.096925 : looking for messages on channels
  0.096951 on 0: Closing channel because all readable fds are closed
  0.096956 on 0: Closing channel
  0.096969 on 0: Dropping message '/bin/bash: java -cp /home/ryujin/.config/nvim/tools/javacs.jar -Xverify:none org.javacs.Main: No such file or directory                                                                                    
'
  0.096980 on 0: Job ended
  0.096992 : looking for messages on channels

Not really sure what I should be looking here but seems the command to invoke the LSP server fails with "No such file or directory" error.

I checked that the command actually works and starts the LSP server in the terminal:

[~]> /bin/bash  -c  'java -cp /home/ryujin/.config/nvim/tools/javacs.jar -Xverify:none org.javacs.Main'  
{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"java.version is 1.8.0_191"}} 

Also verified that the rootUri and rootPath exists and point to the directory where the java project is located.

P.S. replicating the issue above is easy running vim inside a ubuntu:18.10 docker container with vim installed via apt-get.

@w0rp
Copy link
Member

w0rp commented Dec 5, 2018

Okay, I can merge your pull request to make the executable configurable, and I'll create a second issue for catching write error and either ignoring them or logging them. Either way, they should not be interrupting whatever you are doing in Vim.

@Jeansen
Copy link
Author

Jeansen commented Dec 14, 2018

Hm, still does not work correctly for me. When I create a log as suggested earlier for debugging (#1994 (comment)), I see something like this:

{"jsonrpc":"2.0","id":36,"error":{"code":-32603,"message":"Internal error.","data":"java.lang.RuntimeException: java.lang.reflect.InvocationTargetException\n\tat org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:67)\n\tat org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:120)\n\tat org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:261)\n\tat org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:190)\n\tat org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:192)\n\tat org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)\n\tat org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:99)\n\tat java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)\n\tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat java.base/java.lang.Thread.run(Thread.java:834)\nCaused by: java.lang.reflect.InvocationTargetException\n\tat jdk.internal.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)\n\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:566)\n\tat org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)\n\t... 11 more\nCaused by: java.lang.NullPointerException\n\tat org.javacs.JavaTextDocumentService.completion(JavaTextDocumentService.java:84)\n\t... 15 more\n"}}'
 54.382577 RECV on 3(err): '2018-12-14	10:45:19	SEVERE	org.eclipse.lsp4j.jsonrpc.RemoteEndpoint fallbackResponseError	Internal error: java.lang.reflect.InvocationTargetException
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:67)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:120)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:261)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:190)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:192)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:99)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.reflect.InvocationTargetException
	at jdk.internal.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
	... 11 more
Caused by: java.lang.NullPointerException
	at org.javacs.JavaTextDocumentService.completion(JavaTextDocumentService.java:84)
	... 15 more

'
 54.421452 : looking for messages on channels
 54.421510 on 3: Invoking channel callback <SNR>201_VimOutputCallback
 54.422450 on 3: Dropping message '2018-12-14	10:45:19	SEVERE	org.eclipse.lsp4j.jsonrpc.RemoteEndpoint fallbackResponseError	Internal error: java.lang.reflect.InvocationTargetException
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:67)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:120)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:261)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:190)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:192)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:99)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.reflect.InvocationTargetException
	at jdk.internal.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
	... 11 more
Caused by: java.lang.NullPointerException
	at org.javacs.JavaTextDocumentService.completion(JavaTextDocumentService.java:84)
	... 15 more

I tried building https://github.com/georgewfraser/vscode-javac as suggested in the docs AND also took the version (2.6) installed via VSCODE.

I am still trying to do something simple as I wrote in #1994 (comment)

@hsanson
Copy link
Contributor

hsanson commented Dec 14, 2018

That looks like vscode-javac is crashing for you. Make sure you compile it with java 8.

You can try with the eclipselsp (#2121) I added in a separate branch. I find this one works better than vscode-javac. Unfortunately this one cannot be merged to master until #2132 is completed.

@Jeansen
Copy link
Author

Jeansen commented Dec 15, 2018

Oh, Java 8, really? Because on the project site it says at least Java 10 is needed .... I'll give it a try anyway. Thank you.

@Jeansen
Copy link
Author

Jeansen commented Dec 15, 2018

Interesting. With Java 8 now not errors any longer. But completion does not work, anyway :-(.

ALEInfo shows:

 Current Filetype: java
Available Linters: ['checkstyle', 'javac', 'javalsp', 'pmd']
  Enabled Linters: ['javalsp']                                                                                                                                                                                                                                                                                      
 Suggested Fixers:
  'google_java_format' - Fix Java files with google-java-format.
  'remove_trailing_lines' - Remove all blank lines at the end of a file.
  'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.
  'uncrustify' - Fix C, C++, C#, ObjectiveC, ObjectiveC++, D, Java, Pawn, and VALA files with uncrustify.
 Linter Variables:
let g:ale_java_javalsp_executable = 'java'
let g:ale_java_javalsp_jar = '/home/marcel/git-clones/vscode-javac/out/fat-jar.jar'
 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 = 1
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 = '%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 = {'javascript': ['eslint']}
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 = 0
let g:ale_lint_on_enter = 1
let g:ale_lint_on_filetype_changed = 1
let g:ale_lint_on_insert_leave = 0
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'always'
let g:ale_linter_aliases = {}
let g:ale_linters = {'markdown': ['remark'], 'sh': ['language_server'], 'java': ['javalsp'], 'javascript': ['eslint']}
let g:ale_linters_explicit = 0
let g:ale_list_vertical = 0
let g:ale_list_window_size = 5
let g:ale_loclist_msg_format = '%s'
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 = 0
let g:ale_set_quickfix = 1
let g:ale_set_signs = 1
let g:ale_sign_column_always = 1
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 = ['✗ %d', '⚠ %d', '✓ ok']
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:
(started) ['bash', '-c', '''java'' -cp /home/marcel/git-clones/vscode-javac/out/fat-jar.jar -Xverify:none org.javacs.Main']

And when logging, I see something like this:

110.401132 RECV on 65(err): '	at java.lang.ClassLoader.defineClass1(Native Method)'
110.401133 : looking for messages on channels
110.401138 on 65: Dropping message '	at java.lang.ClassLoader.defineClass1(Native Method)'
110.401162 RECV on 65(err): '
'
110.401163 : looking for messages on channels
110.401165 on 65: Dropping message '
'
110.401178 RECV on 65(err): '	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)'
110.401179 : looking for messages on channels
110.401183 on 65: Dropping message '	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)'
110.401204 RECV on 65(err): '
'
110.401206 : looking for messages on channels
110.401208 on 65: Dropping message '
'
110.401230 RECV on 65(err): '	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)'
110.401231 : looking for messages on channels
110.401235 on 65: Dropping message '	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)'
110.401246 RECV on 65(err): '
'
110.401247 : looking for messages on channels
110.401250 on 65: Dropping message '
'
110.401272 RECV on 65(err): '	at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)'
110.401273 : looking for messages on channels
110.401275 on 65: Dropping message '	at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)'
110.401284 RECV on 65(err): '
'
110.401285 : looking for messages on channels
110.401287 on 65: Dropping message '
'
110.401310 RECV on 65(err): '	at java.net.URLClassLoader.access$100(URLClassLoader.java:73)'
110.401312 : looking for messages on channels
110.401315 on 65: Dropping message '	at java.net.URLClassLoader.access$100(URLClassLoader.java:73)'
110.401338 RECV on 65(err): '
'
110.401339 : looking for messages on channels
110.401341 on 65: Dropping message '
'
110.401350 RECV on 65(err): '	at java.net.URLClassLoader$1.run(URLClassLoader.java:368)'
110.401351 : looking for messages on channels
110.401354 on 65: Dropping message '	at java.net.URLClassLoader$1.run(URLClassLoader.java:368)'
110.401378 RECV on 65(err): '
'
110.401379 : looking for messages on channels
110.401382 on 65: Dropping message '
'
110.401404 RECV on 65(err): '	at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
'
110.401405 : looking for messages on channels
110.401407 on 65: Dropping message '	at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
'
110.401436 RECV on 65(err): '	at java.security.AccessController.doPrivileged(Native Method)'
110.401438 : looking for messages on channels
110.401442 on 65: Dropping message '	at java.security.AccessController.doPrivileged(Native Method)'
110.401453 RECV on 65(err): '
'
110.401455 : looking for messages on channels
110.401458 on 65: Dropping message '
'
110.401468 RECV on 65(err): '	at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
'
110.401469 : looking for messages on channels
110.401472 on 65: Dropping message '	at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
'
110.401489 RECV on 65(err): '	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)'
110.401491 : looking for messages on channels
110.401495 on 65: Dropping message '	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)'
110.401512 RECV on 65(err): '
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)'
110.401513 : looking for messages on channels
110.401517 on 65: Dropping message '
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)'
110.401527 RECV on 65(err): '
'
110.401528 : looking for messages on channels
110.401533 on 65: Dropping message '
'
110.401549 RECV on 65(err): '	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)'
110.401551 : looking for messages on channels
110.401555 on 65: Dropping message '	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)'
110.401567 RECV on 65(err): '
'
110.401568 : looking for messages on channels
110.401571 on 65: Dropping message '
'
110.401590 RECV on 65(err): '	at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)'
110.401592 : looking for messages on channels
110.401596 on 65: Dropping message '	at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)'
110.401608 RECV on 65(err): '
'
110.401609 : looking for messages on channels
110.401613 on 65: Dropping message '
'
110.402952 on 65: channel_select_check(): Read EOF from ch_part[1], closing
110.402969 on 65: channel_select_check(): Read EOF from ch_part[2], closing
110.402976 : looking for messages on channels
110.402980 on 65: Closing channel because all readable fds are closed

@jqno
Copy link
Contributor

jqno commented Feb 7, 2019

I've been fiddling with this as well. The project has now updated to Java 11 and is using JLink to make a distribution, instead of creating a fat jar.

I've forked ALE and updated the code to start it up correctly, see jqno@5ce1e9b (I can make a PR if desired).

The server starts locally when I run it from the commandline, but now I get errors when I try to use it from Vim and I'm at a loss how to fix those:

Error detected while processing function <SNR>84_VimOutputCallback[6]..<lambda>2[1]..ale#lsp#HandleMessage[30]..ale#definitionHandleLSPResponse:
line 15:
E716: Key not present in Dictionary: uri)
E116: Invalid arguments for function ale#path#FromURI(l:item.uri)
E15: Invalid expression: ale#path#FromURI(l:item.uri)

Any ideas?

@w0rp
Copy link
Member

w0rp commented Feb 7, 2019

Dunno what those errors mean. That shouldn't happen. Could you provide the steps of what you did exactly which led to those errors?

@jqno
Copy link
Contributor

jqno commented Feb 7, 2019

  • I checked out the master of https://github.com/georgewfraser/java-language-server (it's at commit ef082220c1121d89bfefe4decc77b56c75d7813b when I'm writing this, don't know if that matters)

  • I built a distribution of the project with scripts/link_mac.sh

  • I copied the contents of dist/mac in a convenient folder (in my case, ~/Dropbox/bin/java-language-server

  • I made some changes to ALE as well, see jqno@5ce1e9b (this was to make the javalsp linter work with their new method of distribution). I've created a PR for this, in case that makes things easier: Fixes javalsp linter #2284.

  • I added these lines to ~/.vim/ftplugin/java.vim:

    let g:ale_java_javalsp_executable = expand('~/Dropbox/bin/java-language-server/bin/java')
    let g:ale_linters.java = ['javalsp']

  • Then I opened a Java file and tried :ALEGoToDefinition. That's when I got the error.

Here's my output of :ALEInfo:

 Current Filetype: java
Available Linters: ['checkstyle', 'javac', 'javalsp', 'pmd']
  Enabled Linters: ['javalsp']
 Suggested Fixers: 
  'google_java_format' - Fix Java files with google-java-format.
  'remove_trailing_lines' - Remove all blank lines at the end of a file.
  'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.
  'uncrustify' - Fix C, C++, C#, ObjectiveC, ObjectiveC++, D, Java, Pawn, and VALA files with uncrustify.
 Linter Variables:

let g:ale_java_javalsp_executable = '/Users/jqno/Dropbox/bin/java-language-server/bin/java'
 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 = v:null
let g:ale_completion_enabled = 0
let g:ale_completion_max_suggestions = v:null
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 = 0
let g:ale_fixers = {}
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 = 0
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'never'
let g:ale_linter_aliases = {}
let g:ale_linters = {'java': ['javalsp']}
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 = 0
let g:ale_set_quickfix = 1
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:

(started) ['sh', '-c', '''/Users/jqno/Dropbox/bin/java-language-server/bin/java'' -Xverify:none -m javacs/org.javacs.Main']

@hsanson
Copy link
Contributor

hsanson commented Feb 8, 2019

Actually language server features seem to have stopped working for me. I tried javalsp, eclipselsp for java, and pyls for python and autocompletion is not working.

I also tried the ch_logfile() call to check what is going on but I get no output at all with Vim:

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Apr 10 2018 21:31:58)

@w0rp
Copy link
Member

w0rp commented Feb 8, 2019

I merged that pull request now. Everyone should update javalsp and run their script.

@jqno
Copy link
Contributor

jqno commented Feb 9, 2019

Thanks!

I just tried again, using ch_logfile (from this comment: #1994 (comment) ) and this is the result:

==== start log session ====
  8.061286 SEND on 1(in): 'Content-Length: 236

{"method":"textDocument/hover","jsonrpc":"2.0","id":2,"params":{"textDocument":{"uri":"file:///Users/jqno/w/equalsverifier/equalsverifier/src/main/java/nl/jqno/equalsverifier/EqualsVerifier.java"},"position":{"character":22,"line":52}}}'
  8.061574 : looking for messages on channels
  8.063689 RECV on 1(err): '10:59:17.028	INFO	org.javacs.JavaLanguageServer updateActiveFile	Recompile active file...
'
  8.063694 on 1: Dropping message '10:59:17.028	INFO	org.javacs.JavaLanguageServer updateActiveFile	Recompile active file...
'
  8.064184 RECV on 1(err): '10:59:17.028	SEVERE	org.javacs.lsp.LSP connect	null
java.lang.NullPointerException
	at javacs/org.javacs.JavaLanguageServer.updateActiveFile(JavaLanguageServer.java:626)
	at javacs/org.javacs.JavaLanguageServer.hover(JavaLanguageServer.java:636)
	at javacs/org.javacs.lsp.LSP.connect(LSP.java:338)
	at javacs/org.javacs.Main.main(Main.java:25)

'
  8.064188 : looking for messages on channels
  8.064205 on 1: Dropping message '10:59:17.028	SEVERE	org.javacs.lsp.LSP connect	null
java.lang.NullPointerException
	at javacs/org.javacs.JavaLanguageServer.updateActiveFile(JavaLanguageServer.java:626)
	at javacs/org.javacs.JavaLanguageServer.hover(JavaLanguageServer.java:636)
	at javacs/org.javacs.lsp.LSP.connect(LSP.java:338)
	at javacs/org.javacs.Main.main(Main.java:25)

'
  8.064661 RECV on 1(out): 'Content-Length: 49

{"jsonrpc":"2.0","id":2,"result":{"code":-32603}}'
  8.064664 : looking for messages on channels
  8.064682 on 1: Invoking channel callback <SNR>84_VimOutputCallback
  8.065039 : ERROR: Error detected while processing function <SNR>84_VimOutputCallback[6]..<lambda>2[1]..ale#lsp#HandleMessage[30]..ale#hover#HandleLSPResponse:
  8.065110 : ERROR: line   26:
  8.065127 : ERROR: E716: Key not present in Dictionary: contents
  8.065144 : ERROR: E15: Invalid expression: l:result.contents
  9.071554 : looking for messages on channels

I clearly see a NullPointerException, so I dove into the code of java-language-server. I'm not familiar with the Language Server Protocol, but what I gather from the code is that the compiler variable is null. It's supposed to be initialized when it receives a message initialized (This line, which goes to this line). (There is also a message initialize which seems to do something else.) Does that make sense?

@GrimKriegor
Copy link
Contributor

It would appear I am having a similar issue.

Are you aware if this is a known issue @jqno?

Using javalsp version v0.2.13 on GNU/Linux.

{"jsonrpc":"2.0","id":6,"result":{"code":-32603}}'
  8.657919 : looking for messages on channels
  8.657951 on 3: Invoking channel callback <SNR>85_VimOutputCallback
  8.658640 : looking for messages on channels
  9.068113 SEND on 3(in): 'Content-Length: 5587

{"method":"textDocument/didChange","jsonrpc":"2.0","params":{"contentChanges":[{"text":"package org.web3j.sample;\n\nimport java.math.BigDecimal;\n\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport org.web3j.crypto.Cred>
  9.068654 SEND on 3(in): 'Content-Length: 238

{"method":"textDocument/completion","jsonrpc":"2.0","id":7,"params":{"textDocument":{"uri":"file:///home/grim/Storage/Temporary/sample-project-gradle/src/main/java/org/web3j/sample/Application.java"},"position":{"character":9,"line":18}}}'
  9.069881 : looking for messages on channels
  9.072299 RECV on 3(err): '18:09:41.226        SEVERE  org.javacs.lsp.LSP connect      null
java.lang.NullPointerException
        at javacs/org.javacs.FileStore.change(FileStore.java:188)
        at javacs/org.javacs.JavaLanguageServer.didChangeTextDocument(JavaLanguageServer.java:1338)
        at javacs/org.javacs.lsp.LSP.connect(LSP.java:293)
        at javacs/org.javacs.Main.main(Main.java:25)

'
  9.072311 on 3: Dropping message '18:09:41.226 SEVERE  org.javacs.lsp.LSP connect      null
java.lang.NullPointerException
        at javacs/org.javacs.FileStore.change(FileStore.java:188)
        at javacs/org.javacs.JavaLanguageServer.didChangeTextDocument(JavaLanguageServer.java:1338)
        at javacs/org.javacs.lsp.LSP.connect(LSP.java:293)
        at javacs/org.javacs.Main.main(Main.java:25)

'
  9.073158 RECV on 3(err): '18:09:41.227        INFO    org.javacs.JavaLanguageServer completion        Complete at /home/grim/Storage/Temporary/sample-project-gradle/src/main/java/org/web3j/sample/Application.java(19,10)
'
  9.073165 : looking for messages on channels
  9.073187 on 3: Dropping message '18:09:41.227 INFO    org.javacs.JavaLanguageServer completion        Complete at /home/grim/Storage/Temporary/sample-project-gradle/src/main/java/org/web3j/sample/Application.java(19,10)
'
  9.074355 RECV on 3(err): '18:09:41.228        SEVERE  org.javacs.lsp.LSP connect      null
java.lang.NullPointerException
        at javacs/org.javacs.JavaLanguageServer.completion(JavaLanguageServer.java:338)
        at javacs/org.javacs.lsp.LSP.connect(LSP.java:324)
        at javacs/org.javacs.Main.main(Main.java:25)

'
  9.074363 : looking for messages on channels
  9.074385 on 3: Dropping message '18:09:41.228 SEVERE  org.javacs.lsp.LSP connect      null
java.lang.NullPointerException
        at javacs/org.javacs.JavaLanguageServer.completion(JavaLanguageServer.java:338)
        at javacs/org.javacs.lsp.LSP.connect(LSP.java:324)
        at javacs/org.javacs.Main.main(Main.java:25)

@jqno
Copy link
Contributor

jqno commented Jun 9, 2019

No, not aware of that. In fact, I stopped using javalsp altogether since I couldn't get it to work.

@hsanson
Copy link
Contributor

hsanson commented Jun 10, 2019

The way ALE invokes the java language server is wrong (#2119). This may be the cause of the problems you are experiencing.

After building java-language-server there will be a launcher binary in the dist folder (e.g. dist/mac/bin/launcher). This binary is the one that must be used to invoke the language server:

let  g:ale_java_javalsp_executable = '/path/to/java-language-server/dist/mac/bin/launcher'

Here is my setup that works just fine:

  • Java Language Server build from source, commit d015f4b
  • I build the language server using java openjdk version "11.0.3" 2019-04-16, installed from Ubuntu packages (apt-get).

@GrimKriegor
Copy link
Contributor

@hsanson, thank you very much for the tip, using the latest version and running it through its launcher did the trick.

Although I had tried running javalsp through launcher, the one present in the stable version I was using v0.2.13 did not include the following JLINK_VM_OPTIONS parameters:

--- 0.2.13/dist/mac/bin/launcher	2019-06-10 17:09:05.019037405 +0100
+++ 0.2.19.r1227.ce5b939/dist/mac/bin/launcher	2019-06-10 16:40:22.000000000 +0100
@@ -1,4 +1,12 @@
 #!/bin/sh
-JLINK_VM_OPTIONS=
+JLINK_VM_OPTIONS="\
+--add-exports jdk.compiler/com.sun.tools.javac.api=javacs \
+--add-exports jdk.compiler/com.sun.tools.javac.code=javacs \
+--add-exports jdk.compiler/com.sun.tools.javac.comp=javacs \
+--add-exports jdk.compiler/com.sun.tools.javac.main=javacs \
+--add-exports jdk.compiler/com.sun.tools.javac.tree=javacs \
+--add-exports jdk.compiler/com.sun.tools.javac.model=javacs \
+--add-exports jdk.compiler/com.sun.tools.javac.util=javacs \
+--add-opens jdk.compiler/com.sun.tools.javac.api=javacs"
 DIR=`dirname $0`
 $DIR/java $JLINK_VM_OPTIONS -m javacs/org.javacs.Main $@

I had tried adding them to the v0.2.13 launcher before, after seeing your contribution, but it appears they only work with a later version.

For the Arch users out there. In addition to aur/java-language-server I have also prepared a aur/java-language-server-git which currently builds version 0.2.19.r1227.ce5b939 of the javalsp and seems to work with ale by simply setting g:ale_java_javalsp_executable = 'java-language-server'.

@Jeansen
Copy link
Author

Jeansen commented Jun 10, 2019

@hsanson Thx for the update. Now, I do not see any errors, but completion still does not work for me. Would you mind posting your settings?

@hsanson
Copy link
Contributor

hsanson commented Jun 11, 2019

@Jeansen my config is available at https://github.com/hsanson/dotvim. I recommend you use the ch_logfile to capture the communication between ALE and the java-language-server and open a new issue with your findings. I may be able to look into it.

@GrimKriegor
Copy link
Contributor

@Jeansen here is a snippet for convenience:

:call ch_logfile(expand('~/vimch.log'), 'w')

@Jeansen
Copy link
Author

Jeansen commented Jun 11, 2019

@hsanson Thx, I will checkt that out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants