Skip to content

Add support for .sql like files along .ps1 (PowerShell) ,.csv, ang .log files as well #2

@bill-ramos-rmoswi

Description

@bill-ramos-rmoswi

Background

I'm a big user of Cursor and VS Code for database application development. Especially with PostgreSQL and SQL Server. PowerShell is my main scripting language with a shift to Python. I was reading Chris Dunlop's blog post on keeping file sizes small for Cursor and he recommended your VS Code extension.

I want to share this with the folks in the consulting group I work for, but the limitation of supported extensions is holding me back.

Support for SQL supported file extensions

As a consulting practice specializing in GenAI assisted migrations, currently use VS Code for several SQL language extensions for SQL Server, PostgreSQL, and Oracle with different file extensions for each defined in settings.json as:

    "files.associations": {
        "*.plsql": "oracle",
        "*.sql": "sql",
        "*.pgsql": "postgresql"
    },
    "[oracle]": {
        "editor.defaultFormatter": "Oracle.oracledevtools"
    },
    "[sql]": {
        "editor.defaultFormatter": "ms-mssql.mssql"
    },
    "[postgresql]": {
        "editor.defaultFormatter": "bradymholt.pgformatter"
    },

However, none of these display the line numbers. See below

Image

Support for PowerShell

While databases are my primary coding language and your tool, PowerShell is my main scripting language. Everyone here uses Python as well - and it works great! However, the PowerShell is the default for SQL Server developer and operations people. Here is a list of the typical extensions used for PowerShell scripting.

| File Extension | Description |
|---------------|-------------|
| `.ps1`       | PowerShell script file |
| `.psm1`      | PowerShell module file |
| `.psd1`      | PowerShell data file (module manifest) |
| `.ps1xml`    | PowerShell XML file (format and type definitions) |
| `.pssc`      | PowerShell session configuration file |
| `.psrc`      | PowerShell role capability file |
| `.cdxml`     | PowerShell Cmdlet definition XML file |

Support for CSV files

All the SQL Server tools make it easy to output data to .csv files and having the file sizes shown in the VS Code and Cursor can warn me if I need to load the data into Excel or just view the data in the IDE. My main concern is sending too much data to the Cursor / GitHub Copilot chat and consuming all my input tokens.

Log files

I'm constantly creating debug Log files or downloading them from Cloud providers. Again, knowing the length of the file will prevent me from pasting too much into Chat tools.

Thanks!
Bill

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions