-
Notifications
You must be signed in to change notification settings - Fork 54
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
[WIP / DO NOT MERGE] Initial LSP implementation #1573
base: main
Are you sure you want to change the base?
Conversation
't show here
…if lsp_commands are changed the version will get updated
from snowflake.cli.api.output.types import MessageResult | ||
from snowflake.cli.api.project.definition_manager import DefinitionManager | ||
from snowflake.cli.plugins.lsp.server import lsp_plugin | ||
from snowflake.cli.plugins.nativeapp.manager import NativeAppManagern |
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.
broken import, typo
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.
from snowflake.cli.plugins.nativeapp.manager import NativeAppManagern | |
from snowflake.cli._plugins.nativeapp.manager import NativeAppManager |
from snowflake.cli.api.cli_global_context import get_cli_context | ||
from snowflake.cli.api.output.types import MessageResult | ||
from snowflake.cli.api.project.definition_manager import DefinitionManager | ||
from snowflake.cli.plugins.lsp.server import lsp_plugin |
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.
broken import, lsp_plugin
does not exist
raise ValueError("Expected exactly one CommandArguments object") | ||
|
||
try: | ||
args = TypeAdapter(CommandArguments).validate_python(params[0] if len(params) == 1 else {}) |
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 would explicitly handle unexpected args, at least I would log the event, silently continuing could make it very hard to debug something unexpected
Pre-review checklist
Changes description
This is the initial LSP implementation that has not yet been refactored to use
fork_cli_context
. It does not currently function correctly.