Skip to content

Commit

Permalink
scaffolding
Browse files Browse the repository at this point in the history
  • Loading branch information
clpi committed Nov 16, 2024
1 parent ac8da13 commit 9927bc8
Show file tree
Hide file tree
Showing 82 changed files with 822 additions and 2,168 deletions.
612 changes: 0 additions & 612 deletions .icon/module.lua

This file was deleted.

901 changes: 0 additions & 901 deletions .icon/util.lua

This file was deleted.

14 changes: 14 additions & 0 deletions .null-ls_851613_flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
description = "word.lua";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
};

outputs = { self, nixpkgs }: {

packages.x86_64-linux.hello = nixpkgs.legacyPackages.x86_64-linux.hello;

packages.x86_64-linux.default = self.packages.x86_64-linux.hello;

};
}
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# dorm - the _familiar_, organized future for neovim
# word - 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>
Expand All @@ -7,7 +7,7 @@

## Introduction

- **dorm** is a plugin meant to bring the awesome extensibility of emacs [org-mode] or [neorg] without needing to switch from the gold standard [markdown], or from the best editor [neovim].
- **word** is a plugin meant to bring the awesome extensibility of emacs [org-mode] or [neorg] without needing to switch from the gold standard [markdown], or from the best editor [neovim].

- we want to be able to take notes like developers, without shutting ourselves out of the entire ecosystem built around markdown.

Expand All @@ -23,7 +23,7 @@

