-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
68 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(defn foo [x y] | ||
(+ x (+ y 1))) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
(local forms {:list_lit true | ||
:vec_lit true | ||
:map_lit true | ||
:set_lit true | ||
:anon_fn_lit true}) | ||
|
||
(fn form? [node] | ||
(if (. forms (node:type)) | ||
node | ||
(let [child (node:named_child 0)] | ||
(when child (form? child))))) | ||
|
||
{: form?} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
(local {: describe : it} (require :plenary.busted)) | ||
(local h (require :spec.nfnl.helper)) | ||
(local tree (require :formedit.tree)) | ||
(local assert (require :luassert.assert)) | ||
(local ts (require :nvim-treesitter.ts_utils)) | ||
|
||
(describe "node under cursor" | ||
(fn [] | ||
(it "cursor on start of form" | ||
(fn [] | ||
(h.setup {:content "(a)" :cursor [1 2]}) | ||
(let [node (ts.get_node_at_cursor) | ||
actual (tree.form? node)] | ||
(assert.equals :list_lit (actual:type))))))) |
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.