Closed stouf closed 6 years ago
I cannot reproduce here locally.
From the log though, the line is truncated as expected
echo '[Error]Cannot get
anObject.aPropertyThatDoesNotExist
because propertyaPropertyThatDoesNotExist
is missing in o...'
Might be the column width reported by vim is not consistent with the actual width.
What is your detailed vim version number?
Thanks for taking a look at it :)
I cannot reproduce here locally.
Yeah, I got a friend of mine to give it a shot and it didn't occur for him :( Maybe it's related to my environment? If it helps, you can find my full vimrc file there: https://github.com/stouf/my-dev-configs/blob/vim-language-server/vim/vimrc
What is your detailed vim version number?
8.0.1542-2
I'm not looking into full vimrc.
I'm not asking for a vimrc review, I just posted it in case it helps ;-) Why did you close this issue by the way?
I closed it because it couldn’t be reproduced with provided min vimrc and reproduction steps. There is nothing can be done for this.
You can reopen if you could provide reproduction steps.
On Thu, Apr 5, 2018 at 23:33 stouf notifications@github.com wrote:
I'm not asking for a vimrc review, I just posted it in case it helps ;-) Why did you close the issue by the way?
— You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub https://github.com/autozimu/LanguageClient-neovim/issues/361#issuecomment-379161616, or mute the thread https://github.com/notifications/unsubscribe-auth/ABYt72Z8AzwCiHxLpAhh8X0457jfV_ikks5tlwwlgaJpZM4TH8Wu .
Got it. Thank you for looking into it anyway.
From the log though, the line is truncated as expected
Sorry for coming back on this, but I just realized the error message actually does not get truncated.
The expected message is as follow:
Not sure if this helps...
I put :set cmdheight=2
in my vimrc
and here is the result:
This time it can truncate the message and does not block the navigation through the file. It seems that it originally doesn't have enough space to add the three dots when it truncates...?
I also tried to use the following options:
set shortmess=a
set shortmess=at
set shortmess=T
set shortmess=t
But none of them could prevent the "Hit ENTER to continue" message to show up.
Also, when the preview window appears, the filename of the current buffer and the line and column numbers apparently move one line up, leaving more space to the error message to be displayed. As a result, the error message is successfully truncated and there is no "Hit ENTER to continue" message blocking the navigation.
So, setting cmdheight=2 solves the issue?
I updated to the latest version but it's apparently not solving the issue here :( It seems that now, the message doesn't even get truncated.
With set cmdheight=2
With set cmdheight=3
, we can see the actual output and see that the message doesn't get truncated.
Before https://github.com/autozimu/LanguageClient-neovim/commit/d5326305b00773d9ca79a2dca9e83dd925c5903d, as we can see with https://github.com/autozimu/LanguageClient-neovim/issues/361#issuecomment-379199697, setting cmdheight
to 2 would reveal the actual output and we would see that the message gets truncated but was still a little too long to be displayed, causing the "Hit ENTER to continue" message to appear.
Maybe I'm missing something?
Please attach again the log file.
Here are the logs:
/tmp/LanguageClient.log
:
#######
LanguageClient 0.1.67
#######
09:31:35 WARN Handler-main src/utils.rs:69 Unknown project type. Fallback to use dir as project root: Ok("/tmp/test-flow")
09:31:42 INFO Handler-main src/languageclient.rs:1713 End languageClient/setLoggingLevel
09:31:42 INFO Handler-main src/vim.rs:97 => {"jsonrpc":"2.0","result":null,"id":1}
09:31:43 INFO main src/vim.rs:336 <= {"method":"languageClient/handleCursorMoved","jsonrpc":"2.0","params":{"languageId":"javascript","line":1,"buftype":"","filename":"/tmp/test-flow/index.js"}}
09:31:43 INFO Handler-main src/languageclient.rs:1837 Begin languageClient/handleCursorMoved
09:31:43 INFO Handler-main src/languageclient.rs:47 gather_args: [Buftype, Filename, Line] = [String(""), String("/tmp/test-flow/index.js"), Number(1)]
09:31:43 DEBUG Handler-main src/vim.rs:273 state.last_cursor_line: 0 ==> 1
09:31:43 DEBUG Handler-main src/vim.rs:273 state.last_line_diagnostic: " " ==> ""
09:31:43 DEBUG Handler-main src/vim.rs:273 state.id: 13 ==> 14
09:31:43 INFO Handler-main src/vim.rs:128 => {"jsonrpc":"2.0","method":"s:EchoEllipsis","params":[""],"id":14}
09:31:43 INFO main src/vim.rs:336 <= {"id":14,"jsonrpc":"2.0","result":0}
09:31:43 INFO Handler-main src/languageclient.rs:1871 End languageClient/handleCursorMoved
09:31:43 INFO main src/vim.rs:336 <= {"method":"languageClient/handleCursorMoved","jsonrpc":"2.0","params":{"languageId":"javascript","line":2,"buftype":"","filename":"/tmp/test-flow/index.js"}}
09:31:43 INFO Handler-main src/languageclient.rs:1837 Begin languageClient/handleCursorMoved
09:31:43 INFO Handler-main src/languageclient.rs:47 gather_args: [Buftype, Filename, Line] = [String(""), String("/tmp/test-flow/index.js"), Number(2)]
09:31:43 DEBUG Handler-main src/vim.rs:273 state.last_cursor_line: 1 ==> 2
09:31:43 INFO main src/vim.rs:336 <= {"method":"languageClient/handleCursorMoved","jsonrpc":"2.0","params":{"languageId":"javascript","line":3,"buftype":"","filename":"/tmp/test-flow/index.js"}}
09:31:43 INFO Handler-main src/languageclient.rs:1837 Begin languageClient/handleCursorMoved
09:31:43 INFO Handler-main src/languageclient.rs:47 gather_args: [Buftype, Filename, Line] = [String(""), String("/tmp/test-flow/index.js"), Number(3)]
09:31:43 DEBUG Handler-main src/vim.rs:273 state.last_cursor_line: 2 ==> 3
09:31:43 INFO main src/vim.rs:336 <= {"method":"languageClient/handleCursorMoved","jsonrpc":"2.0","params":{"languageId":"javascript","line":4,"buftype":"","filename":"/tmp/test-flow/index.js"}}
09:31:43 INFO Handler-main src/languageclient.rs:1837 Begin languageClient/handleCursorMoved
09:31:43 INFO Handler-main src/languageclient.rs:47 gather_args: [Buftype, Filename, Line] = [String(""), String("/tmp/test-flow/index.js"), Number(4)]
09:31:43 DEBUG Handler-main src/vim.rs:273 state.last_cursor_line: 3 ==> 4
09:31:44 INFO main src/vim.rs:336 <= {"method":"languageClient/handleCursorMoved","jsonrpc":"2.0","params":{"languageId":"javascript","line":5,"buftype":"","filename":"/tmp/test-flow/index.js"}}
09:31:44 INFO Handler-main src/languageclient.rs:1837 Begin languageClient/handleCursorMoved
09:31:44 INFO Handler-main src/languageclient.rs:47 gather_args: [Buftype, Filename, Line] = [String(""), String("/tmp/test-flow/index.js"), Number(5)]
09:31:44 DEBUG Handler-main src/vim.rs:273 state.last_cursor_line: 4 ==> 5
09:31:44 INFO main src/vim.rs:336 <= {"method":"languageClient/handleCursorMoved","jsonrpc":"2.0","params":{"languageId":"javascript","line":6,"buftype":"","filename":"/tmp/test-flow/index.js"}}
09:31:44 INFO Handler-main src/languageclient.rs:1837 Begin languageClient/handleCursorMoved
09:31:44 INFO Handler-main src/languageclient.rs:47 gather_args: [Buftype, Filename, Line] = [String(""), String("/tmp/test-flow/index.js"), Number(6)]
09:31:44 DEBUG Handler-main src/vim.rs:273 state.last_cursor_line: 5 ==> 6
09:31:44 INFO main src/vim.rs:336 <= {"method":"languageClient/handleCursorMoved","jsonrpc":"2.0","params":{"languageId":"javascript","line":7,"buftype":"","filename":"/tmp/test-flow/index.js"}}
09:31:44 INFO Handler-main src/languageclient.rs:1837 Begin languageClient/handleCursorMoved
09:31:44 INFO Handler-main src/languageclient.rs:47 gather_args: [Buftype, Filename, Line] = [String(""), String("/tmp/test-flow/index.js"), Number(7)]
09:31:44 DEBUG Handler-main src/vim.rs:273 state.last_cursor_line: 6 ==> 7
09:31:44 DEBUG Handler-main src/vim.rs:273 state.last_line_diagnostic: "" ==> "[Error]Cannot get `myObject.asvnaswejklbvnaskbvasjkbvasbnvkjasbvkjqwbvjiowbejkvbqwejkbvskajbvaskljbvaskjb` because property `asvnaswejklbvnaskbvasjkbvasbnvkjasbvkjqwbvjiowbejkvbqwejkbvskajbvaskljbvaskjb` is missing in object literal [1]."
09:31:44 DEBUG Handler-main src/vim.rs:273 state.id: 14 ==> 15
09:31:44 INFO Handler-main src/vim.rs:128 => {"jsonrpc":"2.0","method":"s:EchoEllipsis","params":["[Error]Cannot get `myObject.asvnaswejklbvnaskbvasjkbvasbnvkjasbvkjqwbvjiowbejkvbqwejkbvskajbvaskljbvaskjb` because property `asvnaswejklbvnaskbvasjkbvasbnvkjasbvkjqwbvjiowbejkvbqwejkbvskajbvaskljbvaskjb` is missing in object literal [1]."],"id":15}
09:31:44 INFO main src/vim.rs:336 <= {"id":15,"jsonrpc":"2.0","result":0}
09:31:44 INFO Handler-main src/languageclient.rs:1871 End languageClient/handleCursorMoved
09:31:45 INFO main src/vim.rs:336 <= {"method":"languageClient/handleCursorMoved","jsonrpc":"2.0","params":{"languageId":"javascript","line":8,"buftype":"","filename":"/tmp/test-flow/index.js"}}
09:31:45 INFO Handler-main src/languageclient.rs:1837 Begin languageClient/handleCursorMoved
09:31:45 INFO Handler-main src/languageclient.rs:47 gather_args: [Buftype, Filename, Line] = [String(""), String("/tmp/test-flow/index.js"), Number(8)]
09:31:45 DEBUG Handler-main src/vim.rs:273 state.last_cursor_line: 7 ==> 8
09:31:45 DEBUG Handler-main src/vim.rs:273 state.last_line_diagnostic: "[Error]Cannot get `myObject.asvnaswejklbvnaskbvasjkbvasbnvkjasbvkjqwbvjiowbejkvbqwejkbvskajbvaskljbvaskjb` because property `asvnaswejklbvnaskbvasjkbvasbnvkjasbvkjqwbvjiowbejkvbqwejkbvskajbvaskljbvaskjb` is missing in object literal [1]." ==> ""
09:31:45 DEBUG Handler-main src/vim.rs:273 state.id: 15 ==> 16
09:31:45 INFO Handler-main src/vim.rs:128 => {"jsonrpc":"2.0","method":"s:EchoEllipsis","params":[""],"id":16}
09:31:45 INFO main src/vim.rs:336 <= {"method":"languageClient/handleCursorMoved","jsonrpc":"2.0","params":{"languageId":"javascript","line":9,"buftype":"","filename":"/tmp/test-flow/index.js"}}
09:31:45 INFO Handler-main src/languageclient.rs:1837 Begin languageClient/handleCursorMoved
09:31:45 INFO Handler-main src/languageclient.rs:47 gather_args: [Buftype, Filename, Line] = [String(""), String("/tmp/test-flow/index.js"), Number(9)]
09:31:45 DEBUG Handler-main src/vim.rs:273 state.last_cursor_line: 8 ==> 9
09:31:45 INFO main src/vim.rs:336 <= {"id":16,"jsonrpc":"2.0","result":0}
09:31:45 INFO Handler-main src/languageclient.rs:1871 End languageClient/handleCursorMoved
(/tmp/LanguageServer.log
is empty)
You probably need to ticker with the magic number here.
Please file a PR if this number doesn't work for you.
Awesome! I confirm it has fixed the issue. Thank you very much! :D
Description
An error message (related to the code being edited) shows up at the bottom of the vim window and blocks the navigation asking me to hit the ENTER key to continue.
Steps to reproduce
Notes
Environment information
Logs
Server
Empty
Client
Code triggering these logs