chore: add pre-commit workflow (#72)

* chore: add pre-commit workflow

* fix pre-commit
add-more-languages
Meng Zhang 2023-04-09 20:17:56 +08:00 committed by GitHub
parent 9915c57e02
commit e28877fbbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 20 additions and 8 deletions

14
.github/workflows/pre-commit.yml vendored Normal file
View File

@ -0,0 +1,14 @@
name: pre-commit
on:
pull_request:
push:
branches: [main]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.0

View File

@ -34,4 +34,3 @@
1. In insert mode, Tabby will show code suggestion when you stop typing. Press `<Tab>` to accpet the current suggestion, `<M-]>` to see the next suggestion, `<M-[>` to see previous suggestion, or `<C-]>` to dismiss. 1. In insert mode, Tabby will show code suggestion when you stop typing. Press `<Tab>` to accpet the current suggestion, `<M-]>` to see the next suggestion, `<M-[>` to see previous suggestion, or `<C-]>` to dismiss.
2. Use command `:Tabby enable` to enable, `:Tabby disable` to disable Tabby, and `:Tabby status` to check status. 2. Use command `:Tabby enable` to enable, `:Tabby disable` to disable Tabby, and `:Tabby status` to check status.

View File

@ -25,4 +25,3 @@ augroup tabby
autocmd BufLeave * call tabby#Clear() autocmd BufLeave * call tabby#Clear()
autocmd InsertLeave * call tabby#Clear() autocmd InsertLeave * call tabby#Clear()
augroup END augroup END

View File

@ -77,4 +77,3 @@ function toDisabled() {
item.tooltip = "Tabby is disabled. Click to enable."; item.tooltip = "Tabby is disabled. Click to enable.";
item.command = "tabby.toggleEnabled"; item.command = "tabby.toggleEnabled";
} }

View File

@ -8,6 +8,7 @@ class Choice(BaseModel):
index: int index: int
text: str text: str
# https://code.visualstudio.com/docs/languages/identifiers # https://code.visualstudio.com/docs/languages/identifiers
class Language(str, Enum): class Language(str, Enum):
UNKNOWN = "unknown" UNKNOWN = "unknown"