Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not show columns only tables #169

Open
4DRIAN0RTIZ opened this issue Oct 16, 2024 · 0 comments
Open

Not show columns only tables #169

4DRIAN0RTIZ opened this issue Oct 16, 2024 · 0 comments

Comments

@4DRIAN0RTIZ
Copy link

**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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant