From 39f4e136cd4918b66f438d8fb2d98647f973c8b8 Mon Sep 17 00:00:00 2001 From: elkowar Date: Mon, 20 May 2024 16:48:09 +0200 Subject: [PATCH] Fix nvim --- .../.config/nvim/fnl/dots/plugins/plugins.fnl | 10 +- nvim/.config/nvim/lazy-lock.json | 2 - .../nvim/lua/dots/plugins/bufferline.lua | 24 +++ nvim/.config/nvim/lua/dots/plugins/cmp.lua | 51 +++++ .../.config/nvim/lua/dots/plugins/copilot.lua | 3 + .../nvim/lua/dots/plugins/diffview.lua | 10 + nvim/.config/nvim/lua/dots/plugins/emmet.lua | 9 + nvim/.config/nvim/lua/dots/plugins/feline.lua | 133 +++++++++++++ .../nvim/lua/dots/plugins/flutter-tools.lua | 5 + .../nvim/lua/dots/plugins/gitsigns.lua | 11 ++ .../nvim/lua/dots/plugins/gruvbox8.lua | 111 +++++++++++ nvim/.config/nvim/lua/dots/plugins/lsp.lua | 163 ++++++++++++++++ .../.config/nvim/lua/dots/plugins/ltex-ls.lua | 182 ++++++++++++++++++ nvim/.config/nvim/lua/dots/plugins/noice.lua | 4 + .../nvim/lua/dots/plugins/nvim-colorizer.lua | 9 + .../nvim/lua/dots/plugins/obsidian.lua | 6 + .../.config/nvim/lua/dots/plugins/plugins.lua | 26 +++ .../nvim/lua/dots/plugins/telescope.lua | 12 ++ .../nvim/lua/dots/plugins/todo-comments.lua | 3 + .../nvim/lua/dots/plugins/treesitter.lua | 7 + .../.config/nvim/lua/dots/plugins/trouble.lua | 17 ++ nvim/.config/nvim/lua/dots/plugins/vimtex.lua | 15 ++ nvim/.config/nvim/lua/init.lua | 139 ------------- nvim/.config/nvim/lua/macros.fnl | 99 ---------- 24 files changed, 806 insertions(+), 245 deletions(-) create mode 100644 nvim/.config/nvim/lua/dots/plugins/bufferline.lua create mode 100644 nvim/.config/nvim/lua/dots/plugins/cmp.lua create mode 100644 nvim/.config/nvim/lua/dots/plugins/copilot.lua create mode 100644 nvim/.config/nvim/lua/dots/plugins/diffview.lua create mode 100644 nvim/.config/nvim/lua/dots/plugins/emmet.lua create mode 100644 nvim/.config/nvim/lua/dots/plugins/feline.lua create mode 100644 nvim/.config/nvim/lua/dots/plugins/flutter-tools.lua create mode 100644 nvim/.config/nvim/lua/dots/plugins/gitsigns.lua create mode 100644 nvim/.config/nvim/lua/dots/plugins/gruvbox8.lua create mode 100644 nvim/.config/nvim/lua/dots/plugins/lsp.lua create mode 100644 nvim/.config/nvim/lua/dots/plugins/ltex-ls.lua create mode 100644 nvim/.config/nvim/lua/dots/plugins/noice.lua create mode 100644 nvim/.config/nvim/lua/dots/plugins/nvim-colorizer.lua create mode 100644 nvim/.config/nvim/lua/dots/plugins/obsidian.lua create mode 100644 nvim/.config/nvim/lua/dots/plugins/plugins.lua create mode 100644 nvim/.config/nvim/lua/dots/plugins/telescope.lua create mode 100644 nvim/.config/nvim/lua/dots/plugins/todo-comments.lua create mode 100644 nvim/.config/nvim/lua/dots/plugins/treesitter.lua create mode 100644 nvim/.config/nvim/lua/dots/plugins/trouble.lua create mode 100644 nvim/.config/nvim/lua/dots/plugins/vimtex.lua delete mode 100644 nvim/.config/nvim/lua/init.lua delete mode 100644 nvim/.config/nvim/lua/macros.fnl diff --git a/nvim/.config/nvim/fnl/dots/plugins/plugins.fnl b/nvim/.config/nvim/fnl/dots/plugins/plugins.fnl index 855af3a..e8a373d 100644 --- a/nvim/.config/nvim/fnl/dots/plugins/plugins.fnl +++ b/nvim/.config/nvim/fnl/dots/plugins/plugins.fnl @@ -60,11 +60,11 @@ ; >>> ; debugger <<< - (plugin :rcarriga/nvim-dap-ui - {:lazy true - :config true - :dependencies [:mfussenegger/nvim-dap - :nvim-neotest/nvim-nio]}) + ;(plugin :rcarriga/nvim-dap-ui + ;{:lazy true + ;:config true + ;:dependencies [:mfussenegger/nvim-dap + ;:nvim-neotest/nvim-nio]}) (plugin :mfussenegger/nvim-dap {:lazy true}) diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 017fc9b..4f6e28f 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -47,10 +47,8 @@ "nvim-code-action-menu": { "branch": "main", "commit": "8c7672a4b04d3cc4edd2c484d05b660a9cb34a1b" }, "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, "nvim-dap": { "branch": "master", "commit": "5a2f7121869394502521c52b2bc581ab22c69447" }, - "nvim-dap-ui": { "branch": "master", "commit": "71bfe9bd6b3465e169b53bea4f83775034d822dd" }, "nvim-jenkinsfile-linter": { "branch": "main", "commit": "b6b48b0a7aed92ed46bb9e1ab208dce92941f50b" }, "nvim-lspconfig": { "branch": "master", "commit": "9bda20fb967075355f253911bc066a8b5a03c77e" }, - "nvim-nio": { "branch": "master", "commit": "8765cbc4d0c629c8158a5341e1b4305fd93c3a90" }, "nvim-scrollbar": { "branch": "main", "commit": "35f99d559041c7c0eff3a41f9093581ceea534e8" }, "nvim-web-devicons": { "branch": "master", "commit": "e37bb1feee9e7320c76050a55443fa843b4b6f83" }, "nvim.lua": { "branch": "master", "commit": "5d57be0b6eea6c06977b1c5fe0752da909cf4154" }, diff --git a/nvim/.config/nvim/lua/dots/plugins/bufferline.lua b/nvim/.config/nvim/lua/dots/plugins/bufferline.lua new file mode 100644 index 0000000..1deaacc --- /dev/null +++ b/nvim/.config/nvim/lua/dots/plugins/bufferline.lua @@ -0,0 +1,24 @@ +-- [nfnl] Compiled from fnl/dots/plugins/bufferline.fnl by https://github.com/Olical/nfnl, do not edit. +local _local_1_ = require("dots.prelude") +local autoload = _local_1_["autoload"] +local a = _local_1_["a"] +local utils = _local_1_["utils"] +local colors = _local_1_["colors"] +local bufferline = autoload("bufferline") +vim.cmd("hi link BufferLineTabSeparatorSelected BufferLineSeparatorSelected") +vim.cmd("hi link BufferLineTabSeparator BufferLineSeparator") +local function mk_active(fg) + return {bg = colors.neutral_aqua, fg = fg, italic = false, bold = false} +end +local function mk_visible(fg) + return {bg = colors.dark1, fg = fg, italic = false, bold = false} +end +local function setup() + local selected = {bg = colors.neutral_aqua, fg = colors.bg_main, gui = "NONE"} + local visible = {bg = colors.dark1, fg = colors.neutral_aqua} + local function _2_(cnt, _lvl, _diagnostics_dict) + return (" (" .. cnt .. ")") + end + return bufferline.setup({options = {diagnostics = "nvim_lsp", diagnostics_indicator = _2_, tab_size = 10, enforce_regular_tabs = false, show_buffer_close_icons = false, show_tab_indicators = false, show_close_icon = false, show_buffer_icons = false}, highlights = {fill = {bg = colors.bg_main, fg = colors.light0}, background = visible, buffer_visible = visible, buffer_selected = a.assoc(selected, "bold", false, "italic", false), modified = visible, modified_visible = visible, modified_selected = selected, hint = visible, hint_visible = visible, hint_selected = selected, info = visible, info_visible = visible, info_selected = selected, warning = visible, warning_visible = visible, warning_selected = selected, error = visible, error_visible = visible, error_selected = selected, duplicate = visible, duplicate_visible = visible, duplicate_selected = selected, diagnostic = mk_visible(colors.neutral_red), diagnostic_visible = mk_visible(colors.neutral_red), diagnostic_selected = mk_active(colors.faded_red), info_diagnostic = mk_visible(colors.neutral_blue), info_diagnostic_visible = mk_visible(colors.neutral_blue), info_diagnostic_selected = mk_active(colors.faded_blue), hint_diagnostic = mk_visible(colors.neutral_yellow), hint_diagnostic_visible = mk_visible(colors.neutral_yellow), hint_diagnostic_selected = mk_active(colors.faded_orange), warning_diagnostic = mk_visible(colors.neutral_orange), warning_diagnostic_visible = mk_visible(colors.neutral_orange), warning_diagnostic_selected = mk_active(colors.faded_orange), error_diagnostic = mk_visible(colors.neutral_red), error_diagnostic_visible = mk_visible(colors.neutral_red), error_diagnostic_selected = mk_active(colors.red), separator = visible, separator_visible = {bg = colors.red}, separator_selected = {bg = colors.red}, indicator_selected = {bg = colors.neutral_aqua, fg = colors.neutral_aqua, italic = false, bold = false}, tab_separator = {bg = colors.red}, tab_separator_selected = {bg = colors.neutral_aqua, fg = colors.neutral_aqua}, pick_selected = {bg = colors.bright_red, fg = colors.bright_red}, tab_selected = {bg = colors.bright_green, fg = colors.bright_green}, tab = {bg = colors.bright_yellow, fg = colors.bright_yellow}}}) +end +return {utils.plugin("akinsho/nvim-bufferline.lua", {config = setup, tag = "v4.5.2"})} diff --git a/nvim/.config/nvim/lua/dots/plugins/cmp.lua b/nvim/.config/nvim/lua/dots/plugins/cmp.lua new file mode 100644 index 0000000..438b313 --- /dev/null +++ b/nvim/.config/nvim/lua/dots/plugins/cmp.lua @@ -0,0 +1,51 @@ +-- [nfnl] Compiled from fnl/dots/plugins/cmp.fnl by https://github.com/Olical/nfnl, do not edit. +local _local_1_ = require("dots.prelude") +local autoload = _local_1_["autoload"] +local utils = _local_1_["utils"] +local cmp = autoload("cmp") +local function item_formatter(item, vim_item) + do + local padding = string.rep(" ", (10 - vim.fn.strwidth(vim_item.abbr))) + local details + do + local t_2_ = item + if (nil ~= t_2_) then + t_2_ = (t_2_).completion_item + else + end + if (nil ~= t_2_) then + t_2_ = (t_2_).detail + else + end + details = t_2_ + end + if details then + vim_item.abbr = (vim_item.abbr .. padding .. " " .. details) + else + end + end + return vim_item +end +local function setup() + local function _6_(args) + return vim.fn["vsnip#anonymous"](args.body) + end + local function _7_() + cmp.mapping.close() + return vim.cmd("stopinsert") + end + local function _8_(_241, _242) + if ((15 == _241:get_kind()) and (15 == _242:get_kind())) then + return nil + elseif (15 == _241:get_kind()) then + return false + elseif (15 == _242:get_kind()) then + return true + else + return nil + end + end + cmp.setup({snippet = {expand = _6_}, completion = {autocomplete = false}, mapping = cmp.mapping.preset.insert({[""] = cmp.mapping.scroll_docs(-4), [""] = cmp.mapping.scroll_docs(4), [""] = cmp.mapping.complete(), [""] = _7_, [""] = cmp.mapping.confirm({select = true})}), experimental = {custom_menu = true}, sources = {{name = "nvim_lsp", priority = 5}, {name = "vsnip", priority = 3}, {name = "nvim_lua"}, {name = "calc"}, {name = "path"}, {name = "nvim_lsp_signature_help"}, {name = "conventionalcommits"}, {name = "crates"}}, formatting = {format = item_formatter}, sorting = {priority_weight = 2, comparators = {_8_, cmp.config.compare.offset, cmp.config.compare.exact, cmp.config.compare.score, cmp.config.compare.kind, cmp.config.compare.sort_text, cmp.config.compare.length, cmp.config.compare.order}}}) + return cmp.setup.cmdline("/", {sources = {{name = "buffer"}}}) +end +return {utils.plugin("hrsh7th/vim-vsnip", {lazy = true, event = {"VeryLazy"}}), utils.plugin("hrsh7th/vim-vsnip-integ", {lazy = true, event = {"VeryLazy"}}), utils.plugin("rafamadriz/friendly-snippets"), utils.plugin("hrsh7th/nvim-cmp", {lazy = true, event = {"VeryLazy"}, dependencies = {{"hrsh7th/cmp-nvim-lsp"}, {"hrsh7th/cmp-buffer"}, {"hrsh7th/cmp-vsnip"}, {"hrsh7th/cmp-nvim-lua"}, {"hrsh7th/cmp-calc"}, {"hrsh7th/cmp-path"}, {"hrsh7th/cmp-nvim-lsp-signature-help"}, {"davidsierradz/cmp-conventionalcommits"}, {"hrsh7th/cmp-omni"}}, config = setup})} diff --git a/nvim/.config/nvim/lua/dots/plugins/copilot.lua b/nvim/.config/nvim/lua/dots/plugins/copilot.lua new file mode 100644 index 0000000..cf750df --- /dev/null +++ b/nvim/.config/nvim/lua/dots/plugins/copilot.lua @@ -0,0 +1,3 @@ +-- [nfnl] Compiled from fnl/dots/plugins/copilot.fnl by https://github.com/Olical/nfnl, do not edit. +local utils = require("dots.utils") +return {utils.plugin("zbirenbaum/copilot.lua", {cmd = "Copilot", event = "InsertEnter", opts = {panel = {enabled = false}, suggestion = {enabled = true, auto_trigger = "true", keymap = {accept = "", next = ""}}}})} diff --git a/nvim/.config/nvim/lua/dots/plugins/diffview.lua b/nvim/.config/nvim/lua/dots/plugins/diffview.lua new file mode 100644 index 0000000..7503ab5 --- /dev/null +++ b/nvim/.config/nvim/lua/dots/plugins/diffview.lua @@ -0,0 +1,10 @@ +-- [nfnl] Compiled from fnl/dots/plugins/diffview.fnl by https://github.com/Olical/nfnl, do not edit. +local _local_1_ = require("dots.prelude") +local autoload = _local_1_["autoload"] +local utils = _local_1_["utils"] +local cb = autoload("diffview.config") +local diffview = autoload("diffview") +local function _2_() + return diffview.setup({file_panel = {width = 35, use_icons = false}, key_bindings = {view = {["dn"] = cb.diffview_callback("select_next_entry"), ["dp"] = cb.diffview_callback("select_prev_entry"), ["dd"] = cb.diffview_callback("toggle_files")}}, diff_binaries = false}) +end +return {utils.plugin("sindrets/diffview.nvim", {cmd = {"DiffviewOpen", "DiffviewToggleFiles"}, config = _2_})} diff --git a/nvim/.config/nvim/lua/dots/plugins/emmet.lua b/nvim/.config/nvim/lua/dots/plugins/emmet.lua new file mode 100644 index 0000000..9748e74 --- /dev/null +++ b/nvim/.config/nvim/lua/dots/plugins/emmet.lua @@ -0,0 +1,9 @@ +-- [nfnl] Compiled from fnl/dots/plugins/emmet.fnl by https://github.com/Olical/nfnl, do not edit. +local utils = require("dots.utils") +local function setup() + vim.g.user_emmet_mode = "n" + vim.g.user_emmet_leader_key = "e" + vim.g.user_emmet_settings = {["javascript.jsx"] = {extends = "jsx"}, ["typescript.jsx"] = {extends = "jsx"}} + return nil +end +return {utils.plugin("mattn/emmet-vim", {lazy = true, config = setup})} diff --git a/nvim/.config/nvim/lua/dots/plugins/feline.lua b/nvim/.config/nvim/lua/dots/plugins/feline.lua new file mode 100644 index 0000000..24e7997 --- /dev/null +++ b/nvim/.config/nvim/lua/dots/plugins/feline.lua @@ -0,0 +1,133 @@ +-- [nfnl] Compiled from fnl/dots/plugins/feline.fnl by https://github.com/Olical/nfnl, do not edit. +local _local_1_ = require("dots.prelude") +local autoload = _local_1_["autoload"] +local utils = _local_1_["utils"] +local a = _local_1_["a"] +local str = _local_1_["str"] +local colors = _local_1_["colors"] +local feline = autoload("feline") +local function setup() + vim.opt.termguicolors = true + local modes = {n = {text = "NORMAL", color = colors.neutral_aqua}, i = {text = "INSERT", color = colors.neutral_yellow}, c = {text = "CMMAND", color = colors.neutral_aqua}, ce = {text = "NORMEX", color = colors.neutral_aqua}, cv = {text = "EX", color = colors.neutral_aqua}, ic = {text = "INSCOMP", color = colors.neutral_aqua}, no = {text = "OP-PENDING", color = colors.neutral_aqua}, r = {text = "HIT-ENTER", color = colors.neutral_aqua}, ["r?"] = {text = "CONFIRM", color = colors.neutral_aqua}, R = {text = "REPLACE", color = colors.neutral_aqua}, Rv = {text = "VIRTUAL", color = colors.neutral_aqua}, s = {text = "SELECT", color = colors.neutral_aqua}, S = {text = "SELECT", color = colors.neutral_aqua}, t = {text = "TERM", color = colors.neutral_aqua}, v = {text = "VISUAL", color = colors.neutral_blue}, V = {text = "VISUAL LINE", color = colors.neutral_blue}, ["\22"] = {text = "VISUAL BLOCK", color = colors.neutral_blue}} + local bar_bg = colors.bg_main + local horiz_separator_color = colors.light1 + local function or_empty(x) + return (x or "") + end + local function spaces(x) + if x then + return (" " .. x .. " ") + else + return "" + end + end + local function get_current_filepath() + local file = utils["shorten-path"](vim.fn.bufname(), 30, 30) + if a["empty?"](file) then + return "" + elseif vim.bo.readonly then + return ("RO " .. file) + elseif (vim.bo.modifiable and vim.bo.modified) then + return (file .. " \226\151\143") + else + return (file .. " ") + end + end + local function vim_mode_hl(use_as_fg_3f) + local color = modes[vim.fn.mode()].color + if use_as_fg_3f then + return {bg = bar_bg, fg = color} + else + return {bg = color, fg = bar_bg} + end + end + local function git_status_provider() + local function _5_(_241) + return ("master" ~= _241) + end + local function _7_() + local t_6_ = vim.b + if (nil ~= t_6_) then + t_6_ = (t_6_).gitsigns_status_dict + else + end + if (nil ~= t_6_) then + t_6_ = (t_6_).head + else + end + return t_6_ + end + return or_empty(utils["keep-if"](_5_, _7_())) + end + local function vim_mode() + return (" " .. (modes[vim.fn.mode()].text or vim.fn.mode) .. " ") + end + local function lsp_progress_provider() + local msgs = vim.lsp.util.get_progress_messages() + local s + do + local tbl_17_auto = {} + local i_18_auto = #tbl_17_auto + for _, msg in ipairs(msgs) do + local val_19_auto + if msg.message then + val_19_auto = (msg.title .. " " .. msg.message) + else + val_19_auto = nil + end + if (nil ~= val_19_auto) then + i_18_auto = (i_18_auto + 1) + do end (tbl_17_auto)[i_18_auto] = val_19_auto + else + end + end + s = tbl_17_auto + end + return or_empty(str.join(" | ", s)) + end + local function lsp_diagnostic_component(kind, color) + local function _12_() + return (0 ~= #vim.diagnostic.get(0, {severity = kind})) + end + local function _13_() + return spaces(#vim.diagnostic.get(0, {severity = kind})) + end + return {enabled = _12_, provider = _13_, left_sep = "", right_sep = "", hl = {fg = bar_bg, bg = color}} + end + local function coordinates() + local _let_14_ = vim.api.nvim_win_get_cursor(0) + local line = _let_14_[1] + local col = _let_14_[2] + return (" " .. line .. ":" .. col .. " ") + end + local function inactive_separator_provider() + if (vim.fn.winnr() ~= vim.fn.winnr("j")) then + return string.rep("\226\148\128", vim.api.nvim_win_get_width(0)) + else + return "" + end + end + local components = {active = {}, inactive = {}} + local function _16_() + return vim_mode_hl(false) + end + local function _17_() + return vim_mode_hl(true) + end + components.active[1] = {{provider = vim_mode, hl = _16_}, {provider = get_current_filepath, left_sep = " ", hl = {fg = colors.light4}}, {provider = git_status_provider, left_sep = " ", hl = _17_}} + local function _18_() + return (0 < #vim.lsp.buf_get_clients()) + end + components.active[2] = {{provider = lsp_progress_provider, left_sep = " ", right_sep = " ", enabled = _18_}} + local function _19_() + return vim_mode_hl(true) + end + local function _20_() + return vim_mode_hl(false) + end + components.active[3] = {{provider = vim.bo.filetype, right_sep = " ", hl = _19_}, lsp_diagnostic_component(vim.diagnostic.severity.INFO, colors.neutral_green), lsp_diagnostic_component(vim.diagnostic.severity.HINT, colors.neutral_aqua), lsp_diagnostic_component(vim.diagnostic.severity.WARN, colors.neutral_yellow), lsp_diagnostic_component(vim.diagnostic.severity.ERROR, colors.neutral_red), {provider = coordinates, hl = _20_}} + components.inactive[1] = {{provider = inactive_separator_provider, hl = {bg = "NONE", fg = horiz_separator_color}}} + utils["highlight-add"]("StatusLineNC", {bg = "NONE", fg = colors.light1}) + return feline.setup({theme = {fg = colors.light1, bg = colors.bg_main}, components = components}) +end +return {utils.plugin("Famiu/feline.nvim", {config = setup})} diff --git a/nvim/.config/nvim/lua/dots/plugins/flutter-tools.lua b/nvim/.config/nvim/lua/dots/plugins/flutter-tools.lua new file mode 100644 index 0000000..43b1aa7 --- /dev/null +++ b/nvim/.config/nvim/lua/dots/plugins/flutter-tools.lua @@ -0,0 +1,5 @@ +-- [nfnl] Compiled from fnl/dots/plugins/flutter-tools.fnl by https://github.com/Olical/nfnl, do not edit. +local _local_1_ = require("dots.prelude") +local autoload = _local_1_["autoload"] +local utils = _local_1_["utils"] +return {utils.plugin("akinsho/flutter-tools.nvim", {config = true, dependencies = {"nvim-lua/plenary.nvim", "stevearc/dressing.nvim"}, lazy = false})} diff --git a/nvim/.config/nvim/lua/dots/plugins/gitsigns.lua b/nvim/.config/nvim/lua/dots/plugins/gitsigns.lua new file mode 100644 index 0000000..5c6aed6 --- /dev/null +++ b/nvim/.config/nvim/lua/dots/plugins/gitsigns.lua @@ -0,0 +1,11 @@ +-- [nfnl] Compiled from fnl/dots/plugins/gitsigns.fnl by https://github.com/Olical/nfnl, do not edit. +local _local_1_ = require("nfnl.module") +local autoload = _local_1_["autoload"] +local utils = autoload("dots.utils") +local gitsigns = autoload("gitsigns") +local function setup() + gitsigns.setup({signs = {add = {text = "\226\150\141"}, change = {text = "\226\150\141"}, delete = {text = "\226\150\141"}, topdelete = {text = "\226\150\141"}, changedelete = {text = "\226\150\141"}}, update_debounce = 100, current_line_blame = false}) + local scrollbar_gitsigns = require("scrollbar.handlers.gitsigns") + return scrollbar_gitsigns.setup() +end +return {utils.plugin("lewis6991/gitsigns.nvim", {dependencies = {"vim-gruvbox8", "petertriho/nvim-scrollbar"}, config = setup})} diff --git a/nvim/.config/nvim/lua/dots/plugins/gruvbox8.lua b/nvim/.config/nvim/lua/dots/plugins/gruvbox8.lua new file mode 100644 index 0000000..83ecc53 --- /dev/null +++ b/nvim/.config/nvim/lua/dots/plugins/gruvbox8.lua @@ -0,0 +1,111 @@ +-- [nfnl] Compiled from fnl/dots/plugins/gruvbox8.fnl by https://github.com/Olical/nfnl, do not edit. +local _local_1_ = require("nfnl.module") +local autoload = _local_1_["autoload"] +local utils = autoload("dots.utils") +local colors = autoload("dots.colors") +local function setup() + vim.g.gruvbox_italics = 0 + vim.g.gruvbox_italicise_strings = 0 + vim.g.gruvbox_filetype_hi_groups = 1 + vim.g.gruvbox_plugin_hi_groups = 1 + local function setup_colors() + utils["highlight-add"]({"GruvboxBlueSign", "GruvboxAquaSign", "GruvboxRedSign", "GruvboxYellowSign", "GruvboxGreenSign", "GruvboxOrangeSign", "GruvboxPurpleSign"}, {bg = "NONE"}) + utils.highlight("EndOfBuffer", {bg = "NONE", fg = colors.bg_main}) + utils.highlight("LineNr", {bg = "NONE"}) + utils["highlight-add"]("Pmenu", {bg = colors.bg_second}) + utils["highlight-add"]("PmenuSel", {bg = colors.bright_aqua}) + utils["highlight-add"]("PmenuSbar", {bg = colors.bg_second}) + utils["highlight-add"]("PmenuThumb", {bg = colors.dark1}) + utils["highlight-add"]("NormalFloat", {bg = colors.bg_second}) + utils["highlight-add"]("SignColumn", {bg = colors.bg_main}) + utils["highlight-add"]("FloatBorder", {bg = colors.bg_second}) + utils["highlight-add"]("SpecialComment", {fg = colors.dark4}) + utils["highlight-add"]({"LspDiagnosticsSignError", "LspDiagnosticsSignWarning", "LspDiagnosticsSignInformation", "LspDiagnosticsSignHint"}, {bg = "NONE"}) + utils["highlight-add"]("DiagnosticError", {fg = colors.bright_red}) + utils["highlight-add"]("DiagnosticWarning", {fg = colors.bright_orange}) + utils["highlight-add"]("DiagnosticInformation", {fg = colors.bright_aqua}) + utils["highlight-add"]("DiagnosticHint", {fg = colors.bright_yellow}) + utils["highlight-add"]("DiagnosticVirtualTextError", {bg = "#342828", fg = colors.bright_red}) + utils["highlight-add"]("DiagnosticVirtualTextWarning", {bg = "#473027", fg = colors.bright_orange}) + utils["highlight-add"]("DiagnosticVirtualTextWarning", {bg = "#3b2c28", fg = colors.bright_orange}) + utils["highlight-add"]("DiagnosticVirtualTextInformation", {bg = "#272d2f", fg = colors.bright_aqua}) + utils["highlight-add"]("DiagnosticVirtualTextHint", {bg = "#272d2f", fg = colors.bright_yellow}) + utils.highlight("LspDiagnosticsUnderlineError", {gui = "undercurl"}) + utils.highlight("StatusLine", {bg = colors.dark1, fg = colors.light0}) + vim.cmd("highlight link Function GruvboxGreen") + return utils["highlight-add"]("Function", {gui = "NONE"}) + end + local function setup_telescope_theme() + local prompt = "blacker" + if (prompt == "bright") then + local promptbg = "#689d6a" + utils["highlight-add"]("TelescopePromptBorder", {bg = promptbg, fg = promptbg}) + utils["highlight-add"]("TelescopePromptNormal", {bg = promptbg, fg = colors.bg_main}) + utils["highlight-add"]("TelescopePromptTitle", {bg = promptbg, fg = colors.dark1}) + elseif (prompt == "dark") then + local promptbg = "#252525" + utils["highlight-add"]("TelescopePromptBorder", {bg = promptbg, fg = promptbg}) + utils["highlight-add"]("TelescopePromptNormal", {bg = promptbg, fg = colors.light2}) + utils["highlight-add"]("TelescopePromptPrefix", {bg = promptbg, fg = colors.neutral_aqua}) + utils["highlight-add"]("TelescopePromptTitle", {bg = colors.neutral_blue, fg = colors.dark1}) + elseif (prompt == "black") then + local promptbg = "#212526" + utils["highlight-add"]("TelescopePromptBorder", {bg = promptbg, fg = promptbg}) + utils["highlight-add"]("TelescopePromptNormal", {bg = promptbg, fg = colors.light2}) + utils["highlight-add"]("TelescopePromptPrefix", {bg = promptbg, fg = colors.neutral_aqua}) + utils["highlight-add"]("TelescopePromptTitle", {bg = colors.neutral_green, fg = colors.dark1}) + elseif (prompt == "blacker") then + local promptbg = "#1f2324" + utils["highlight-add"]("TelescopePromptBorder", {bg = promptbg, fg = promptbg}) + utils["highlight-add"]("TelescopePromptNormal", {bg = promptbg, fg = colors.light2}) + utils["highlight-add"]("TelescopePromptPrefix", {bg = promptbg, fg = colors.neutral_aqua}) + utils["highlight-add"]("TelescopePromptTitle", {bg = colors.neutral_blue, fg = colors.dark1}) + else + end + local side = "darker" + if (side == "brighter") then + local previewbg = "#1f2324" + utils["highlight-add"]("TelescopePreviewNormal", {bg = previewbg}) + utils["highlight-add"]("TelescopePreviewBorder", {bg = previewbg, fg = previewbg}) + elseif (side == "darker") then + local previewbg = "#1a1e1f" + utils["highlight-add"]("TelescopePreviewNormal", {bg = previewbg}) + utils["highlight-add"]("TelescopePreviewBorder", {bg = previewbg, fg = previewbg}) + else + end + utils["highlight-add"]("TelescopeBorder", {bg = colors.bg_second, fg = colors.bg_second}) + utils["highlight-add"]("TelescopeNormal", {bg = colors.bg_second}) + utils["highlight-add"]("TelescopePreviewTitle", {bg = colors.neutral_green, fg = colors.dark1}) + utils["highlight-add"]("TelescopeResultsTitle", {bg = colors.neutral_aqua, fg = colors.dark1}) + return utils["highlight-add"]("TelescopeSelection", {bg = colors.neutral_aqua, fg = colors.dark1}) + end + local function setup_noice_theme() + utils["highlight-add"]("NoicePopupmenu", {bg = colors.bg_second}) + utils["highlight-add"]("NoiceCmdline", {bg = "#1f2324"}) + utils["highlight-add"]("NoiceCmdlinePopup", {bg = "#1f2324"}) + utils["highlight-add"]("NoiceCmdlinePrompt", {bg = "#1f2324"}) + utils["highlight-add"]("NoiceCmdlinePopupBorder", {fg = colors.bright_aqua}) + return utils["highlight-add"]("NoiceCmdlineIcon", {fg = colors.bright_aqua}) + end + vim.api.nvim_create_autocmd("ColorScheme", {pattern = "*", callback = setup_colors}) + setup_colors() + vim.api.nvim_create_autocmd("ColorScheme", {pattern = "*", callback = setup_telescope_theme}) + setup_telescope_theme() + vim.api.nvim_create_autocmd("ColorScheme", {pattern = "*", callback = setup_noice_theme}) + setup_noice_theme() + local function _4_() + utils["highlight-add"]("GitSignsAdd", {gui = "NONE", bg = "NONE", fg = colors.bright_aqua}) + utils["highlight-add"]("GitSignsDelete", {gui = "NONE", bg = "NONE", fg = colors.neutral_red}) + utils["highlight-add"]("GitSignsChange", {gui = "NONE", bg = "NONE", fg = colors.bright_blue}) + utils["highlight-add"]("ScrollbarGitAdd", {gui = "NONE", bg = "NONE", fg = colors.bright_aqua}) + utils["highlight-add"]("ScrollbarGitDelete", {gui = "NONE", bg = "NONE", fg = colors.neutral_red}) + return utils["highlight-add"]("ScrollbarGitChange", {gui = "NONE", bg = "NONE", fg = colors.bright_blue}) + end + vim.api.nvim_create_autocmd("ColorScheme", {pattern = "*", callback = _4_}) + if ("epix" == vim.fn.hostname()) then + return vim.cmd("colorscheme gruvbox8_hard") + else + return vim.cmd("colorscheme gruvbox8") + end +end +return {utils.plugin("lifepillar/vim-gruvbox8", {priority = 1000, config = setup, lazy = false})} diff --git a/nvim/.config/nvim/lua/dots/plugins/lsp.lua b/nvim/.config/nvim/lua/dots/plugins/lsp.lua new file mode 100644 index 0000000..6497108 --- /dev/null +++ b/nvim/.config/nvim/lua/dots/plugins/lsp.lua @@ -0,0 +1,163 @@ +-- [nfnl] Compiled from fnl/dots/plugins/lsp.fnl by https://github.com/Olical/nfnl, do not edit. +local _local_1_ = require("dots.prelude") +local autoload = _local_1_["autoload"] +local a = _local_1_["a"] +local utils = _local_1_["utils"] +local lsp = autoload("lspconfig") +local lsp_configs = autoload("lspconfig/configs") +local cmp_nvim_lsp = autoload("cmp_nvim_lsp") +local function setup() + vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {virtual_text = {prefix = "\226\151\134"}, severity_sort = true, signs = false, update_in_insert = false}) + local function on_attach(client, bufnr) + if client.server_capabilities.documentHighlight then + utils.highlight("LspReferenceRead", {gui = "underline"}) + utils.highlight("LspReferenceText", {gui = "underline"}) + utils.highlight("LspReferenceWrite", {gui = "underline"}) + return vim.api.nvim_exec("augroup lsp_document_highlight\n autocmd! * \n autocmd CursorHold lua vim.lsp.buf.document_highlight() \n autocmd CursorMoved lua vim.lsp.buf.clear_references()\n augroup END", false) + else + return nil + end + end + local function better_root_pattern(patterns, except_patterns) + local function _3_(path) + if not lsp.util.root_pattern(except_patterns)(path) then + return lsp.util.root_pattern(patterns)(path) + else + return nil + end + end + return _3_ + end + local default_capabilities + do + local capabilities = vim.lsp.protocol.make_client_capabilities() + capabilities.textDocument.completion.completionItem.snippetSupport = true + default_capabilities = cmp_nvim_lsp.default_capabilities(capabilities) + end + local function init_lsp(lsp_name, _3fopts) + local merged_opts = a.merge({on_attach = on_attach, capabilities = default_capabilities}, (_3fopts or {})) + return lsp[lsp_name].setup(merged_opts) + end + local function _5_() + return vim.lsp.buf.range_formatting({}, {0, 0}, {vim.fn.line("$"), 0}) + end + init_lsp("jsonls", {commands = {Format = {_5_}}}) + init_lsp("denols", {root_dir = better_root_pattern({".git"}, {"package.json"})}) + init_lsp("hls", {settings = {languageServerHaskell = {formattingProvider = "stylish-haskell"}}}) + init_lsp("ocamllsp") + init_lsp("vimls") + init_lsp("gopls") + init_lsp("bashls") + init_lsp("erlangls") + init_lsp("yamlls") + init_lsp("html") + init_lsp("svelte") + init_lsp("elmls") + init_lsp("texlab") + init_lsp("pyright") + init_lsp("vls") + init_lsp("perlls") + init_lsp("powershell_es", {bundle_path = "/home/leon/powershell"}) + init_lsp("clangd") + init_lsp("cssls", {filestypes = {"css", "scss", "less", "stylus"}, root_dir = lsp.util.root_pattern({"package.json", ".git"}), settings = {css = {validate = true}, less = {validate = true}, scss = {validate = true}}}) + local function _6_(client, bufnr) + client.resolved_capabilities.document_formatting = false + return on_attach(client, bufnr) + end + lsp.tsserver.setup({root_dir = lsp.util.root_pattern("package.json"), on_attach = _6_}) + do + local rustaceanvim = require("rustaceanvim") + local rustaceanvim_config = require("rustaceanvim.config") + local extension_path = "/home/leon/.vscode/extensions/vadimcn.vscode-lldb-1.6.8/" + local codelldb_path = (extension_path .. "adapter/codelldb") + local liblldb_path = (extension_path .. "lldb/lib/liblldb.so") + local features = nil + vim.g.rustaceanvim = {tools = {inlay_hints = {show_parameter_hints = false}, autoSetHints = false}, dap = {adapter = rustaceanvim_config.get_codelldb_adapter(codelldb_path, liblldb_path)}, server = {on_attach = on_attach, capabilities = default_capabilities, settings = {["rust-analyzer"] = {cargo = {loadOutDirsFromCheck = true, features = (features or "all"), noDefaultFeatures = (nil ~= features)}, procMacro = {enable = true}, diagnostics = {experimental = {enable = false}, enable = false}, checkOnSave = {overrideCommand = {"cargo", "clippy", "--workspace", "--message-format=json", "--all-targets", "--all-features"}}}}}} + end + if (true or not lsp.fennel_language_server) then + lsp_configs["fennel_language_server"] = {default_config = {cmd = "/Users/leon/.cargo/bin/fennel-language-server", filetypes = {"fennel"}, single_file_support = true, root_dir = lsp.util.root_pattern({"fnl", "init.lua"}), settings = {fennel = {workspace = {library = vim.api.nvim_list_runtime_paths()}, diagnostics = {globals = {"vim"}}}}}} + else + end + init_lsp("fennel_language_server", {root_dir = lsp.util.root_pattern({"fnl", "init.lua"}), settings = {fennel = {workspace = {library = vim.api.nvim_list_runtime_paths()}, diagnostics = {globals = {"vim", "comment"}}}}}) + --[[ (when (not lsp.prolog_lsp) (tset lsp-configs "prolog_lsp" {:default_config {:cmd ["swipl" "-g" "use_module(library(lsp_server))." "-g" "lsp_server:main" "-t" "halt" "--" "stdio"] :filetypes ["prolog"] :root_dir (fn [fname] (or (lsp.util.find_git_ancestor fname) (vim.loop.os_homedir))) :settings {}}})) (lsp.prolog_lsp.setup {}) ]] + --[[ (let [ewwls-path "/home/leon/coding/projects/ls-eww/crates/ewwls/target/debug/ewwls"] (when (vim.fn.filereadable ewwls-path) (when (not lsp.ewwls) (set lsp-configs.ewwls {:default_config {:cmd [ewwls-path] :filetypes ["yuck"] :root_dir (fn [fname] (or (lsp.util.find_git_ancestor fname) (vim.loop.os_homedir))) :settings {}}})) (init-lsp "ewwls"))) ]] + local autostart_semantic_highlighting = true + local function refresh_semantic_highlighting() + if autostart_semantic_highlighting then + vim.lsp.buf_request(0, "textDocument/semanticTokens/full", {textDocument = vim.lsp.util.make_text_document_params()}, nil) + return vim.NIL + else + return nil + end + end + if not lsp.idris2_lsp then + local function _9_(new_config, new_root_dir) + new_config.cmd = {"idris2-lsp"} + new_config.capabilities.workspace.semanticTokens = {refreshSupport = true} + return nil + end + local function _10_(fname) + local scandir = require("plenary.scandir") + local function find_ipkg_ancestor(fname0) + local function _11_(path) + local res = scandir.scan_dir(path, {depth = 1, search_pattern = ".+%.ipkg"}) + if not vim.tbl_isempty(res) then + return path + else + return nil + end + end + return lsp.util.search_ancestors(fname0, _11_) + end + return ((find_ipkg_ancestor(fname) or lsp.util.find_git_ancestor(fname)) or vim.loop.os_homedir()) + end + lsp_configs.idris2_lsp = {default_config = {cmd = {"idris2-lsp"}, filetypes = {"idris2"}, on_new_config = _9_, root_dir = _10_, settings = {}}} + else + end + local function _14_(err, method, result, client_id, bufnr, config) + local client = vim.lsp.get_client_by_id(client_id) + local legend = client.server_capabilities.semanticTokensProvider.legend + local token_types = legend.tokenTypes + local data = result.data + local ns = vim.api.nvim_create_namespace("nvim-lsp-semantic") + vim.api.nvim_buf_clear_namespace(bufnr, ns, 0, ( - 1)) + local tokens = {} + local prev_line, prev_start = nil, 0 + for i = 1, #data, 5 do + local delta_line = data[i] + prev_line = ((prev_line and (prev_line + delta_line)) or delta_line) + local delta_start = data[(i + 1)] + prev_start = (((delta_line == 0) and (prev_start + delta_start)) or delta_start) + local token_type = token_types[(data[(i + 3)] + 1)] + vim.api.nvim_buf_add_highlight(bufnr, ns, ("LspSemantic_" .. token_type), prev_line, prev_start, (prev_start + data[(i + 2)])) + end + return nil + end + lsp.idris2_lsp.setup({on_attach = refresh_semantic_highlighting, autostart = true, handlers = {["workspace/semanticTokens/refresh"] = refresh_semantic_highlighting, ["textDocument/semanticTokens/full"] = _14_}}) + vim.cmd("highlight link LspSemantic_type Include") + vim.cmd("highlight link LspSemantic_function Identifier") + vim.cmd("highlight link LspSemantic_struct Number") + vim.cmd("highlight LspSemantic_variable guifg=gray") + vim.cmd("highlight link LspSemantic_keyword Structure") + vim.opt.signcolumn = "yes" + local function cleanup_markdown(contents) + if (contents.kind == "markdown") then + contents["value"] = string.gsub(contents.value, "%[([^%]]+)%]%(([^%)]+)%)", "[%1]") + else + end + return contents + end + local previous_handler = vim.lsp.handlers["textDocument/hover"] + local function _16_(a0, result, b, c) + if not (result and result.contents) then + return previous_handler(a0, result, b, c) + else + local new_contents = cleanup_markdown(result.contents) + do end (result)["contents"] = new_contents + return previous_handler(a0, result, b, c) + end + end + vim.lsp.handlers["textDocument/hover"] = _16_ + return nil +end +return {utils.plugin("neovim/nvim-lspconfig", {event = "VeryLazy", lazy = true, config = setup})} diff --git a/nvim/.config/nvim/lua/dots/plugins/ltex-ls.lua b/nvim/.config/nvim/lua/dots/plugins/ltex-ls.lua new file mode 100644 index 0000000..647e733 --- /dev/null +++ b/nvim/.config/nvim/lua/dots/plugins/ltex-ls.lua @@ -0,0 +1,182 @@ +-- [nfnl] Compiled from fnl/dots/plugins/ltex-ls.fnl by https://github.com/Olical/nfnl, do not edit. +local _local_1_ = require("dots.prelude") +local autoload = _local_1_["autoload"] +local utils = _local_1_["utils"] +local lsp = autoload("lspconfig") +local configs = autoload("lspconfig/configs") +local lsputil = autoload("lspconfig/util") +local function cmds(xs) + local tbl_17_auto = {} + local i_18_auto = #tbl_17_auto + for _, x in ipairs(xs) do + local val_19_auto = ("\\" .. x .. "{}") + if (nil ~= val_19_auto) then + i_18_auto = (i_18_auto + 1) + do end (tbl_17_auto)[i_18_auto] = val_19_auto + else + end + end + return tbl_17_auto +end +local latex_command_settings = {dummy = cmds({"texttt", "scripture", "lstref", "figref", "tblref", "secref", "personaltextcite", "personalparencite", "textcite", "parencite", "parencite[]", "game", "acsu", "enquote", "name", "item", "reqref", "gamebtn", "fs", "cs", "appref", "sorty"}), ignore = cmds({"urlfootnote", "caption", "todo"})} +local Dictionary_file = {["de-DE"] = {(vim.fn.getenv("HOME") .. "/.config/ltex-ls/dictionary.txt")}} +local Disabled_rules_file = {["de-DE"] = {(vim.fn.getenv("HOME") .. "/.config/ltex-ls/disable.txt")}} +local False_positives_file = {["de-DE"] = {(vim.fn.getenv("HOME") .. "/.config/ltex-ls/false.txt")}} +local latex_command_settings_formatted +do + local tbl = {} + for option, commands in pairs(latex_command_settings) do + for _, command in ipairs(commands) do + tbl[command] = option + end + end + latex_command_settings_formatted = tbl +end +local function read_files(files) + local dict = {} + for _, file in ipairs(files) do + local f = io.open(file, "r") + if (nil ~= f) then + for l in f:lines() do + table.insert(dict, l) + end + else + end + end + return dict +end +local function find_ltex_lang() + local buf_clients = vim.lsp.buf_get_clients() + for _, client in ipairs(buf_clients) do + if (client.name == "ltex") then + local ___antifnl_rtn_1___ = client.config.settings.ltex.language + return ___antifnl_rtn_1___ + else + end + end + return nil +end +local function find_ltex_files(filetype, value) + if (filetype == "dictionary") then + return Dictionary_file[(value or find_ltex_lang())] + elseif (filetype == "disable") then + return Disabled_rules_file[(value or find_ltex_lang())] + elseif (filetype == "falsePositive") then + return False_positives_file[(value or find_ltex_lang())] + else + return nil + end +end +local function update_config(lang, configtype) + local buf_clients = vim.lsp.buf_get_clients() + local client = nil + for _, lsp0 in ipairs(buf_clients) do + if (lsp0.name == "ltex") then + client = lsp0 + else + end + end + if client then + if (configtype == "dictionary") then + if client.config.settings.ltex.dictionary then + client.config.settings.ltex.dictionary = {[lang] = read_files(Dictionary_file[lang])} + return client.notify("workspace/didChangeConfiguration", client.config.settings) + else + return vim.notify("Error when reading dictionary config, check it") + end + elseif (configtype == "disable") then + if client.config.settings.ltex.disabledRules then + client.config.settings.ltex.disabledRules = {[lang] = read_files(Disabled_rules_file[lang])} + return client.notify("workspace/didChangeConfiguration", client.config.settings) + else + return vim.notify("Error when reading disabledRules config, check it") + end + elseif (configtype == "falsePositive") then + if client.config.settings.ltex.hiddenFalsePositives then + client.config.settings.ltex.hiddenFalsePositives = {[lang] = read_files(False_positives_file[lang])} + return client.notify("workspace/didChangeConfiguration", client.config.settings) + else + return vim.notify("Error when reading hiddenFalsePositives config, check it") + end + else + return nil + end + else + return nil + end +end +local function add_to_file(filetype, lang, file, value) + file = io.open(file[(#file - 0)], "a+") + if file then + file:write((value .. "\n")) + file:close() + else + local ___antifnl_rtns_1___ = {print("Failed insert %q", value)} + return (table.unpack or _G.unpack)(___antifnl_rtns_1___) + end + if (filetype == "dictionary") then + return update_config(lang, "dictionary") + elseif (filetype == "disable") then + return update_config(lang, "disable") + elseif (filetype == "falsePositive") then + return update_config(lang, "falsePositive") + else + return nil + end +end +local function add_to(filetype, lang, file, value) + local dict = read_files(file) + for _, v in ipairs(dict) do + if (v == value) then + return nil + else + end + end + return add_to_file(filetype, lang, file, value) +end +local function init() + local function _15_(filename) + return lsputil.path.dirname(filename) + end + configs.ltex = {default_config = {cmd = {"ltex-ls"}, filetypes = {"tex", "latex", "bib"}, root_dir = _15_}} + lsp.ltex.setup({settings = {ltex = {enabled = {"latex", "tex", "bib"}, language = "de-DE", checkFrequency = "save", diagnosticSeverity = "information", setenceCacheSize = 5000, additionalRules = {enablePickyRules = true, motherTongue = "de-DE"}, dictionary = utils["map-values"](read_files, Dictionary_file), disabledRules = utils["map-values"](read_files, Disabled_rules_file), hiddenFalsePositives = utils["map-values"](read_files, False_positives_file), latex = {commands = latex_command_settings_formatted}}}}) + lsp.ltex.dictionary_file = Dictionary_file + lsp.ltex.disabledrules_file = Disabled_rules_file + lsp.ltex.falsepostivies_file = False_positives_file + local orig_execute_command = vim.lsp.buf.execute_command + local function _16_(command) + if (command.command == "_ltex.addToDictionary") then + local arg = (command.arguments[1]).words + for lang, words in pairs(arg) do + for _, word in ipairs(words) do + local filetype = "dictionary" + add_to(filetype, lang, find_ltex_files(filetype, lang), word) + end + end + return nil + elseif (command.command == "_ltex.disableRules") then + local arg = (command.arguments[1]).ruleIds + for lang, rules in pairs(arg) do + for _, rule in ipairs(rules) do + local filetype = "disable" + add_to(filetype, lang, find_ltex_files(filetype, lang), rule) + end + end + return nil + elseif (command.command == "_ltex.hideFalsePositives") then + local arg = (command.arguments[1]).falsePositives + for lang, rules in pairs(arg) do + for _, rule in ipairs(rules) do + local filetype = "falsePositive" + add_to(filetype, lang, find_ltex_files(filetype, lang), rule) + end + end + return nil + else + return orig_execute_command(command) + end + end + vim.lsp.buf.execute_command = _16_ + return nil +end +return {} diff --git a/nvim/.config/nvim/lua/dots/plugins/noice.lua b/nvim/.config/nvim/lua/dots/plugins/noice.lua new file mode 100644 index 0000000..f3912b8 --- /dev/null +++ b/nvim/.config/nvim/lua/dots/plugins/noice.lua @@ -0,0 +1,4 @@ +-- [nfnl] Compiled from fnl/dots/plugins/noice.fnl by https://github.com/Olical/nfnl, do not edit. +local utils = require("dots.utils") +do local _ = {utils.plugin("folke/noice.nvim", {dependencies = {"MunifTanjim/nui.nvim"}, opts = {presets = {inc_rename = true, long_message_to_split = true, bottom_search = true}, lsp = {override = {["vim.lsp.util.convert_input_to_markdown_lines"] = true, ["vim.lsp.util.stylize_markdown"] = true, ["cmp.entry.get_documentation"] = true}}, views = {cmdline_popup = {border = {style = "none", padding = {1, 1}}, position = {row = 5, col = "50%"}, size = {width = 60, height = "auto"}}, popupmenu = {relative = "editor", border = {style = "none", padding = {1, 1}}, position = {row = 8, col = "50%"}, size = {width = 60, height = 10}}, mini = {max_height = 5}}, cmdline = {view = "cmdline", format = {cmdline = {icon = ":"}, help = false, lua = false}}, messages = {view = "mini", view_error = "cmdline_output", view_warn = "mini", view_search = "virtualtext"}, markdown = {hover = {["|(%S-)|"] = vim.cmd.help}}, routes = {{view = "notify", filter = {event = "msg_showmode"}}, {view = "mini", filter = {error = true, max_height = 5}}, {view = "cmdline_output", filter = {error = true, min_height = 6}}}}})} end +return {} diff --git a/nvim/.config/nvim/lua/dots/plugins/nvim-colorizer.lua b/nvim/.config/nvim/lua/dots/plugins/nvim-colorizer.lua new file mode 100644 index 0000000..5f3c356 --- /dev/null +++ b/nvim/.config/nvim/lua/dots/plugins/nvim-colorizer.lua @@ -0,0 +1,9 @@ +-- [nfnl] Compiled from fnl/dots/plugins/nvim-colorizer.fnl by https://github.com/Olical/nfnl, do not edit. +local _local_1_ = require("dots.prelude") +local autoload = _local_1_["autoload"] +local utils = _local_1_["utils"] +local colorizer = autoload("colorizer") +local function _2_() + return colorizer.setup({"*"}, {RGB = true, RRGGBB = true, names = true, RRGGBBAA = true, rgb_fn = true, hsl_fn = true, mode = "background"}) +end +return {utils.plugin("norcalli/nvim-colorizer.lua", {event = "VeryLazy", lazy = true, config = _2_})} diff --git a/nvim/.config/nvim/lua/dots/plugins/obsidian.lua b/nvim/.config/nvim/lua/dots/plugins/obsidian.lua new file mode 100644 index 0000000..c128531 --- /dev/null +++ b/nvim/.config/nvim/lua/dots/plugins/obsidian.lua @@ -0,0 +1,6 @@ +-- [nfnl] Compiled from fnl/dots/plugins/obsidian.fnl by https://github.com/Olical/nfnl, do not edit. +local _local_1_ = require("dots.prelude") +local autoload = _local_1_["autoload"] +local utils = _local_1_["utils"] +local vault_path = (vim.fn.expand("~") .. "/Documents/obsidian-vault") +return {utils.plugin("epwalsh/obsidian.nvim", {lazy = true, version = "*", ft = "markdown", event = {("BufReadPre " .. vault_path .. "/**.md"), ("BufNewFile " .. vault_path .. "/**.md")}, dependencies = {"nvim-lua/plenary.nvim"}, opts = {workspaces = {{name = "Vault", path = vault_path}}, completion = {nvim_cmp = true}}})} diff --git a/nvim/.config/nvim/lua/dots/plugins/plugins.lua b/nvim/.config/nvim/lua/dots/plugins/plugins.lua new file mode 100644 index 0000000..9ab3d2c --- /dev/null +++ b/nvim/.config/nvim/lua/dots/plugins/plugins.lua @@ -0,0 +1,26 @@ +-- [nfnl] Compiled from fnl/dots/plugins/plugins.fnl by https://github.com/Olical/nfnl, do not edit. +local function _1_() + do end (require("lsp_lines")).setup() + return vim.diagnostic.config({virtual_lines = false}) +end +local function _2_() + do end (require("litee.lib")).setup() + return (require("litee.gh")).setup() +end +local function _3_() + vim.g.code_action_menu_show_details = false + return nil +end +local function _4_() + vim.g.antifennel_executable = "/home/leon/tmp/antifennel/antifennel" + return nil +end +local function _5_() + vim.g.vlime_overlay = "slimv" + return nil +end +local function _6_() + vim.g.rustfmt_fail_silently = 1 + return nil +end +return {"Olical/aniseed", "Olical/nfnl", "nvim-lua/plenary.nvim", "norcalli/nvim.lua", "kyazdani42/nvim-web-devicons", "folke/which-key.nvim", {"ckipp01/nvim-jenkinsfile-linter", dependencies = {"nvim-lua/plenary.nvim"}}, "psliwka/vim-smoothie", {"nathanaelkane/vim-indent-guides", cmd = {"IndentGuidesToggle"}}, {"luukvbaal/stabilize.nvim", config = true}, {"stevearc/dressing.nvim", config = true}, {"tweekmonster/startuptime.vim", cmd = {"StartupTime"}}, {"moll/vim-bbye", lazy = true, cmd = {"Bdelete", "Bwipeout"}}, {"petertriho/nvim-scrollbar", event = "VeryLazy", lazy = true, config = true}, {"TimUntersberger/neogit", opts = {integrations = {diffview = true}}, cmd = {"Neogit"}}, {"folke/persistence.nvim", opts = {dir = vim.fn.expand((vim.fn.stdpath("cache") .. "/sessions/"))}}, {"https://git.sr.ht/~whynothugo/lsp_lines.nvim", config = _1_}, "jiangmiao/auto-pairs", "tpope/vim-repeat", {"preservim/nerdcommenter", event = "VeryLazy", lazy = true, priority = 1000}, {"godlygeek/tabular", cmd = {"Tabularize"}}, "tpope/vim-surround", "hauleth/sad.vim", "wellle/targets.vim", {"mg979/vim-visual-multi", lazy = true, event = "VeryLazy"}, "tommcdo/vim-exchange", {"phaazon/hop.nvim", lazy = true, event = "VeryLazy", opts = {keys = "jfkdls;amvieurow"}}, {"mfussenegger/nvim-dap", lazy = true}, {"nvim-telescope/telescope-dap.nvim", lazy = true, dependencies = {"nvim-telescope/telescope.nvim", "mfussenegger/nvim-dap"}}, {"ldelossa/gh.nvim", lazy = true, config = _2_, dependencies = {"ldelossa/litee.nvim"}}, {"pwntester/octo.nvim", lazy = true, dependencies = {"nvim-lua/plenary.nvim", "nvim-telescope/telescope.nvim", "kyazdani42/nvim-web-devicons"}, config = true}, "ruanyl/vim-gh-line", "rhysd/conflict-marker.vim", {"tpope/vim-fugitive", lazy = true, event = "VeryLazy"}, {"ray-x/lsp_signature.nvim", event = "BufEnter"}, {"weilbith/nvim-code-action-menu", cmd = "CodeActionMenu", config = _3_}, {"dnlhc/glance.nvim", lazy = true, config = true}, {"smjonas/inc-rename.nvim", opts = {input_buffer_type = "dressing"}}, {"monkoose/nvlime", ft = {"lisp"}, dependencies = {"monkoose/parsley"}}, "tpope/vim-sleuth", "editorconfig/editorconfig-vim", "sbdchd/neoformat", {"elkowar/antifennel-nvim", config = _4_}, {"Olical/conjure", ft = {"fennel"}}, {"eraserhd/parinfer-rust", build = "cargo build --release"}, "kmonad/kmonad-vim", {"elkowar/yuck.vim", ft = {"yuck"}}, {"cespare/vim-toml", ft = {"toml"}}, {"bduggan/vim-raku", ft = {"raku"}}, {"LnL7/vim-nix", ft = {"nix"}}, {"kevinoid/vim-jsonc"}, {"pangloss/vim-javascript", ft = {"javascript"}}, {"ianks/vim-tsx", ft = {"typescript-react"}}, {"leafgarland/typescript-vim", ft = {"typescript", "typescript-react", "javascript"}}, {"HerringtonDarkholme/yats.vim"}, {"mxw/vim-jsx"}, {"purescript-contrib/purescript-vim", ft = {"purescript"}}, {"derekelkins/agda-vim", ft = {"agda"}}, {"neovimhaskell/haskell-vim", ft = {"haskell"}}, {"monkoose/nvlime", ft = {"lisp"}, dependencies = {"monkoose/parsley"}, config = _5_}, {"rust-lang/rust.vim", ft = {"rust"}, dependencies = {"mattn/webapi-vim"}, config = _6_}, {"Saecki/crates.nvim", dependencies = {"nvim-lua/plenary.nvim"}, opts = {disable_invalid_feature_diagnostic = true, enable_update_available_warning = false}}, {"mrcjkb/rustaceanvim", version = "^4", ft = {"rust", "toml"}}, {"qnighy/lalrpop.vim"}, {"edwinb/idris2-vim", ft = {"idris2"}}, {"vmchale/ats-vim", ft = {"ats", "dats", "sats"}}, {"bakpakin/fennel.vim", ft = {"fennel"}}, {"evanleck/vim-svelte"}} diff --git a/nvim/.config/nvim/lua/dots/plugins/telescope.lua b/nvim/.config/nvim/lua/dots/plugins/telescope.lua new file mode 100644 index 0000000..1c6adc1 --- /dev/null +++ b/nvim/.config/nvim/lua/dots/plugins/telescope.lua @@ -0,0 +1,12 @@ +-- [nfnl] Compiled from fnl/dots/plugins/telescope.fnl by https://github.com/Olical/nfnl, do not edit. +local _local_1_ = require("dots.prelude") +local autoload = _local_1_["autoload"] +local utils = _local_1_["utils"] +local telescope = autoload("telescope") +local actions = autoload("telescope.actions") +local function setup() + telescope.setup({defaults = {mappings = {i = {[""] = actions.close}}, file_ignore_patterns = {"Cargo.lock", ".*.snap", "docs/theme/.*", "node%_modules/.*", "target/.*"}}, extensions = {["ui-select"] = {(require("telescope.themes")).get_dropdown()}}}) + telescope.load_extension("dap") + return utils.keymap("n", "", ":Telescope find_files") +end +return {utils.plugin("nvim-telescope/telescope.nvim", {config = setup, cmd = {"Telescope"}, dependencies = {"nvim-lua/popup.nvim", "nvim-lua/plenary.nvim"}})} diff --git a/nvim/.config/nvim/lua/dots/plugins/todo-comments.lua b/nvim/.config/nvim/lua/dots/plugins/todo-comments.lua new file mode 100644 index 0000000..f4c4aa6 --- /dev/null +++ b/nvim/.config/nvim/lua/dots/plugins/todo-comments.lua @@ -0,0 +1,3 @@ +-- [nfnl] Compiled from fnl/dots/plugins/todo-comments.fnl by https://github.com/Olical/nfnl, do not edit. +local utils = require("dots.utils") +return {utils.plugin("folke/todo-comments.nvim", {lazy = true, event = "VeryLazy", opts = {keywords = {TODO = {icon = "\239\128\140 "}, WARN = {icon = "\239\129\177 ", alt = {"WARNING", "XXX", "!!!"}}, NOTE = {icon = "\239\137\137 ", alt = {"INFO"}}, FIX = {icon = "\239\134\136 ", alt = {"FIXME", "BUG", "FIXIT", "ISSUE", "PHIX"}}, PERF = {icon = "\239\128\151 ", alt = {"OPTIM", "PERFORMANCE", "OPTIMIZE"}}, HACK = {icon = "\239\146\144 "}}}})} diff --git a/nvim/.config/nvim/lua/dots/plugins/treesitter.lua b/nvim/.config/nvim/lua/dots/plugins/treesitter.lua new file mode 100644 index 0000000..0a80a53 --- /dev/null +++ b/nvim/.config/nvim/lua/dots/plugins/treesitter.lua @@ -0,0 +1,7 @@ +-- [nfnl] Compiled from fnl/dots/plugins/treesitter.fnl by https://github.com/Olical/nfnl, do not edit. +local utils = require("dots.utils") +local function setup() + local configs = require("nvim-treesitter.configs") + return configs.setup({ensure_installed = {"rust", "fennel", "commonlisp", "vim", "regex", "lua", "bash", "markdown", "markdown_inline"}, highlight = {disable = {"fennel", "rust", "haskell"}, enable = false}, incremental_selection = {keymaps = {init_selection = "gss", node_incremental = "gsl", node_decremental = "gsh", scope_incremental = "gsj", scope_decremental = "gsk"}, enable = false}, textsubjects = {enable = true, disable = {"noice"}, prev_selection = ",", keymaps = {["."] = "textsubjects-smart"}}, playground = {disable = {"fennel"}, updatetime = 25, keybindings = {toggle_query_editor = "o", toggle_hl_groups = "i", toggle_injected_languages = "t", toggle_anonymous_nodes = "a", toggle_language_display = "I", focus_language = "f", unfocus_language = "F", update = "R", goto_node = "", show_help = "?"}, enable = false, persist_queries = false}}) +end +return {} diff --git a/nvim/.config/nvim/lua/dots/plugins/trouble.lua b/nvim/.config/nvim/lua/dots/plugins/trouble.lua new file mode 100644 index 0000000..53f13f1 --- /dev/null +++ b/nvim/.config/nvim/lua/dots/plugins/trouble.lua @@ -0,0 +1,17 @@ +-- [nfnl] Compiled from fnl/dots/plugins/trouble.fnl by https://github.com/Olical/nfnl, do not edit. +local _local_1_ = require("dots.prelude") +local autoload = _local_1_["autoload"] +local utils = _local_1_["utils"] +local colors = _local_1_["colors"] +local trouble = autoload("trouble") +local function setup() + trouble.setup({auto_close = true, auto_jump = {"lsp_definitions", "lsp_workspace_diagnostics", "lsp_type_definitions"}, action_keys = {jump = "", jump_close = "o", close = {"", "q"}, cancel = "q", preview = "p", toggle_preview = "P", toggle_mode = "m", hover = {"a", "K"}}, icons = false, auto_open = false, multiline = false, auto_preview = false, indent_lines = false}) + utils.highlight("TroubleFoldIcon", {bg = "NONE", fg = colors.bright_orange}) + utils.highlight("TroubleCount", {bg = "NONE", fg = colors.bright_green}) + utils.highlight("TroubleText", {bg = "NONE", fg = colors.light0}) + utils.highlight("TroubleSignError", {bg = "NONE", fg = colors.bright_red}) + utils.highlight("TroubleSignWarning", {bg = "NONE", fg = colors.bright_yellow}) + utils.highlight("TroubleSignInformation", {bg = "NONE", fg = colors.bright_aqua}) + return utils.highlight("TroubleSignHint", {bg = "NONE", fg = colors.bright_blue}) +end +return {utils.plugin("folke/trouble.nvim", {lazy = true, config = setup, cmd = {"Trouble", "TroubleClose", "TroubleRefresh", "TroubleToggle"}})} diff --git a/nvim/.config/nvim/lua/dots/plugins/vimtex.lua b/nvim/.config/nvim/lua/dots/plugins/vimtex.lua new file mode 100644 index 0000000..2b71c75 --- /dev/null +++ b/nvim/.config/nvim/lua/dots/plugins/vimtex.lua @@ -0,0 +1,15 @@ +-- [nfnl] Compiled from fnl/dots/plugins/vimtex.fnl by https://github.com/Olical/nfnl, do not edit. +local utils = require("dots.utils") +local function setup() + vim.g.vimtex_view_method = "general" + vim.g.vimtex_view_general_viewer = "zathura" + vim.g.vimtex_view_general_options = "--synctex-forward @line:1:@tex @pdf" + vim.g.vimtex_quickfix_method = "pplatex" + vim.g.vimtex_quickfix_mode = 2 + vim.g.vimtex_quickfix_open_on_warning = 0 + vim.g.vimtex_compiler_latexmk = {build_dir = "", callback = 1, continuous = 1, executable = "latexmk", hooks = {}, options = {"-verbose", "-file-line-error", "-synctex=1", "-interaction=nonstopmode", "-shell-escape"}} + vim.g.vimtex_syntax_custom_cmds = {{name = "scripture", argstyle = "ital"}} + vim.g.vimtex_syntax_conceal = {accents = 1, cites = 1, fancy = 1, greek = 1, math_bounds = 1, math_delimiters = 1, math_fracs = 1, math_super_sub = 1, math_symbols = 1, sections = 0, styles = 0} + return nil +end +return {utils.plugin("lervag/vimtex", {ft = {"latex", "tex"}, config = setup})} diff --git a/nvim/.config/nvim/lua/init.lua b/nvim/.config/nvim/lua/init.lua deleted file mode 100644 index e1c239d..0000000 --- a/nvim/.config/nvim/lua/init.lua +++ /dev/null @@ -1,139 +0,0 @@ -local _2afile_2a = "/home/leon/.config/nvim/fnl/init.fnl" -local _2amodule_name_2a = "init" -local _2amodule_2a -do - package.loaded[_2amodule_name_2a] = {} - _2amodule_2a = package.loaded[_2amodule_name_2a] -end -local _2amodule_locals_2a -do - _2amodule_2a["aniseed/locals"] = {} - _2amodule_locals_2a = (_2amodule_2a)["aniseed/locals"] -end -local autoload = (require("aniseed.autoload")).autoload -local a, colors, nvim, str, utils, _ = autoload("aniseed.core"), autoload("dots.colors"), autoload("aniseed.nvim"), autoload("aniseed.string"), autoload("dots.utils"), nil -_2amodule_locals_2a["a"] = a -_2amodule_locals_2a["colors"] = colors -_2amodule_locals_2a["nvim"] = nvim -_2amodule_locals_2a["str"] = str -_2amodule_locals_2a["utils"] = utils -_2amodule_locals_2a["_"] = _ -utils["clear-deferred"]() -if vim.fn.has("termguicolors") then - vim.opt.termguicolors = true -else -end -local function _2_() - return require("dots.plugins") -end -local function _3_(_241) - local fennel_2_auto = require("aniseed.fennel") - return a.println(fennel_2_auto.traceback(_241)) -end -xpcall(_2_, _3_) -local function _4_() - return require("dots.plugins.lsp") -end -local function _5_(_241) - local fennel_2_auto = require("aniseed.fennel") - return a.println(fennel_2_auto.traceback(_241)) -end -xpcall(_4_, _5_) -local function _6_() - return require("dots.keybinds") -end -local function _7_(_241) - local fennel_2_auto = require("aniseed.fennel") - return a.println(fennel_2_auto.traceback(_241)) -end -xpcall(_6_, _7_) -do - local added_paths = {} - vim.opt.runtimepath = (vim.o.runtimepath .. str.join(",", added_paths)) -end -vim.cmd("let mapleader=\"\\\"") -vim.cmd("let maplocalleader=\",\"") -vim.cmd("filetype plugin indent on") -vim.cmd("syntax on") -vim.opt.foldmethod = "marker" -vim.opt.scrolloff = 5 -vim.opt.showmode = false -vim.opt.undodir = (vim.env.HOME .. "/.vim/undo-dir") -vim.opt.undofile = true -vim.opt.shortmess = (vim.o.shortmess .. "c") -vim.opt.hidden = true -vim.opt.encoding = "utf-8" -vim.opt.number = false -vim.opt.relativenumber = false -vim.opt.compatible = false -vim.opt.cursorline = true -vim.opt.incsearch = true -vim.opt.hlsearch = true -vim.opt.inccommand = "nosplit" -vim.opt.signcolumn = "yes" -vim.opt.shiftwidth = 2 -vim.opt.tabstop = 2 -vim.opt.backspace = "indent,eol,start" -vim.opt.autoindent = true -vim.opt.smartindent = true -vim.opt.expandtab = true -vim.opt.wrap = false -vim.opt.completeopt = "menuone,noselect" -vim.opt.laststatus = 2 -vim.opt.splitbelow = true -vim.opt.splitright = true -vim.opt.mouse = "a" -vim.opt.shell = "bash" -vim.opt.background = "dark" -vim.opt.swapfile = false -vim.opt.undolevels = 10000 -vim.opt.keywordprg = "rusty-man" -vim.g.AutoPairsMultilineClose = 0 -vim.cmd("let &t_ut=\"\"") -local function _8_() - vim.opt.shiftwidth = 2 - return nil -end -vim.api.nvim_create_autocmd("BufWritePost", {pattern = "*.hs", callback = _8_}) -local function _9_() - vim.opt_local.foldmethod = "marker" - return nil -end -vim.api.nvim_create_autocmd("FileType", {pattern = "vim", callback = _9_}) -local function _10_() - vim.opt_local.formatoptions = (vim.o.formatoptions):gsub("[cor]", "") - return nil -end -vim.api.nvim_create_autocmd("FileType", {pattern = "*", callback = _10_}) -local function _11_() - return vim.cmd("nnoremap :cclose") -end -vim.api.nvim_create_autocmd("FileType", {pattern = "qf", callback = _11_}) -local function _12_() - return vim.highlight.on_yank({higroup = "IncSearch", timeout = 300}) -end -vim.api.nvim_create_autocmd("TextYankPost", {pattern = "*", callback = _12_}) -vim.g.copilot_filetypes = {TelescopePrompt = false} -vim.diagnostic.config({float = {border = "single", style = "minimal"}}) -vim.g.VM_leader = "m" -vim.g.rust_clip_command = "xclip -selection clipboard" -vim.g["conjure#client#fennel#aniseed#aniseed_module_prefix"] = "aniseed." -vim.g.vim_parinfer_filetypes = {"carp", "fennel", "clojure"} -vim.g.parinfer_additional_filetypes = {"yuck"} -_G.clean_no_name_empty_buffers = function() - local bufs - local function _13_(_241) - return (a["empty?"](vim.fn.bufname(_241)) and (vim.fn.bufwinnr(_241) < 0) and vim.api.nvim_buf_is_loaded(_241) and ("" == str.join(utils["buffer-content"](_241))) and vim.api.nvim_buf_get_option(_241, "buflisted")) - end - bufs = a.filter(_13_, vim.fn.range(1, vim.fn.bufnr("$"))) - if not a["empty?"](bufs) then - return vim.cmd(("bdelete " .. str.join(" ", bufs))) - else - return nil - end -end -vim.cmd("autocmd! BufCreate * :call v:lua.clean_no_name_empty_buffers()") -vim.cmd("command! -nargs=1 L :lua print(vim.inspect())") -vim.cmd("Copilot enable") -utils["run-deferred"]() -return _2amodule_2a \ No newline at end of file diff --git a/nvim/.config/nvim/lua/macros.fnl b/nvim/.config/nvim/lua/macros.fnl deleted file mode 100644 index 70abf66..0000000 --- a/nvim/.config/nvim/lua/macros.fnl +++ /dev/null @@ -1,99 +0,0 @@ -{:augroup - (fn [name ...] - `(do - (nvim.ex.augroup ,(tostring name)) - (nvim.ex.autocmd_) - ,... - (nvim.ex.augroup :END))) - - :defer - (fn [...] - `(let [utils# (require :dots.utils)] - (utils#.defer-to-end (fn [] ,...)))) - - - :req - (fn [name ...] - (let [str (require :aniseed.string) - a (require :aniseed.core) - segs (str.split (tostring name) "%.") - mod (str.join "." (a.butlast segs)) - func (a.last segs)] - `((. (require (tostring ,mod)) (tostring ,func)) ,...))) - - :autocmd - (fn [...] - `(nvim.ex.autocmd ,...)) - - :_: - (fn [name ...] - `((. nvim.ex ,(tostring name)) ,...)) - - :viml->fn - (fn [name] - `(.. "lua require('" *module-name* "')['" ,(tostring name) "']()")) - - :dbg - (fn [x] - `(let [view# (require "aniseed.view")] - (print (.. `,(tostring x) " => " (view#.serialise ,x))) - ,x)) - - :dbg-call - (fn [x ...] - `(do - (let [a# (require "aniseed.core")] - (a#.println ,...)) - (,x ,...))) - - :pkg - (fn [name mappings ...] - `(if (~= nil (. packer_plugins `,(tostring name))) - (let ,mappings ,...) - (print (.. "plugin disabled " `,(tostring name))))) - - :vim-let - (fn [field value] - (let [text (.. "let " `,(tostring field) "=\"" value "\"")] - `(vim.cmd ,text))) - - :each-pair - (fn [args ...] - (let [[l# r# d#] args] - `(let [a# (require "aniseed.core") - data# ,d#] - (for [i# 1 (a#.count data#) 2] - (let [,l# (. data# i#) - ,r# (. data# (+ i# 1))] - ,...))))) - - :packer-use - (fn [...] - (let [a (require "aniseed.core") - args [...] - use-statements []] - (for [i 1 (a.count args) 2] - (let [name (. args i) - block (. args (+ i 1))] - (a.assoc block 1 name) - (when (. block :mod) - ;(a.assoc block :config `#((. (require "utils") :safe-require) ,(. block :mod))) - (a.assoc block :config `#( - ;do - ;(print ,(. block :mod)) - ;(time - ;( - require ,(. block :mod)))) - (a.assoc block :mod) - (table.insert use-statements block))) - - (let [use-sym (gensym)] - `(let [packer# (require "packer")] - (packer#.startup - (fn [,use-sym] - ,(unpack - (icollect [_# v# (ipairs use-statements)] - `(,use-sym ,v#)))))))))} - - -