sqls icon indicating copy to clipboard operation
sqls copied to clipboard

LSP not working with simple select getting "Not found statement"

Open jimcornmell opened this issue 4 years ago • 0 comments

LSP appears to register and be running in the background, but when typing "select" etc LSP does not kick in. When debugging enabled I see "Not found statement" errors from sqls.

To Reproduce

  1. Enable debugging in vim
  2. Edit sql file containing "select * from table;"
  3. Start to type sql but LSP does not do anything.
  4. See this in the log:

/opt/nvim-linux64/share/nvim/runtime/lua/vim/lsp/rpc.lua:457 ] "rpc" "/home/user/go/bin/sqls" "stderr" '2021/06/15 07:07:00 error serving, Not found statement, Node: "select * from table;\n", Position: (3, 2):\n github.com/lighttiger2505/sqls/parser/parseutil.extractFocusedStatement\n
/home/user/go/pkg/mod/github.com/lighttiger2505/[email protected]/parser/parseutil/parseutil.go:62\n'

Expected behavior LSP completes/suggests as I type.

Versions:

  • Ubuntu : 20.04.2
  • nanotee/sqls.nvim : Upto commit f2cc9c1 (i.e. latest)
  • lighttiger2505/sqls : Latest
  • $ ps -ef | grep sqls | grep go

user 36036 36031 0 09:44 pts/3 00:00:00 /home/user/go/bin/sqls

  • LspInfo:

Configured servers: html, css, elixirls, angularls, typescript, lua, clangd, graphql, vim, vuels, pyright, gopls, latex, elmls, bash, intelephense, kotlin_language_server, sumneko_lua, terraformls, bashls, dockerls, efm, java, solargraph, cmake, dockerfile, dartls, yamlls, sqls, texlab, python, yaml, svelte, jsonls, cssls, emmet_ls, vimls, json, tsserver, rust_analyzer Neovim logs at: /home/jim/.cache/ranger/nvim/lsp.log

1 client(s) attached to this buffer: sqls

Client: sqls (id 2) root: /home/user/workspace/seymour-database-schema filetypes: sql, mysql cmd: /home/user/go/bin/sqls

1 active client(s):

Client: sqls (id 2) root: /home/jim/workspace/seymour-database-schema filetypes: sql, mysql cmd: /home/jim/go/bin/sqls

Additional context I'm using LunarVim and other LSP's work.

jimcornmell avatar Jun 15 '21 08:06 jimcornmell