Giter Site home page Giter Site logo

Completion error occurs. about sqls HOT 3 CLOSED

unikuragit avatar unikuragit commented on September 28, 2024
Completion error occurs.

from sqls.

Comments (3)

lighttiger2505 avatar lighttiger2505 commented on September 28, 2024

The error occurs because the database table and column information cannot be cached due to the inability to connect to the database. Please review the database settings.

The connection settings are incorrect. The following is correct. workspace_config is missing.

autocmd User lsp_setup call lsp#register_server({
\   'name': 'sqls',
\   'cmd': {server_info->['sqls']},
\   'whitelist': ['sql'],
\   'workspace_config': {
\     'sqls': {
\       'connections': [
\         {
\           'driver': 'postgresql',
\           'dataSourceName': 'host=LOCAL-IP port=5432 dbname=GTX1 user=postgres password=PASSWORD sslmode=disable',
\         },
\       ],
\     },
\   },
\ })

from sqls.

unikuragit avatar unikuragit commented on September 28, 2024

Thank you for your reply.
I'm sorry, I overlooked it.
I tried again after changing the settings, but it was still an error.
sqls seems to die.
Only sqls is used for the LSP provider.

05/15/20 16:32:35:["s:on_stdout client option on_notification() error","Vim(call):E631: ch_sendraw(): write failed","function 294_out_cb[2]..293_on_stdout[71]..211_on_notification[17]..211_handle_initialize[25]..292_callback[1]..292_next[9]..16[1]..211_ensure_conf[14]..292_callback[1]..292_next[9]..17[1]..211_ensure_open[25]..211_send_notification[7]..lsp#client#send_notification[1]..293_lsp_send[36]..async#job#send[1]..294_job_send, line 6"]
05/15/20 16:32:35:["<---(stderr)",1,"sqls",["2020/05/15 16:32:35 sqls: reading on stdin, writing on stdout",""]]
05/15/20 16:32:35:["s:on_exit",1,"sqls","exited",1]

I think the DB connection information is correct.
The location of the cause is not clear, but we will report it.

from sqls.

unikuragit avatar unikuragit commented on September 28, 2024

I solved my problem.
The cause was that the PGCLIENTENCODING environment variable was set to 'SJIS' because of the encoding of the connection destination PostgreSQL.
It worked when I changed PGCLIENTENCODING = 'UNICODE'.
Thank you for your support.

from sqls.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.