Skip to content

Not show columns only tables #169

Description

@4DRIAN0RTIZ

**Description of the ruling
When typing inside neovim the autocomplete is not displayed for columns, only for tables.

Captura de pantalla 2024-10-16 135257

Reproduce.
Steps to reproduce the behavior:

  1. Go to 'playground.sql'.
  2. Type 'SELECT * FROM _users;' 3. 3.
  3. See error

**Expected behavior
When I go back to the '*' I expected it to take the available columns for the table. As SQL-Server does

Versions (complete the following information):** ** OS version: [e.g. iOS].

  • OS version: WSL2 with Ubuntu 22.04.3 LTS
  • sqls version: Version:0.2.28, Revision:63c11a2

**Additional context.

My Neovim configuration:

 ~/.config/nvim/lua/plugins/lsp.lua
local lspconfig = require('lspconfig')
local lsp_installer = require('nvim-lsp-installer')

lspconfig.html.setup{}
lspconfig.ts_ls.setup{}

lsp_installer.setup({
    automatic_installation = true,
    ui = {
        icons = {
            server_installed = "",
            server_pending = "",
            server_uninstalled = ""
        }
    }
})

lspconfig.sqls.setup({
    cmd = {"sqls"},
    on_attach = function(client, bufnr)
        require('sqls').on_attach(client, bufnr) -- require sqls.nvim
    end,
    settings = {
        sqls = {
            connections = {
                {
                    driver = 'mssql',
                    dataSourceName = 'sqlserver://<username>:<password>@<server>:<port>?database=<DB_NAME>&encrypt=true&trustServerCertificate=true',
                },
                {
                    driver = 'mssql',
                    dataSourceName = 'sqlserver://<username>:<password>@<server>:<port>?database=<DB_ANOTHER_NAME>&encrypt=true&trustServerCertificate=true',
                },
            },
        },
    },
})

CocConfig

{
  "coc.preferences.formatOnSaveFiletypes": [
    "css",
    "markdown",
    "php",
    "python",
    "html"
  ],
  "languageserver": {
    "sql": {
      "command": "sqls",
      "args": ["-config", "$HOME/.config/sqls/config.yml"],
      "filetypes": ["sql"],
      "shell": true
    }
  }
}

config.yml SQLS

lowercaseKeywords: false
connections:
  - alias: mssql_connection_pba
    driver: mssql
    proto: tcp
    user: user
    passwd: pass
    host: host
    port: port
    dbName: DBNAME
  - alias: mssql_connection_prod
    driver: mssql
    proto: tcp
    user: user
    passwd: pass
    host: host
    port: port
    dbName: dbNAME

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions