vim-sql-workbench
vim-sql-workbench copied to clipboard
Intellisense Autocomplete not working (part 2)
It is a great plugin, I really like it. So far so good, except for the intellisense feature. I have read another issue related to this (https://github.com/cosminadrianpopescu/vim-sql-workbench/issues/22), but I thing my problem is different.
When I tried to trigger the autocompletion (<c-x><c-u>
) nothing happened.
I tried <c-x><c-o>
, an error showed up, E745: Using a List as a Number
I have set the extended property report
to true.
When I checked on the cache folder (g:sw_cache
) the report seems exists.
There are several files in that folder, two of them:
-
<MyDB>
(containing xml about my database) -
<MyDB>.vim
(containing xml, with many line likelet b:schema_report....
) From these two files, I am sure I've done the right thing in setting the extended property.
Is there something that I missed?
------------ UPDATE
I have tried to read the code, and I found that when the plugin try to extract the current_profile
from reading the wbconnect ....
command, it always fail.
The regex (s:pattern_wbconnect_gen
in autoload/sw/server.vim
) cannot capture the a:sql
pattern.
Somehow on my system, the a:sql
pattern always showed up as:
-- @wbresult WbConnect Mydbname ;^@WbConnect Mydbname ;
Whereas the regex pattern seems to capture only:
-- @wbresult WbConnect Mydbname ;
WbConnect Mydbname ;
How to fix this? Is it because I am using windows?
By looking at the code, I see the pattern is let s:pattern_wbconnect_gen = '\v\c^[ \t\n\r]*wbconnect.*$'
. This should also include your query. Can you please open the log (SWSqlShoLog
) and then go to the log tab and try to do a search by that pattern? If it does not find the line, then it's a problem in the pattern. Otherwise, it's a problem in some part else.