mirror of
https://github.com/Cian-H/my_nvim_config.git
synced 2025-12-22 20:21:57 +00:00
Added emmylua annotations where valuable
This commit is contained in:
@@ -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 = "",
|
||||
|
||||
@@ -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 {
|
||||
{
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
---@type Keymap[]
|
||||
local keys = require("config.keys").globals
|
||||
|
||||
for _, map in ipairs(keys) do
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user