fix: types (#1344)

This commit is contained in:
yetone
2025-02-22 23:24:20 +08:00
committed by GitHub
parent 0704a5820a
commit b04bffa441
23 changed files with 493 additions and 328 deletions

31
.github/workflows/.luarc.json vendored Normal file
View File

@@ -0,0 +1,31 @@
{
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
"runtime": {
"version": "LuaJIT",
"pathStrict": true
},
"workspace": {
"library": [
"$VIMRUNTIME/lua",
"$VIMRUNTIME/lua/vim/lsp",
"$PWD/lua",
"${3rd}/luv/library",
"$DEPS_PATH/luvit-meta/library",
"$DEPS_PATH/lazy.nvim/lua",
"$DEPS_PATH/nvim-treesitter/lua",
"$DEPS_PATH/dressing.nvim/lua",
"$DEPS_PATH/plenary.nvim/lua",
"$DEPS_PATH/nui.nvim/lua",
"$DEPS_PATH/mini.pick/lua",
"$DEPS_PATH/telescope.nvim/lua",
"$DEPS_PATH/nvim-cmp/lua",
"$DEPS_PATH/fzf-lua/lua",
"$DEPS_PATH/nvim-web-devicons/lua",
"$DEPS_PATH/copilot.lua/lua"
],
"ignoreDir": [
"/lua"
],
"checkThirdParty": false
}
}

View File

@@ -74,3 +74,98 @@ jobs:
uses: lunarmodules/luacheck@cc089e3f65acdd1ef8716cc73a3eca24a6b845e4 # ratchet:lunarmodules/luacheck@v1
with:
args: ./lua/
typecheck:
name: Typecheck
runs-on: ubuntu-latest
strategy:
matrix:
nvim_version: [ stable ]
luals_version: [ 3.11.0 ]
steps:
- name: Checkout dependency neodev
uses: actions/checkout@v3
with:
repository: "folke/neodev.nvim"
path: "deps/neodev.nvim"
- name: Checkout dependency nvim-treesitter
uses: actions/checkout@v3
with:
repository: "nvim-treesitter/nvim-treesitter"
path: "deps/nvim-treesitter"
- name: Checkout dependency dressing.nvim
uses: actions/checkout@v3
with:
repository: "stevearc/dressing.nvim"
path: "deps/dressing.nvim"
- name: Checkout dependency plenary.nvim
uses: actions/checkout@v3
with:
repository: "nvim-lua/plenary.nvim"
path: "deps/plenary.nvim"
- name: Checkout dependency nui.nvim
uses: actions/checkout@v3
with:
repository: "MunifTanjim/nui.nvim"
path: "deps/nui.nvim"
- name: Checkout dependency mini.pick
uses: actions/checkout@v3
with:
repository: "echasnovski/mini.nvim"
path: "deps/mini.nvim"
- name: Checkout dependency telescope.nvim
uses: actions/checkout@v3
with:
repository: "nvim-telescope/telescope.nvim"
- name: Checkout dependency nvim-cmp
uses: actions/checkout@v3
with:
repository: "hrsh7th/nvim-cmp"
path: "deps/nvim-cmp"
- name: Checkout dependency fzf-lua
uses: actions/checkout@v3
with:
repository: "ibhagwan/fzf-lua"
path: "deps/fzf-lua"
- name: Checkout dependency nvim-web-devicons
uses: actions/checkout@v3
with:
repository: "nvim-tree/nvim-web-devicons"
path: "deps/nvim-web-devicons"
- name: Checkout dependency copilot.lua
uses: actions/checkout@v3
with:
repository: "zbirenbaum/copilot.lua"
path: "deps/copilot.lua"
- uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: ${{ matrix.nvim_version }}
- name: Checkout Code
uses: actions/checkout@v3
- name: Install luals
run: |
mkdir -p luals
curl -L "https://github.com/LuaLS/lua-language-server/releases/download/${{ matrix.luals_version }}/lua-language-server-${{ matrix.luals_version }}-linux-x64.tar.gz" | tar zx --directory luals
- run: echo "luals/bin" >> "$GITHUB_PATH"
- name: Typecheck
env:
VIMRUNTIME: /home/runner/nvim-${{ matrix.nvim_version }}/share/nvim/runtime
DEPS_PATH: /github/workspace/deps/
run: |
make lua-typecheck