Skip to content

Commit 26eb5dd

Browse files
authored
Merge pull request #5 from Massolari/tech/typescript
Rewrite in typescript
2 parents 0097887 + 0e27e60 commit 26eb5dd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+11144
-7097
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
vendor/plenary.nvim
22
.DS_Store
33
/.envrc
4+
node_modules

Makefile

+12-22
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,20 @@ FENNEL_SCRIPT=scripts/fennel
22
TESTS_INIT=tests/minimal_init.lua
33
TESTS_DIR=tests/
44

5-
src_files = $(wildcard fnl/**/*.fnl)
6-
out_files = $(src_files:fnl/%.fnl=lua/%.lua)
7-
plugin_files = $(wildcard plugin/*.fnl)
8-
plugin_out_files = $(plugin_files:plugin/%.fnl=plugin/%.lua)
9-
test_init= $(wildcard tests/*.fnl)
10-
test_files =$(wildcard tests/**/*.fnl)
11-
test_out_files = $(test_files:tests/%.fnl=tests/%.lua)
12-
test_out_init = $(test_init:tests/%.fnl=tests/%.lua)
13-
14-
compile: $(out_files) $(plugin_out_files)
15-
16-
lua/%.lua: fnl/%.fnl lua/
17-
$(FENNEL_SCRIPT) --compile $< > $@
18-
19-
plugin/%.lua: plugin/%.fnl plugin/
20-
$(FENNEL_SCRIPT) --compile $< > $@
21-
22-
lua/:
5+
plugin_files = $(wildcard plugin/*.ts)
6+
plugin_out_files = $(plugin_files:plugin/%.ts=plugin/%.lua)
7+
test_init= $(wildcard tests/*.ts)
8+
test_files =$(wildcard tests/**/*.ts)
9+
test_out_files = $(test_files:tests/%.ts=tests/%.lua)
10+
test_out_init = $(test_init:tests/%.ts=tests/%.lua)
11+
12+
compile:
2313
mkdir -p lua/forem-nvim
14+
npx tstl
15+
npx tstl -p plugin/tsconfig.json
16+
npx tstl -p tests/tsconfig.json
2417

25-
tests/%.lua: tests/%.fnl tests/
26-
$(FENNEL_SCRIPT) --compile $< > $@
27-
28-
test: $(test_out_files) $(test_out_init)
18+
test:
2919
@nvim \
3020
--headless \
3121
--noplugin \

devbox.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"packages": [
3-
"github:NixOS/nixpkgs/nixpkgs-unstable#fnlfmt",
4-
"github:NixOS/nixpkgs/nixpkgs-unstable#fennel-ls",
5-
"github:NixOS/nixpkgs/nixpkgs-unstable#lua-language-server",
6-
"github:NixOS/nixpkgs/nixpkgs-unstable#stylua"
7-
],
8-
"shell": {
9-
"init_hook": [],
10-
"scripts": {}
11-
}
2+
"packages": [
3+
"github:NixOS/nixpkgs/nixpkgs-unstable#nodejs_21",
4+
"github:NixOS/nixpkgs/nixpkgs-unstable#nodePackages.typescript-language-server",
5+
"github:NixOS/nixpkgs/nixpkgs-unstable#lua-language-server",
6+
"github:NixOS/nixpkgs/nixpkgs-unstable#stylua"
7+
],
8+
"shell": {
9+
"init_hook": [],
10+
"scripts": {}
11+
}
1212
}

fnl/forem-nvim/api.fnl

-98
This file was deleted.

fnl/forem-nvim/article.fnl

-30
This file was deleted.

fnl/forem-nvim/buffer.fnl

-111
This file was deleted.

0 commit comments

Comments
 (0)