CLI: allow -n for --name. Formatting. [ci skip]

This commit is contained in:
MischaPanch authored and Michael Panchenko committed 2025-07-26 14:29:33 +02:00
1 parent 741bb31547
commit 6e5f3d7165
3 files changed
+8 -6

No files matched your search

+4
View File
@@ -245,6 +245,8 @@ class ModeCommands(AutoRegisteringGroup):
@click.command("create", help="Create a new mode or copy an internal one.")
@click.option(
"--name",
"-n",
multiple=True,
type=str,
default=None,
help="Name for the new mode. If --from-internal is passed may be left empty to create a mode of the same name, which will then override the internal mode.",
@@ -321,6 +323,8 @@ class ContextCommands(AutoRegisteringGroup):
@click.command("create", help="Create a new context or copy an internal one.")
@click.option(
"--name",
"-n",
multiple=True,
type=str,
default=None,
help="Name for the new context. If --from-internal is passed may be left empty to create a context of the same name, which will then override the internal context",
+3 -6
View File
@@ -709,10 +709,8 @@ class SolidLanguageServer(ABC):
ret.append(ls_types.Location(**new_item))
return ret
def request_text_document_diagnostics(
self, relative_file_path: str
) -> list[ls_types.Diagnostic]:
def request_text_document_diagnostics(self, relative_file_path: str) -> list[ls_types.Diagnostic]:
"""
Raise a [textDocument/diagnostic](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_diagnostic) request to the Language Server
to find diagnostics for the given file. Wait for the response and return the result.
@@ -748,7 +746,7 @@ class SolidLanguageServer(ABC):
"severity": item["severity"],
"message": item["message"],
"range": item["range"],
"code": item["code"]
"code": item["code"],
}
ret.append(ls_types.Diagnostic(new_item))
@@ -1577,7 +1575,6 @@ class SolidLanguageServer(ABC):
defining_symbol = self.request_containing_symbol(def_path, def_line, def_col, strict=False, include_body=include_body)
return defining_symbol
@property
def cache_path(self) -> Path:
+1
View File
@@ -318,6 +318,7 @@ class Hover(TypedDict):
""" An optional range inside the text document that is used to
visualize the hover, e.g. by changing the background color. """
class DiagnosticsSeverity(IntEnum):
ERROR = 1
WARNING = 2