Skip to content

Commit 7b84ef0

Browse files
committed
adding docs, adding icon logic
1 parent 23f2982 commit 7b84ef0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+8258
-3843
lines changed

TODO.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Todo
22

3+
## High priority
4+
5+
### New features
6+
7+
- [ ] Implement `bookmark` mod
8+
- [ ] Implement `date` and `time` completion insert
9+
310
## Project Maintenance
411

512
- [ ] Implement CI/CD for the project

doc/down.txt

Lines changed: 4001 additions & 0 deletions
Large diffs are not rendered by default.

lua/down/config.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
local log = require("down.util.log")
22
local mod = require("down.mod")
3-
local modconf = require("down.util.mod")
3+
local modconf = require("down.mod.util")
44

55
--- The down.nvim configuration
66
--- @class down.config.Config

lua/down/health.lua

Lines changed: 32 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,45 +4,43 @@ local h = vim.health
44
local start = vim.health.start
55
local ok, err, warn = h.ok, h.error, h.warn
66

7-
H.mod = function()
8-
if require('down.config').mod == nil then
9-
h.error 'config.mod is nil'
7+
H.user = function()
8+
if require("down.config").user == nil then
9+
h.error("config.mod is nil")
1010
else
11-
h.ok 'config.mod is not nil'
11+
h.ok("config.mod is not nil")
1212
end
1313
end
1414

1515
H.workspace = function()
16-
if require('down.config').mod.workspace.config.workspaces == nil then
17-
h.error 'config.mod.workspace.workspaces is nil'
16+
if require("down.config").user.workspace.config.workspaces == nil then
17+
h.error("config.mod.workspace.workspaces is nil")
1818
else
19-
h.ok 'config.mod.workspace.workspaces is not nil'
20-
end
21-
end
22-
23-
H.user = function()
24-
if require('down.config').user == nil then
25-
h.error 'config.user is nil'
26-
else
27-
h.ok 'config.user is not nil'
19+
h.ok("config.mod.workspace.workspaces is not nil")
2820
end
2921
end
3022

3123
H.deps = {
32-
['nvim-treesitter'] = 'nvim-treesitter/nvim-treesitter',
33-
['plenary.nvim'] = 'nvim-lua/plenary.nvim',
34-
['dressing.nvim'] = 'stevearc/dressing.nvim',
35-
['nui.nvim'] = "MunifTanjim/nui.nvim"
24+
["nvim-treesitter"] = "nvim-treesitter/nvim-treesitter",
25+
["plenary.nvim"] = "nvim-lua/plenary.nvim",
26+
["nui.nvim"] = "MunifTanjim/nui.nvim",
3627
}
3728

3829
H.optional = {
39-
['telescope.nvim'] = 'nvim-telescope/telescope.nvim',
30+
["telescope.nvim"] = "nvim-telescope/telescope.nvim",
4031
["nvim-web-devicons"] = "kyazdani42/nvim-web-devicons",
41-
["mini.icons"] = "wuelnerdotexe/mini.icons"
32+
["mini.icons"] = "wuelnerdotexe/mini.icons",
4233
}
4334

35+
---@param i? down.mod.ui.icon.Provider.Name
36+
H.has_icon_provider = function(i)
37+
if require("down.mod.ui.icon.util").has_provider(i) then
38+
return h.ok("Icon provider is available")
39+
end
40+
end
41+
4442
H.check_dep = function(dep)
45-
local lazyok, lazy = pcall(require, 'lazy.core.config')
43+
local lazyok, lazy = pcall(require, "lazy.core.config")
4644
if lazyok then
4745
return lazy.plugins[dep] ~= nil
4846
else
@@ -51,35 +49,36 @@ H.check_dep = function(dep)
5149
end
5250

5351
H.check_optional = function()
54-
if H.check_dep('telescope.nvim') then
55-
h.ok(H.optional['telescope.nvim'] .. ' is installed')
52+
if H.check_dep("telescope.nvim") then
53+
h.ok(H.optional["telescope.nvim"] .. " is installed")
5654
else
57-
h.warn(H.optional['telescope.nvim'] .. ' is not installed')
55+
h.warn(H.optional["telescope.nvim"] .. " is not installed")
5856
end
59-
if H.check_dep('nvim-web-devicons')
60-
or H.check_dep('mini.icons') then
61-
h.warn(H.optional['mini.icons'] .. ' is not installed')
57+
if H.check_dep("nvim-web-devicons") or H.check_dep("mini.icons") then
58+
h.warn(H.optional["mini.icons"] .. " is not installed")
6259
else
63-
h.warn(H.optional['mini.icons'] or H.optional['nvim-web-devicons'] .. ' is not installed')
60+
h.warn(
61+
H.optional["mini.icons"]
62+
or H.optional["nvim-web-devicons"] .. " is not installed"
63+
)
6464
end
6565
end
6666

6767
H.check_req = function()
6868
for dep, repo in pairs(H.deps) do
6969
if H.check_dep(dep) then
70-
h.ok(dep .. ' is installed')
70+
h.ok(dep .. " is installed" .. repo)
7171
else
72-
h.error(dep .. ' is not installed')
72+
h.error(dep .. " is not installed" .. repo)
7373
end
7474
end
7575
end
7676

7777
H.check = function()
78-
h.start 'down.nvim'
78+
h.start("down.nvim")
7979
H.check_optional()
8080
H.check_req()
8181
H.user()
82-
H.mod()
8382
H.workspace()
8483
end
8584

lua/down/mod.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
local Event = require("down.event")
2-
local modutil = require("down.util.mod")
2+
local modutil = require("down.mod.util")
33
local util = require("down.util")
44
local log = util.log
55

0 commit comments

Comments
 (0)