diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml new file mode 100644 index 0000000..5229717 --- /dev/null +++ b/.pre-commit-hooks.yaml @@ -0,0 +1,8 @@ +- id: sourcery + name: sourcery + description: Magically refactor Python + language: python + additional_dependencies: [sourcery-cli==0.8.0] + entry: sourcery refactor --check + require_serial: true + types: [python] diff --git a/WritingAnLSPClient.md b/WritingAnLSPClient.md index cf9d506..769f7a8 100644 --- a/WritingAnLSPClient.md +++ b/WritingAnLSPClient.md @@ -20,7 +20,7 @@ Verifying refactoring functionality - success ``` ## Startup and Initialisation -The client communicates with The Sourcery Language Server through standard input and output. To run the Sourcery Language Server execute `path_to_binary/sourcery --lsp`. +The client communicates with The Sourcery Language Server through standard input and output. To run the Sourcery Language Server execute `path_to_binary/sourcery lsp`. The Sourcery Server is initialised with the standard [LSP initialize request](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#initialize). It requires the `initializationOptions` param to be populated as shown below and will respond with the list of ServerCapabilities that it supports. diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..eea426b --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,4 @@ +[project] +name = "sourcery" +version = "0.8.0" +description = "Magically refactor Python"