From 77d74fac16931b1e33dba9a479bb5bb63571415a Mon Sep 17 00:00:00 2001 From: Damjan 9000 Date: Sun, 15 Mar 2026 20:24:45 +0100 Subject: [PATCH] Add type hints to plugins that were extracted from init.lua Based on: commit 177ff6148391742ccb7aaa93c05b95cd6fc853e2 Author: orip AuthorDate: Sat Apr 26 14:35:04 2025 +0300 Add type hints to plugin options where possible This could help beginners to get autocompletion, catch mistakes earlier, and allow them to skip the docs for simple configs. This is not perfect because a lot of the plugins type all of their keys as required, even though they have defaults, but this is good enough. --- lua/kickstart/plugins/blink-cmp.lua | 2 ++ lua/kickstart/plugins/conform.lua | 2 ++ lua/kickstart/plugins/lspconfig.lua | 2 ++ lua/kickstart/plugins/mini.lua | 2 ++ lua/kickstart/plugins/telescope.lua | 2 ++ lua/kickstart/plugins/todo-comments.lua | 2 ++ lua/kickstart/plugins/tokyonight.lua | 2 ++ lua/kickstart/plugins/treesitter.lua | 2 ++ lua/kickstart/plugins/which-key.lua | 2 ++ 9 files changed, 18 insertions(+) diff --git a/lua/kickstart/plugins/blink-cmp.lua b/lua/kickstart/plugins/blink-cmp.lua index f89eb89..4ec7416 100644 --- a/lua/kickstart/plugins/blink-cmp.lua +++ b/lua/kickstart/plugins/blink-cmp.lua @@ -1,3 +1,5 @@ +---@module 'lazy' +---@type LazySpec return { { -- Autocompletion 'saghen/blink.cmp', diff --git a/lua/kickstart/plugins/conform.lua b/lua/kickstart/plugins/conform.lua index 6179f68..ebae08f 100644 --- a/lua/kickstart/plugins/conform.lua +++ b/lua/kickstart/plugins/conform.lua @@ -1,3 +1,5 @@ +---@module 'lazy' +---@type LazySpec return { { -- Autoformat 'stevearc/conform.nvim', diff --git a/lua/kickstart/plugins/lspconfig.lua b/lua/kickstart/plugins/lspconfig.lua index 8dbd566..0d114ad 100644 --- a/lua/kickstart/plugins/lspconfig.lua +++ b/lua/kickstart/plugins/lspconfig.lua @@ -1,4 +1,6 @@ -- LSP Plugins +---@module 'lazy' +---@type LazySpec return { { -- Main LSP Configuration diff --git a/lua/kickstart/plugins/mini.lua b/lua/kickstart/plugins/mini.lua index 98f2e64..0bd1629 100644 --- a/lua/kickstart/plugins/mini.lua +++ b/lua/kickstart/plugins/mini.lua @@ -1,3 +1,5 @@ +---@module 'lazy' +---@type LazySpec return { { -- Collection of various small independent plugins/modules 'nvim-mini/mini.nvim', diff --git a/lua/kickstart/plugins/telescope.lua b/lua/kickstart/plugins/telescope.lua index e5fc308..8eb8581 100644 --- a/lua/kickstart/plugins/telescope.lua +++ b/lua/kickstart/plugins/telescope.lua @@ -5,6 +5,8 @@ -- -- Use the `dependencies` key to specify the dependencies of a particular plugin +---@module 'lazy' +---@type LazySpec return { { -- Fuzzy Finder (files, lsp, etc) 'nvim-telescope/telescope.nvim', diff --git a/lua/kickstart/plugins/todo-comments.lua b/lua/kickstart/plugins/todo-comments.lua index f1da5c1..d678d18 100644 --- a/lua/kickstart/plugins/todo-comments.lua +++ b/lua/kickstart/plugins/todo-comments.lua @@ -1,4 +1,6 @@ -- Highlight todo, notes, etc in comments +---@module 'lazy' +---@type LazySpec return { { 'folke/todo-comments.nvim', diff --git a/lua/kickstart/plugins/tokyonight.lua b/lua/kickstart/plugins/tokyonight.lua index 1b32f79..8c4b375 100644 --- a/lua/kickstart/plugins/tokyonight.lua +++ b/lua/kickstart/plugins/tokyonight.lua @@ -1,3 +1,5 @@ +---@module 'lazy' +---@type LazySpec return { { -- You can easily change to a different colorscheme. -- Change the name of the colorscheme plugin below, and then diff --git a/lua/kickstart/plugins/treesitter.lua b/lua/kickstart/plugins/treesitter.lua index 9c6fe27..25196e9 100644 --- a/lua/kickstart/plugins/treesitter.lua +++ b/lua/kickstart/plugins/treesitter.lua @@ -1,3 +1,5 @@ +---@module 'lazy' +---@type LazySpec return { { -- Highlight, edit, and navigate code 'nvim-treesitter/nvim-treesitter', diff --git a/lua/kickstart/plugins/which-key.lua b/lua/kickstart/plugins/which-key.lua index 21d4120..ae282df 100644 --- a/lua/kickstart/plugins/which-key.lua +++ b/lua/kickstart/plugins/which-key.lua @@ -12,6 +12,8 @@ -- Then, because we use the `opts` key (recommended), the configuration runs -- after the plugin has been loaded as `require(MODULE).setup(opts)`. +---@module 'lazy' +---@type LazySpec return { { -- Useful plugin to show you pending keybinds. 'folke/which-key.nvim',