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/lua/toast | |
| 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 '')
| -rw-r--r-- | dot_config/nvim/lua/toast/core.lua | 10 | ||||
| -rw-r--r-- | dot_config/nvim/lua/toast/nvim.lua | 11 |
2 files changed, 20 insertions, 1 deletions
diff --git a/dot_config/nvim/lua/toast/core.lua b/dot_config/nvim/lua/toast/core.lua index b2a2e95..6daae14 100644 --- a/dot_config/nvim/lua/toast/core.lua +++ b/dot_config/nvim/lua/toast/core.lua @@ -17,6 +17,14 @@ end local function number_3f(n) return ("number" == type(n)) end +local function every_3f(pred, xs) + local pass = true + for _, x in ipairs(xs) do + if not pass then break end + pass = pred(x) + end + return pass +end local function drop(n, xs) local out = {} for i, v in ipairs(xs) do @@ -115,4 +123,4 @@ local function map(f, xs) end return out end -return {dec = dec, inc = inc, ["empty?"] = empty_3f, ["nil?"] = nil_3f, ["number?"] = number_3f, drop = drop, first = first, last = last, group = group, assoc = assoc, map = map} +return {dec = dec, inc = inc, ["empty?"] = empty_3f, ["nil?"] = nil_3f, ["number?"] = number_3f, ["every?"] = every_3f, drop = drop, first = first, last = last, group = group, assoc = assoc, map = map} diff --git a/dot_config/nvim/lua/toast/nvim.lua b/dot_config/nvim/lua/toast/nvim.lua new file mode 100644 index 0000000..a46b92a --- /dev/null +++ b/dot_config/nvim/lua/toast/nvim.lua @@ -0,0 +1,11 @@ +-- [nfnl] Compiled from fnl/toast/nvim.fnl by https://github.com/Olical/nfnl, do not edit. +local _local_1_ = require("toast.core") +local every_3f = _local_1_["every?"] +local function executable_3f(...) + local paths = {...} + local function _2_(_241) + return (0 ~= vim.fn.executable(_241)) + end + return every_3f(_2_, paths) +end +return {["executable?"] = executable_3f} |
