Skip to content

Commit 4a6995b

Browse files
committed
feat: add auto completion with lua_ls
1 parent fce383d commit 4a6995b

File tree

4 files changed

+37
-4
lines changed

4 files changed

+37
-4
lines changed

.neoconf.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"neodev": {
33
"library": {
44
"enabled": true,
5-
"plugins": true
5+
"plugins": ["heirline.nvim"]
66
}
77
},
88
"neoconf": {
@@ -15,9 +15,7 @@
1515
"lspconfig": {
1616
"lua_ls": {
1717
"Lua.format.enable": false,
18-
"Lua.diagnostics.globals": [
19-
"astronvim"
20-
]
18+
"Lua.diagnostics.globals": ["astronvim"]
2119
}
2220
}
2321
}

lua/astroui/config.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
-- @copyright 2023
99
-- @license GNU General Public License v3.0
1010

11+
---@type AstroUIConfig
1112
return {
1213
--- Colorscheme set on startup
1314
-- @usage colorscheme = "astrodark"

lua/astroui/init.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ local M = {}
1212

1313
M.config = require "astroui.config"
1414

15+
--- Setup and configure AstroUI
16+
---@param opts AstroUIConfig
17+
---@see astroui.config
1518
function M.setup(opts)
1619
M.config = vim.tbl_deep_extend("force", M.config, opts)
1720

lua/astroui/types.lua

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---@meta
2+
3+
---@alias AstroUIIconHighlight (fun(self:table):boolean)|boolean
4+
---@alias AstroUIIconTable table<string,string>
5+
6+
---@class AstroUIFullIconHighlights
7+
---@field tabline AstroUIIconHighlight?
8+
---@field statusline AstroUIIconHighlight?
9+
---@field winbar AstroUIIconHighlight?
10+
11+
---@class AstroUIIconHighlights
12+
---@field breadcrumbs AstroUIIconHighlight?
13+
---@field file_icon AstroUIFullIconHighlights?
14+
15+
---@class AstroUIStatusOpts
16+
---@field attributes table<string,table>?
17+
---@field buf_matchers table<string,fun(pattern_list:string[],bufnr:integer):boolean>?
18+
---@field colors table<string,string>?
19+
---@field fallback_colors table<string,string>?
20+
---@field icon_hignlights AstroUIIconHighlights?
21+
---@field modes table<string,string[]>?
22+
---@field separators table<string,string[]|string>?
23+
---@field setup_colors (fun():table)?
24+
---@field sign_handlers table<string,fun(args:table)>?
25+
26+
---@class AstroUIConfig
27+
---@field colorscheme string?
28+
---@field highlights table<string,table<string,table>>?
29+
---@field icons AstroUIIconTable?
30+
---@field text_icons AstroUIIconTable?
31+
---@field status AstroUIStatusOpts?

0 commit comments

Comments
 (0)