```lua
{
"clpi/dorm.lua",
"clpi/word.lua",
lazy = false,
version = false,
config = true,
Expand All @@ -36,9 +36,9 @@
### plug.vim

```vim
Plug "clpi/dorm.lua", {
Plug "clpi/word.lua", {
\ "branch" : "main",
\ "do" : ":lua require('dorm').setup()"
\ "do" : ":lua require('word').setup()"
\ }
```

Expand All @@ -57,7 +57,7 @@ use {
},
tag = "*",
config = function()
require("dorm").setup()
require("word").setup()
end,
}
```
Expand All @@ -78,8 +78,8 @@ check back!

thank you and keep updated!

- [The Dorm book](https://dorm.cli.st)
- [dorm.lua on luarocks](https://luarocks.org/modules/clpi/dorm.lua)
- [The word book](https://word.cli.st)
- [word.lua on luarocks](https://luarocks.org/modules/clpi/word.lua)

<!-- <div align="center"> -->

Expand Down
1 change: 1 addition & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# TODO
2 changes: 1 addition & 1 deletion book/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ authors = ["Chris Pecunies"]
language = "en"
multilingual = false
src = "src"
title = "The dorm.lua book"
title = "The word.lua book"
4 changes: 2 additions & 2 deletions book/src/intro.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# dorm.lua
# word.lua

## Intro

`dorm.lua` is a simple ORM for Lua. It is designed to be simple to use and
`word.lua` is a simple ORM for Lua. It is designed to be simple to use and

## Is it for you?

Expand Down
1 change: 0 additions & 1 deletion doc/dorm.md

This file was deleted.

16 changes: 8 additions & 8 deletions doc/dorm.lua.txt → doc/word.lua.txt
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
*dorm.lua.txt* dorm.lua
*word.lua.txt* word.lua

Author: Chris Pecunies

INTRODUCTION *dorm.lua*
INTRODUCTION *word.lua*
================================================================================

`dorm.lua` is a plugin to bring the extensibility of org-mode to neovim without
`word.lua` is a plugin to bring the extensibility of org-mode to neovim without
leaving the gold standard markdown file format.


ABOUT *dorm-about*
ABOUT *word-about*
================================================================================

To be filled out

TODO *dorm-todo*
TODO *word-todo*
================================================================================

- [ ] Separate commands and mods `(11/15 22:43)`
- [ ] Docgen `(11/15 22:43)`
- [ ] Easy linking of files by title, and easy colloqial hierarchy `(11/1522:43)`
- [ ] Easy tagging of tracked todos, easy disparate categ. of todos

LINKS *dorm-links*
LINKS *word-links*
================================================================================

Grab the latest version or report a bug on GitHub:

https://github.com/clpi/dorm.lua
https://github.com/clpi/word.lua

Or visit the website:

https://dorm.clp.is
https://word.clp.is

vim:tw=80:colorcolumn=81:et:ft=help:norl:
6 changes: 6 additions & 0 deletions doc/word.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# The word

- [ ] Separate commands and mods `(11/15 22:43)`
- [ ] Docgen `(11/15 22:43)`
- [ ] Easy linking of files by title, and easy colloqial hierarchy `(11/1522:43)`
- [ ] Easy tagging of tracked todos, easy disparate categ. of todos
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
description = "dorm.lua";
description = "word.lua";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
};
Expand Down
9 changes: 0 additions & 9 deletions lua/dorm/mod/completion/module.lua

This file was deleted.

62 changes: 0 additions & 62 deletions lua/dorm/mod/search/module.lua

This file was deleted.

9 changes: 0 additions & 9 deletions lua/telescope/_extensions/dorm/util/init.lua

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ local srt = require("telescope.sorters")
local bui = require("telescope.builtin")
local win = require("telescope.pickers.window")

local has_dorm, dorm = pcall(require, "dorm")
local has_word, word = pcall(require, "word")

local M = {}


function M.setup_keys()
local map = vim.api.nvim_set_keymap
local opt = { noremap = true, silent = true }
map("n", ",vv", "<cmd>lua require('telescope._extensions.dorm').custom_picker()<CR>", opt)
map("n", ",vv", "<cmd>lua require('telescope._extensions.word').custom_picker()<CR>", opt)
end

function M.custom_picker()
pic.new({}, {
prompt_title = "dorm",
prompt_title = "word",
sorter = srt.get_generic_fuzzy_sorter(),
finder = fnd.new_table {
results = {
Expand All @@ -37,9 +37,9 @@ function M.custom_picker()
local selection = act.get_selected_entry()
act.close(prompt_bufnr)
if selection.value == 'Index' then
require('dorm.index').index()
require('word.index').index()
elseif selection.value == 'Notes' then
require('dorm.notes').notes()
require('word.notes').notes()
end
end)
return true
Expand All @@ -59,7 +59,7 @@ function M.setup()

}
})
tel.load_extension("dorm")
tel.load_extension("word")
end

return M
9 changes: 9 additions & 0 deletions lua/telescope/_extensions/word/util/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
M = {}

function M.word(ns)
local hasword, v = pcall(require, "word")
assert(hasword, "word is not loaded - load it before telescope")
vim.api.nvim_create_namespace(ns)
end

return M
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
46 changes: 23 additions & 23 deletions lua/dorm/config/init.lua → lua/word/config/init.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
--- @brief [[
--- Defines the configuration table for use throughout dorm.
--- Defines the configuration table for use throughout word.
--- @brief ]]

-- TODO(vhyrro): Make `dorm_version` and `version` a `Version` class.
-- TODO(vhyrro): Make `word_version` and `version` a `Version` class.

--- @alias OperatingSystem
--- | "windows"
Expand All @@ -12,24 +12,24 @@
--- | "linux"
--- | "bsd"

--- @alias dorm.configuration.module { config?: table }
--- @alias word.configuration.module { config?: table }

--- @class (exact) dorm.configuration.user
--- @field hook? fun(manual: boolean, arguments?: string) A user-defined function that is invoked whenever dorm starts up. May be used to e.g. set custom keybindings.
--- @field lazy_loading? boolean Whether to defer loading the dorm base until after the user has entered a `.dorm` file.
--- @field load table<string, dorm.configuration.module> A list of mod to load, alongside their configurations.
--- @field logger? dorm.log.configuration A configuration table for the logger.
--- @class (exact) word.configuration.user
--- @field hook? fun(manual: boolean, arguments?: string) A user-defined function that is invoked whenever word starts up. May be used to e.g. set custom keybindings.
--- @field lazy_loading? boolean Whether to defer loading the word base until after the user has entered a `.word` file.
--- @field load table<string, word.configuration.module> A list of mod to load, alongside their configurations.
--- @field logger? word.log.configuration A configuration table for the logger.

--- @class (exact) dorm.configuration
--- @field arguments table<string, string> A list of arguments provided to the `:DormStart` function in the form of `key=value` pairs. Only applicable when `user_config.lazy_loading` is `true`.
--- @field manual boolean? Used if dorm was manually loaded via `:DormStart`. Only applicable when `user_config.lazy_loading` is `true`.
--- @field mod table<string, dorm.configuration.module> Acts as a copy of the user's configuration that may be modified at runtime.
--- @field dorm_version string The version of the file format to be used throughout dorm. Used internally.
--- @field os_info OperatingSystem The operating system that dorm is currently running under.
--- @field pathsep "\\"|"/" The operating system that dorm is currently running under.
--- @field started boolean Set to `true` when dorm is fully initialized.
--- @field user_config dorm.configuration.user Stores the configuration provided by the user.
--- @field version string The version of dorm that is currently active. Automatically updated by CI on every release.
--- @class (exact) word.configuration
--- @field arguments table<string, string> A list of arguments provided to the `:wordStart` function in the form of `key=value` pairs. Only applicable when `user_config.lazy_loading` is `true`.
--- @field manual boolean? Used if word was manually loaded via `:wordStart`. Only applicable when `user_config.lazy_loading` is `true`.
--- @field mod table<string, word.configuration.module> Acts as a copy of the user's configuration that may be modified at runtime.
--- @field word_version string The version of the file format to be used throughout word. Used internally.
--- @field os_info OperatingSystem The operating system that word is currently running under.
--- @field pathsep "\\"|"/" The operating system that word is currently running under.
--- @field started boolean Set to `true` when word is fully initialized.
--- @field user_config word.configuration.user Stores the configuration provided by the user.
--- @field version string The version of word that is currently active. Automatically updated by CI on every release.

--- Gets the current operating system.
--- @return OperatingSystem
Expand All @@ -56,17 +56,17 @@ local function get_os_info()
return "bsd"
end

error("[dorm]: Unable to determine the currently active operating system!")
error("[word]: Unable to determine the currently active operating system!")
end

local os_info = get_os_info()

--- Stores the configuration for the entirety of dorm.
--- Stores the configuration for the entirety of word.
--- This includes not only the user configuration (passed to `setup()`), but also internal
--- variables that describe something specific about the user's hardware.
--- @see dorm.setup
--- @see word.setup
---
--- @type dorm.configuration
--- @type word.configuration
local config = {
user_config = {
lazy_loading = false,
Expand All @@ -81,7 +81,7 @@ local config = {
manual = nil,
arguments = {},

dorm_version = "1.1.1",
word_version = "1.1.1",
version = "9.1.1",

os_info = os_info,
Expand Down
Loading

0 comments on commit 9927bc8

Please sign in to comment.