diff options
| -rw-r--r-- | .github/ci/lint.sh | 9 | ||||
| -rw-r--r-- | lsp/copilot.lua | 1 | ||||
| -rw-r--r-- | lsp/volar.lua | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/.github/ci/lint.sh b/.github/ci/lint.sh index d5a0eb2e..5b774f92 100644 --- a/.github/ci/lint.sh +++ b/.github/ci/lint.sh @@ -35,6 +35,14 @@ _check_brief_placement() { fi } +# Returned object should have `---@type vim.lsp.Config` annotation. +# TODO: use luals/emmylua type checking in CI: https://github.com/neovim/neovim/pull/33344 +_check_type() { + if git grep --files-without-match '\-\-\-\@type vim\.lsp\.Config' -- 'lsp/*.lua' ; then + _fail 'Missing `---@type vim.lsp.Config` annotation.' + fi +} + # Enforce "Lsp" prefix on all user commands. _check_lsp_cmd_prefix() { local exclude='tinymist' @@ -92,6 +100,7 @@ _check_legacy_configs() { _check_generated_docs _check_cmd_buflocal _check_brief_placement +_check_type _check_lsp_cmd_prefix _check_exec_cmd _check_deprecated_in_nvim_0_11 diff --git a/lsp/copilot.lua b/lsp/copilot.lua index 690cd153..1184770b 100644 --- a/lsp/copilot.lua +++ b/lsp/copilot.lua @@ -75,6 +75,7 @@ local function sign_out(_, client) ) end +---@type vim.lsp.Config return { cmd = { 'copilot-language-server', diff --git a/lsp/volar.lua b/lsp/volar.lua index bfa4bc9a..8b0cfefd 100644 --- a/lsp/volar.lua +++ b/lsp/volar.lua @@ -5,4 +5,5 @@ --- vim.deprecate('volar', 'vue_ls', '3.0.0', 'lspconfig', false) +---@type vim.lsp.Config return vim.lsp.config.vue_ls |
