Skip to content

Commit

Permalink
ci: use nvim-typecheck-action for simpler type checking setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mikavilpas committed Jun 2, 2024
1 parent db690a7 commit aed05d5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 54 deletions.
13 changes: 0 additions & 13 deletions .github/workflows/.luarc.json

This file was deleted.

50 changes: 11 additions & 39 deletions .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,22 @@
# copied from https://github.com/nvim-neorg/neorg/blob/1e63f84f04caed4b8831b8122c4ba2e7dbda389f/.github/workflows/typecheck.yml#L17
name: Type check the code base
---
name: Type check
on:
pull_request: ~
push:
branches:
- "*"
- master

jobs:
build:
name: Type Check Code Base
name: Type check
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/[email protected]

- name: Checkout dependency neodev # get neodev and neovim/runtime for builtin types
uses: actions/[email protected]
with:
repository: "folke/neodev.nvim"
path: "deps/neodev.nvim"

- name: Checkout dependency plenary
uses: actions/[email protected]
with:
repository: "nvim-lua/plenary.nvim"
path: "deps/plenary.nvim"

- name: Checkout neovim for type annotations
uses: actions/[email protected]
with:
repository: "neovim/neovim"
path: "deps/neovim"

- uses: leafo/[email protected] # get luarocks dependencies for their types (eg `PathlibPath`)
with:
luaVersion: "5.1"
- uses: leafo/[email protected]
- name: install dependencies
run: |
luarocks init
luarocks install --only-deps ./*.rockspec
- name: Typecheck the code base
uses: mrcjkb/[email protected]
- uses: actions/checkout@v4
- uses: stevearc/nvim-typecheck-action@v2
with:
configpath: .github/workflows/.luarc.json
directories: |
lua
path: lua
level: Information
libraries:
# space separated
https://github.com/nvim-lua/plenary.nvim
6 changes: 4 additions & 2 deletions lua/yazi/types.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
-- TODO all config properties are optional when given, but mandatory inside the plugin

---@module "plenary.path"

---@class (exact) YaziConfig
---@field public open_for_directories? boolean
---@field public chosen_file_path? string "the path to a temporary file that will be created by yazi to store the chosen file path"
Expand All @@ -9,8 +11,8 @@
---@field public set_keymappings_function? fun(buffer: integer, config: YaziConfig): nil "the function that will set the keymappings for the yazi floating window. It will be called after the floating window is created."
---@field public hooks? YaziConfigHooks
---@field public integrations? YaziConfigIntegrations
---@field public floating_window_scaling_factor? float "the scaling factor for the floating window. 1 means 100%, 0.9 means 90%, etc."
---@field public yazi_floating_window_winblend? float "the transparency of the yazi floating window (0-100). See :h winblend"
---@field public floating_window_scaling_factor? number "the scaling factor for the floating window. 1 means 100%, 0.9 means 90%, etc."
---@field public yazi_floating_window_winblend? number "the transparency of the yazi floating window (0-100). See :h winblend"
---@field public yazi_floating_window_border? any "the type of border to use. See nvim_open_win() for the values your neovim version supports"
---@field public log_level? yazi.LogLevel

Expand Down

0 comments on commit aed05d5

Please sign in to comment.