Edit a sql file, start typing something, trigger omnicomplete with
vim --clean
:e some_file.sql
iSELEC<c-x><c-o>
Error message:
SQLComplete:The dbext plugin must be loaded for dynamic SQL completion
I would expect it to work without external dependency, or else that omnifunc remains empty by default.
Did I miss something ?
vim version: 9.1.1900
os: Ubuntu 24.04.3
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
That is working as documented at :h sql-completion
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
I would expect it to work without external dependency, or else that omnifunc remains empty by default.
I had to empty it in my config as it breaks autocomplete.
While documented it is still feels wrong, but I didn’t report it.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Would something like this be acceptable ?
diff --git a/runtime/autoload/sqlcomplete.vim b/runtime/autoload/sqlcomplete.vim index adbdbab89..de2327b46 100644 --- a/runtime/autoload/sqlcomplete.vim +++ b/runtime/autoload/sqlcomplete.vim @@ -98,7 +98,7 @@ " Set completion with CTRL-X CTRL-O to autoloaded function. " This check is in place in case this script is " sourced directly instead of using the autoload feature. -if exists('&omnifunc') +if exists('&omnifunc') && exists('g:loaded_dbext') " Do not set the option if already set since this " results in an E117 warning. if &omnifunc == ""
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Would something like this be acceptable ?
I would say yes. I personally believe that sql autocomplete should have been fully implemented within dbext plugin as it just doesn't work without it anyway.
And what is the point in the autoloaded sqlcomplete.vim if it is loaded whenever sql file is opened not when actual completion happens.
ftplugin/sql.vim
" Source it to determine its version
runtime autoload/sqlcomplete.vim
But again, I can nullify it in my config which I did, so it is up to @chrisbra and team to decide.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Closed #18716 as completed via b74ec15.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()