Skip to content

Commit

Permalink
Merge pull request #5 from Massolari/tech/typescript
Browse files Browse the repository at this point in the history
Rewrite in typescript
  • Loading branch information
Massolari authored Mar 8, 2024
2 parents 0097887 + 0e27e60 commit 26eb5dd
Show file tree
Hide file tree
Showing 54 changed files with 11,144 additions and 7,097 deletions.
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

0 comments on commit 26eb5dd

Please sign in to comment.