diff --git a/.luarc.json b/.luarc.json
index e0182c7..6644ad1 100644
--- a/.luarc.json
+++ b/.luarc.json
@@ -1,6 +1,19 @@
{
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
"workspace.checkThirdParty": false,
+ "semantic.annotation": true,
+ "semantic.keyword": true,
+ "semantic.variable": true,
+ "hover.previewFields": 10,
+ "language.completeAnnotation": true,
+ "completion.autoRequire": true,
+ "completion.postfix": "@",
+ "signatureHelp": {
+ "enable": true
+ },
+ "addonManager": {
+ "enable": true
+ },
"hover.enable": true,
"addonManager.enable": true,
"type.inferTableSize": 10,
@@ -25,8 +38,15 @@
},
"workspace.maxPreload": 1600,
"workspace.preloadFileSize": 1000,
- "diagnostics.unusedLocalExclude": ["_*"],
- "diagnostics.globals": ["vim", "coroutine", "require", "bit"],
+ "diagnostics.unusedLocalExclude": [
+ "_*"
+ ],
+ "diagnostics.globals": [
+ "vim",
+ "coroutine",
+ "require",
+ "bit"
+ ],
"diagnostics.disable": [
"close-non-object",
"deprecated",
diff --git a/.stylua.toml b/.stylua.toml
index 52f48fb..b316890 100644
--- a/.stylua.toml
+++ b/.stylua.toml
@@ -4,5 +4,6 @@ indent_type = "Spaces"
indent_width = 2
quote_style = "AutoPreferDouble"
no_call_parentheses = false
+
[sort_requires]
enabled = true
diff --git a/README.md b/README.md
index db88042..631c99a 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,16 @@
-# down.lua - the _familiar_, organized future for neovim
+# down.lua
+
+### the _familiar_, organized future for neovim
![Neovim](https://img.shields.io/badge/Neovim%200.10+-brightgreen?style=for-the-badge)
- ![License](https://img.shields.io/badge/license-GPL%20v3-brightgreen?style=for-the-badge)
+ ![License](https://img.shields.io/badge/license-GPL%20v3-brightgreen?style=for-the-badge)
![LuaRocks](https://img.shields.io/luarocks/v/clpi/down.lua)
---
-> [!Important]
+> [!Caution]
>
-> `down.lua` is **BEGINNING DEVELOPMENT**
+> `down.lua` is currently in **early** *ongoing* development.
@@ -43,36 +45,39 @@
-lazy.nvim
+lazy.nvim
```lua
+-- Place in lazy.nvim spec
{
"clpi/down.lua",
- lazy = false,
- version = "*"
- branch = "master",
- config = function(_, opts)
- require("down").setup({
+ version = "*",
+ lazy = false,
+ branch = "master",
+ config = function()
+ require "down".setup {
mod = {
- config = {},
workspace = {
config = {
+ default = "notes",
workspaces = {
default = "~/down",
- notes = "~/notes"
+ notes = "~/notes",
+ personal = "~/home"
}
}
}
}
- })
+ }
end,
dependencies = {
+ "nvim-treesitter/nvim-treesitter",
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
"pysan3/pathlib.nvim",
"nvim-telescope/telescope.nvim", -- optional
- }
+ },
}
```
@@ -83,7 +88,7 @@
-plug.vim
+plug.vim
> [!Caution]
@@ -100,11 +105,11 @@ Plug "clpi/down.lua", {
\ "branch" : "master",
\ "do" : ':lua require([[down]]).setup({
\ mod = {
- \ config = {},
\ workspace = {
\ config = {
\ workspaces = {
- \ default = [[~/wiki]],
+ \ wiki = [[~/wiki]],
+ \ default = [[~/down]],
\ notes = [[~/notes]]
\ }
\ }
@@ -119,7 +124,7 @@ Plug "clpi/down.lua", {
---
-Vundle
+Vundle
> [!Caution]
>
@@ -140,7 +145,7 @@ Plugin 'clpi/down.lua'
-dein.vim
+dein.vim
> [!Caution]
@@ -162,7 +167,7 @@ call dein#add('clpi/down.lua')
-packer.nvim
+packer.nvim
> [!Caution]
@@ -183,10 +188,11 @@ use {
config = function()
require("down").setup({
mod = {
- config = {},
workspace = {
config = {
workspaces = {
+ default = "~/down",
+ home = "~/notes",
notes = "~/notes"
}
}
@@ -204,7 +210,7 @@ use {
-mini.deps
+mini.deps
> [!Caution]
@@ -245,13 +251,13 @@ use {
-- and make it default
require("down").setup({ ---@type down.mod.Config
mod = {
- config = {},
workspace = {
config = {
default = 'home',
workspaces = {
- notes = "~/notes",
- home = "~/notes"
+ default = "~/down",
+ home = "~/notes",
+ notes = "~/notes"
}
}
}
diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md
index de6434f..4e14524 100644
--- a/book/src/SUMMARY.md
+++ b/book/src/SUMMARY.md
@@ -50,12 +50,15 @@ Welcome -- to the `down.lua` book. I hope this helps!
- [Frameworks](./publish/frameworks.md)
- [Blog](./publish/blog.md)
+ - [Wiki](./publish/wiki.md)
- [Digital garden](./publish/digital_garden.md)
- [Plans](./plans/index.md)
- - [Near](./plans/near.md)
- - [Far](./plans/far.md)
+ - [Short-term](./plans/near.md)
+ - [Long-term](./plans/far.md)
+ - [General](./plans/general.md)
+ - [Todo](./plans/todo.md)
- [Support](./support.md)
diff --git a/book/src/plans/general.md b/book/src/plans/general.md
new file mode 100644
index 0000000..e69de29
diff --git a/down-scm-1.rockspec b/down-scm-1.rockspec
index 7e090e1..3dd6f57 100644
--- a/down-scm-1.rockspec
+++ b/down-scm-1.rockspec
@@ -111,9 +111,9 @@ build = {
modules = {},
install = {
bin = {
- downls = "scripts/bin/downls",
- down_lsp = "scripts/bin/down-lsp",
- down = "scripts/bin/down",
+ downls = "./scripts/bin/down-lsp.sh",
+ down_lsp = "./scripts/bin/down-lsp",
+ down = "./scripts/bin/down",
},
},
copy_directories = {
diff --git a/lua/down/config.lua b/lua/down/config.lua
index e64da04..a6cd7a2 100644
--- a/lua/down/config.lua
+++ b/lua/down/config.lua
@@ -4,8 +4,9 @@ local f = vim.fn
--- @type down.Config
C.config = {
- ---@type down.config.UserMod
+ ---@class down.config.User
user = {
+ ---@class down.config.UserMod
mod = {
config = {},
},
diff --git a/lua/down/health.lua b/lua/down/health.lua
index 61211fc..c06f0b0 100644
--- a/lua/down/health.lua
+++ b/lua/down/health.lua
@@ -1,15 +1,15 @@
local H = {}
local h = vim.health
-local ok,err,warn=h.ok,h.error,h.warn
+local ok, err, warn = h.ok, h.error, h.warn
H.check = function()
h.start "checking config"
- local c = require "down.mod.config".config
- if c == nil then
- err "config is nil"
+ local c = require "down.config".config
+ if c ~= nil then
+ ok("config is not nil" .. #c.user.mod .. #c.mod)
else
- ok "config not nil"
+ err("config is nil" .. "")
end
end
diff --git a/lua/down/mod.lua b/lua/down/mod.lua
index 1346c1a..9faf255 100644
--- a/lua/down/mod.lua
+++ b/lua/down/mod.lua
@@ -64,11 +64,7 @@ Mod.default = function(name)
--TODO: remove
data = {},
},
- config = {
- private = {},
- custom = {},
- public = {},
- },
+ config = {},
events = {
subscribed = { -- The events that the init is subscribed to
},