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
Add sql-language-server #326
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
9249aaf
Add sql-language-server
krassowski f3ee31b
Add CHANGELOG entry for sql server
krassowski 550e34a
Try to require newer node for docs
krassowski c6272e7
Set the RTD node version in the correct file
krassowski 954bcac
Try to add conda-forge for rtd?
krassowski 19a2755
Rename sql_langserver to sql_language_server
krassowski File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
SELECT * FR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
py_src/jupyter_lsp/specs/config/sql-language-server.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{ | ||
"properties": { | ||
"personalConfig": { | ||
"connections": { | ||
"type": "array", | ||
"default": [ | ||
{ | ||
"name": "default sqlite3 connection", | ||
"adapter": "sqlite3", | ||
"filename": ":memory:", | ||
"projectPaths": ["."] | ||
} | ||
], | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"description": "Connection name (free-form text)", | ||
"type": "string" | ||
}, | ||
"adapter": { | ||
"description": "Database type", | ||
"type": "string", | ||
"enum": ["mysql", "postgresql", "postgres", "sqlite3"] | ||
}, | ||
"host": { | ||
"description": "Database host", | ||
"type": "string" | ||
}, | ||
"port": { | ||
"description": "Database port", | ||
"type": "number" | ||
}, | ||
"user": { | ||
"description": "Database user", | ||
"type": "string" | ||
}, | ||
"database": { | ||
"description": "Database name", | ||
"type": "string" | ||
}, | ||
"password": { | ||
"description": "Database password", | ||
"type": "string" | ||
}, | ||
"filename": { | ||
"description": "Database filename - only for sqlite3 (required); use ':memory:' for in-memory database", | ||
"type": "string" | ||
}, | ||
"projectPaths": { | ||
"description": "Project path that you want to apply (if you don't set it configuration will not apply automatically when lsp's started up)", | ||
"type": "array", | ||
"items": { "type": "string" } | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from .config import load_config_schema | ||
from .utils import NodeModuleSpec | ||
|
||
|
||
class SQLLanguageServer(NodeModuleSpec): | ||
"""Supports mysql, postgres and sqlite3""" | ||
|
||
node_module = key = "sql-language-server" | ||
script = ["dist", "bin", "cli.js"] | ||
languages = [ | ||
"sql", | ||
] | ||
args = ["up", "--method", "stdio"] | ||
spec = dict( | ||
display_name=key, | ||
mime_types=[ | ||
"application/sql", | ||
"text/sql", | ||
"text/x-sql", | ||
"text/x-mysql", | ||
"text/x-mariadb", | ||
"text/x-pgsql", | ||
], | ||
urls=dict( | ||
home="https://github.com/joe-re/{}".format(key), | ||
issues="https://github.com/joe-re/{}/issues".format(key), | ||
), | ||
install=dict( | ||
npm="npm install --save-dev {}".format(key), | ||
yarn="yarn add --dev {}".format(key), | ||
jlpm="jlpm add --dev {}".format(key), | ||
), | ||
config_schema=load_config_schema(key), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe make
sql_language_server
for consistency....There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was also thinking whether we need to have nodejs prefix on
DockerfileLanguageServerNodeJS
etc. I guess that it might have been used to distinguish potential alternative implementations, right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And more user-facing, we could change the display name of
vscode-html-languageserver-bin
to (at least) remove-bin
suffix.