Skip to content

Commit

Permalink
updating readme, book, mod
Browse files Browse the repository at this point in the history
  • Loading branch information
clpi committed Dec 15, 2024
1 parent e027062 commit fd044b8
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 43 deletions.
24 changes: 22 additions & 2 deletions .luarc.json
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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",
Expand Down
1 change: 1 addition & 0 deletions .stylua.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ indent_type = "Spaces"
indent_width = 2
quote_style = "AutoPreferDouble"
no_call_parentheses = false

[sort_requires]
enabled = true
56 changes: 31 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# down.lua - the _familiar_, organized future for neovim
# down.lua

### the _familiar_, organized future for neovim

<a href="https://neovim.io"> ![Neovim](https://img.shields.io/badge/Neovim%200.10+-brightgreen?style=for-the-badge) </a>
<a href="/LICENSE"> ![License](https://img.shields.io/badge/license-GPL%20v3-brightgreen?style=for-the-badge)</a>
<a href="./LICENSE"> ![License](https://img.shields.io/badge/license-GPL%20v3-brightgreen?style=for-the-badge)</a>
![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.
<!--toc:start-->

Expand Down Expand Up @@ -43,36 +45,39 @@

<details open>
<summary>
<a href="#">lazy.nvim</a>
<a href="https://github.com/folke/lazy.nvim">lazy.nvim</a>
</summary>

```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
}
},
}
```

Expand All @@ -83,7 +88,7 @@
<details>

<summary>
<a href="#">plug.vim</a>
<a href="https://github.com/junegunn/vim-plug">plug.vim</a>
</summary>

> [!Caution]
Expand All @@ -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]]
\ }
\ }
Expand All @@ -119,7 +124,7 @@ Plug "clpi/down.lua", {
---

<details>
<summary><a href="#">Vundle</a></summary>
<summary><a href="https://github.com/VundleVim/Vundle.vim">Vundle</a></summary>

> [!Caution]
>
Expand All @@ -140,7 +145,7 @@ Plugin 'clpi/down.lua'
<details>

<summary>
<a href="#">dein.vim</a>
<a href="https://github.com/Shougo/dein.vim">dein.vim</a>
</summary>

> [!Caution]
Expand All @@ -162,7 +167,7 @@ call dein#add('clpi/down.lua')
<details>

<summary>
<a href="#">packer.nvim</a>
<a href="https://github.com/wbthomason/packer.nvim">packer.nvim</a>
</summary>

> [!Caution]
Expand All @@ -183,10 +188,11 @@ use {
config = function()
require("down").setup({
mod = {
config = {},
workspace = {
config = {
workspaces = {
default = "~/down",
home = "~/notes",
notes = "~/notes"
}
}
Expand All @@ -204,7 +210,7 @@ use {
<details>

<summary>
<a href="#">mini.deps</a>
<a href="https://github.com/echasnovski/mini.deps">mini.deps</a>
</summary>

> [!Caution]
Expand Down Expand Up @@ -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"
}
}
}
Expand Down
7 changes: 5 additions & 2 deletions book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Empty file added book/src/plans/general.md
Empty file.
6 changes: 3 additions & 3 deletions down-scm-1.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
3 changes: 2 additions & 1 deletion lua/down/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {},
},
Expand Down
10 changes: 5 additions & 5 deletions lua/down/health.lua
Original file line number Diff line number Diff line change
@@ -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

Expand Down
6 changes: 1 addition & 5 deletions lua/down/mod.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
Expand Down

0 comments on commit fd044b8

Please sign in to comment.