Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: doc improvements (again) #260

Merged
merged 46 commits into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
7c19841
docs: add detailed parameter listing, change interface to modules
TorchedSammy Aug 26, 2023
81b7e20
docs: add better introduction for bait module
TorchedSammy Sep 2, 2023
aa7e899
docs: make various style changes
TorchedSammy Sep 2, 2023
22cf0fc
docs: change colors for syntax highlight and function jump highlight
TorchedSammy Sep 2, 2023
eda4fda
docs(commander): remove note about input sink being unimplemented
TorchedSammy Sep 2, 2023
0900284
docs: turn properties list into a table
TorchedSammy Sep 2, 2023
7fd2ed3
docs: add separators for types, make object properties into tables
TorchedSammy Sep 2, 2023
95ac2e2
docs: fix description of exitCode prop
TorchedSammy Sep 2, 2023
726082b
docs: fix duplicate functions header
TorchedSammy Sep 9, 2023
0f923a6
chore: merge from master
TorchedSammy Nov 12, 2023
0607a90
fix: clear before setting statusline
TorchedSammy Nov 12, 2023
5be4705
refactor: move misc docs for use in hilbish and website
TorchedSammy Nov 12, 2023
e8ea79b
website(docs): remove unused header
TorchedSammy Nov 30, 2023
2363e6f
website(docs): add example
TorchedSammy Nov 30, 2023
e81384e
refactor(bait): reorder functions alphabetically
TorchedSammy Nov 30, 2023
f516e1b
website(docs): setup custom syntax highlighting, add line numbers
TorchedSammy Dec 1, 2023
d921d3f
website(docs/bait): complete documentation
TorchedSammy Dec 1, 2023
068ef7a
website(docs/bait): add example for throw function
TorchedSammy Dec 1, 2023
bb8d072
website(docs/commander): rewrite commander docs
TorchedSammy Dec 1, 2023
77979dc
website: set highlighter options to guess syntax
TorchedSammy Dec 2, 2023
393b200
fix(docgen): add double space after line of text
TorchedSammy Dec 2, 2023
be526c1
doc(fs): rewrite docs
TorchedSammy Dec 2, 2023
f40ce3c
chore: update docs
TorchedSammy Dec 2, 2023
1f7f8e5
docs: update api docs, make others show up on site
TorchedSammy Dec 2, 2023
93c0645
docs: update hilbish.completion
TorchedSammy Dec 2, 2023
7cd1170
chore: reorder hilbish.completion functions
TorchedSammy Dec 2, 2023
90ef8f7
refactor: update documentation for everything
TorchedSammy Dec 4, 2023
3065cdd
chore: update branch
TorchedSammy Dec 4, 2023
7f6c459
docs: fix extra backtick in codeblock
TorchedSammy Dec 18, 2023
f3eac9f
fix(nature/greenhouse): fix style override on bottom titles
TorchedSammy Dec 18, 2023
42d86f2
fix(commands/doc): fix title rendering, highlight codeblocks
TorchedSammy Dec 18, 2023
2cac53d
feat(commands/doc): display separator, add space in code block
TorchedSammy Dec 18, 2023
5fb8c88
feat(commands/doc): strip html elements, style markdown properly
TorchedSammy Dec 18, 2023
ec49620
feat(greenhouse): add implementation for horizontal scroll (leave unu…
TorchedSammy Dec 18, 2023
a59a029
fix(greenhouse): text cutoff in certain cases
TorchedSammy Dec 18, 2023
fb3915e
fix(commands/doc): fix text cutoff, render warning shortcode
TorchedSammy Dec 18, 2023
433ffa5
docs: move Hooks to Signals
TorchedSammy Dec 18, 2023
316a818
feat: work on nature doc gen
TorchedSammy Dec 19, 2023
f312cc2
docs: improve docs for signals
TorchedSammy Dec 24, 2023
b0e05d4
feat: add nature module docs
TorchedSammy Dec 25, 2023
884bc1f
docs: add opts
TorchedSammy Dec 25, 2023
d3a9585
chore: update changelog
TorchedSammy Dec 25, 2023
0de305a
docs: fix extra whitespace
TorchedSammy Dec 25, 2023
3219c47
docs: reorganize text and add more info
TorchedSammy Dec 26, 2023
85e1307
docs: fix fs.mkdir example
TorchedSammy Dec 26, 2023
48ef443
docs: minor changes and fixes
TorchedSammy Dec 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ completed.
- Using this also brings enhancements to the `doc` command like easy
navigation of neighboring doc files.

### Changed
- Documentation for EVERYTHING has been improved, with more
information added, code example, parameter details, etc.
You can see the improvements!
- Documentation has gotten an uplift in the `doc` command.
This includes:
- Proper highlighting of code
- Paging (via Greenhouse)
- Highlighting more markdown things

### Fixed
- Fix infinite loop when navigating history without any history. [#252](https://github.com/Rosettea/Hilbish/issues/252)
- Return the prefix when calling `hilbish.completions.call`. [#219](https://github.com/Rosettea/Hilbish/issues/219)
Expand Down
24 changes: 16 additions & 8 deletions aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,23 @@ func (a *aliasModule) Loader(rtm *rt.Runtime) *rt.Table {

// #interface aliases
// add(alias, cmd)
// This is an alias (ha) for the `hilbish.alias` function.
// This is an alias (ha) for the [hilbish.alias](../#alias) function.
// --- @param alias string
// --- @param cmd string
func _hlalias() {}

// #interface aliases
// list() -> table<string, string>
// list() -> table[string, string]
// Get a table of all aliases, with string keys as the alias and the value as the command.
// --- @returns table<string, string>
// #returns table[string, string]
/*
#example
hilbish.aliases.add('hi', 'echo hi')

local aliases = hilbish.aliases.list()
-- -> {hi = 'echo hi'}
#example
*/
func (a *aliasModule) luaList(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) {
aliasesList := rt.NewTable()
for k, v := range a.All() {
Expand All @@ -132,7 +140,7 @@ func (a *aliasModule) luaList(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) {
// #interface aliases
// delete(name)
// Removes an alias.
// --- @param name string
// #param name string
func (a *aliasModule) luaDelete(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) {
if err := c.Check1Arg(); err != nil {
return nil, err
Expand All @@ -147,10 +155,10 @@ func (a *aliasModule) luaDelete(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) {
}

// #interface aliases
// resolve(alias) -> command (string)
// Tries to resolve an alias to its command.
// --- @param alias string
// --- @returns string
// resolve(alias) -> string?
// Resolves an alias to its original command. Will thrown an error if the alias doesn't exist.
// #param alias string
// #returns string
func (a *aliasModule) luaResolve(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) {
if err := c.Check1Arg(); err != nil {
return nil, err
Expand Down
Loading
Loading