Added emmylua annotations where valuable

This commit is contained in:
2025-12-22 15:11:39 +00:00
parent 94c3b2e55e
commit 9296eb6b20
5 changed files with 26 additions and 0 deletions

View File

@@ -1,3 +1,10 @@
---@class IconDef
---@field icon string
---@field color string
---@field cterm_color string
---@field name string
---@type table<string, IconDef>
return {
Ada = {
icon = "",

View File

@@ -1,3 +1,13 @@
---@class Keymap
---@field [1] string LHS key
---@field [2] string|function RHS command or function
---@field desc string Description for which-key/vim.keymap
---@field mode? string|string[] Mode (n, v, i, etc.)
---@field expr? boolean Whether to use expression mapping
---@class KeyConfig : table<string, Keymap>
---@type KeyConfig
return {
groups = {
{ "<leader>s", group = "[S]earch", icon = "" },
@@ -310,6 +320,7 @@ return {
mode = "n",
},
},
---@param telescope_builtin table
telescope = function(telescope_builtin)
return {
{

View File

@@ -1,3 +1,4 @@
---@type Keymap[]
local keys = require("config.keys").globals
for _, map in ipairs(keys) do

View File

@@ -10,6 +10,7 @@ return {
config = function()
vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("kickstart-lsp-attach", { clear = true }),
---@param event { buf: number, data: { client_id: number } }
callback = function(event)
local lsp_keys = require("config.keys").lsp
for _, map in ipairs(lsp_keys) do

View File

@@ -38,6 +38,12 @@ return { -- Mini is so varied it's hard to categorise. So i dumped my mini insta
require("mini.trailspace").setup()
-- My custom mini.starter config
---@class StarterItem
---@field name string
---@field action string|function
---@field section string
---@type StarterItem[]
local starter_items = {
{
action = "Telescope file_browser",