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

Rewrite in typescript #5

Merged
merged 2 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
vendor/plenary.nvim
.DS_Store
/.envrc
node_modules
34 changes: 12 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,20 @@ FENNEL_SCRIPT=scripts/fennel
TESTS_INIT=tests/minimal_init.lua
TESTS_DIR=tests/

src_files = $(wildcard fnl/**/*.fnl)
out_files = $(src_files:fnl/%.fnl=lua/%.lua)
plugin_files = $(wildcard plugin/*.fnl)
plugin_out_files = $(plugin_files:plugin/%.fnl=plugin/%.lua)
test_init= $(wildcard tests/*.fnl)
test_files =$(wildcard tests/**/*.fnl)
test_out_files = $(test_files:tests/%.fnl=tests/%.lua)
test_out_init = $(test_init:tests/%.fnl=tests/%.lua)

compile: $(out_files) $(plugin_out_files)

lua/%.lua: fnl/%.fnl lua/
$(FENNEL_SCRIPT) --compile $< > $@

plugin/%.lua: plugin/%.fnl plugin/
$(FENNEL_SCRIPT) --compile $< > $@

lua/:
plugin_files = $(wildcard plugin/*.ts)
plugin_out_files = $(plugin_files:plugin/%.ts=plugin/%.lua)
test_init= $(wildcard tests/*.ts)
test_files =$(wildcard tests/**/*.ts)
test_out_files = $(test_files:tests/%.ts=tests/%.lua)
test_out_init = $(test_init:tests/%.ts=tests/%.lua)

compile:
mkdir -p lua/forem-nvim
npx tstl
npx tstl -p plugin/tsconfig.json
npx tstl -p tests/tsconfig.json

tests/%.lua: tests/%.fnl tests/
$(FENNEL_SCRIPT) --compile $< > $@

test: $(test_out_files) $(test_out_init)
test:
@nvim \
--headless \
--noplugin \
Expand Down
20 changes: 10 additions & 10 deletions devbox.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"packages": [
"github:NixOS/nixpkgs/nixpkgs-unstable#fnlfmt",
"github:NixOS/nixpkgs/nixpkgs-unstable#fennel-ls",
"github:NixOS/nixpkgs/nixpkgs-unstable#lua-language-server",
"github:NixOS/nixpkgs/nixpkgs-unstable#stylua"
],
"shell": {
"init_hook": [],
"scripts": {}
}
"packages": [
"github:NixOS/nixpkgs/nixpkgs-unstable#nodejs_21",
"github:NixOS/nixpkgs/nixpkgs-unstable#nodePackages.typescript-language-server",
"github:NixOS/nixpkgs/nixpkgs-unstable#lua-language-server",
"github:NixOS/nixpkgs/nixpkgs-unstable#stylua"
],
"shell": {
"init_hook": [],
"scripts": {}
}
}
98 changes: 0 additions & 98 deletions fnl/forem-nvim/api.fnl

This file was deleted.

30 changes: 0 additions & 30 deletions fnl/forem-nvim/article.fnl

This file was deleted.

111 changes: 0 additions & 111 deletions fnl/forem-nvim/buffer.fnl

This file was deleted.

Loading
Loading