diff options
| author | 2024-08-06 14:11:59 +0200 | |
|---|---|---|
| committer | 2024-08-06 14:11:59 +0200 | |
| commit | 7425eda3e544fcb1ce81a09c5ff49d839e58ac94 (patch) | |
| tree | e74368e016160f5c7aa5b532b46c9190e21fc32e /dot_config/nvim/fnl/toast/core.fnl | |
| parent | nvim: expand .lua gitattributes, mark as non-diffable (diff) | |
nvim: rework lsp module
There's still some improvements to be made, but this is cleaner.
We lose global caps defaults, but those made no sense to begin with.
We do also lose caps overrides, I'll add them back in if I need them.
In the process, we gain `every?` and `executable?`.
There's also a misc comp print vim.inspect to vim.print change.
Diffstat (limited to 'dot_config/nvim/fnl/toast/core.fnl')
| -rw-r--r-- | dot_config/nvim/fnl/toast/core.fnl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/dot_config/nvim/fnl/toast/core.fnl b/dot_config/nvim/fnl/toast/core.fnl index 2a426d1..82b0c40 100644 --- a/dot_config/nvim/fnl/toast/core.fnl +++ b/dot_config/nvim/fnl/toast/core.fnl @@ -19,6 +19,13 @@ "Returns true if the argument is a number." (= :number (type n))) +(fn every? [pred xs] + "Returns true if (pred x) is logical true for every x in xs, else false." + (accumulate [pass true + _ x (ipairs xs) + &until (not pass)] + (pred x))) + ; sequences (fn drop [n xs] "Returns a table of all but the first n elements in xs." @@ -81,6 +88,7 @@ : empty? : nil? : number? + : every? ; sequences : drop : first |
