From b5631b1ad8ae110957f3c4511ee33482e19601ee Mon Sep 17 00:00:00 2001 From: buffet Date: Sat, 8 May 2021 22:25:47 +0000 Subject: [PATCH] Basic nvim config --- nvim/.config/nvim/fnl/init.fnl | 16 +- nvim/.config/nvim/fnl/modules/keybinds.fnl | 42 +++ nvim/.config/nvim/fnl/modules/looks.fnl | 45 ++++ nvim/.config/nvim/fnl/modules/options.fnl | 35 +++ .../nvim/fnl/modules/plugins/gitsigns.fnl | 4 + .../nvim/fnl/modules/plugins/telescope.fnl | 7 + nvim/.config/nvim/fnl/utils.fnl | 31 +++ nvim/.config/nvim/init.lua | 74 +++++- nvim/.config/nvim/lua/init.lua | 44 ++++ nvim/.config/nvim/lua/modules/keybinds.lua | 67 +++++ nvim/.config/nvim/lua/modules/looks.lua | 59 +++++ nvim/.config/nvim/lua/modules/lsp.lua | 36 +++ nvim/.config/nvim/lua/modules/options.lua | 69 +++++ .../nvim/lua/modules/plugins/gitsigns.lua | 38 +++ .../nvim/lua/modules/plugins/telescope.lua | 39 +++ nvim/.config/nvim/lua/utils.lua | 159 ++++++++++++ nvim/.config/nvim/plugin/packer_compiled.vim | 243 ++++++++++++++++++ nvim/.config/nvim/plugins.lua | 4 - 18 files changed, 1000 insertions(+), 12 deletions(-) create mode 100644 nvim/.config/nvim/fnl/modules/keybinds.fnl create mode 100644 nvim/.config/nvim/fnl/modules/looks.fnl create mode 100644 nvim/.config/nvim/fnl/modules/options.fnl create mode 100644 nvim/.config/nvim/fnl/modules/plugins/gitsigns.fnl create mode 100644 nvim/.config/nvim/fnl/modules/plugins/telescope.fnl create mode 100644 nvim/.config/nvim/fnl/utils.fnl create mode 100644 nvim/.config/nvim/lua/init.lua create mode 100644 nvim/.config/nvim/lua/modules/keybinds.lua create mode 100644 nvim/.config/nvim/lua/modules/looks.lua create mode 100644 nvim/.config/nvim/lua/modules/lsp.lua create mode 100644 nvim/.config/nvim/lua/modules/options.lua create mode 100644 nvim/.config/nvim/lua/modules/plugins/gitsigns.lua create mode 100644 nvim/.config/nvim/lua/modules/plugins/telescope.lua create mode 100644 nvim/.config/nvim/lua/utils.lua create mode 100644 nvim/.config/nvim/plugin/packer_compiled.vim delete mode 100644 nvim/.config/nvim/plugins.lua diff --git a/nvim/.config/nvim/fnl/init.fnl b/nvim/.config/nvim/fnl/init.fnl index 541ad01..f3099c2 100644 --- a/nvim/.config/nvim/fnl/init.fnl +++ b/nvim/.config/nvim/fnl/init.fnl @@ -1,4 +1,14 @@ -(module nvim-config - {require {a aniseed.core}}) +(module init + {require {a aniseed.core + nvim aniseed.nvim}}) -(a.println "Hello, world!") +;; Load all modules in no particular order +(let [config-path (nvim.fn.stdpath "config") + module-glob (.. config-path "/fnl/modules/**/*.fnl")] + (each [_ path (ipairs (vim.fn.glob module-glob true true true))] + (-> path + (string.gsub (.. config-path "/fnl/") "") + (string.gsub "/" ".") + (string.gsub ".fnl" "") + (string.gsub "fnl" "lua") + (require)))) diff --git a/nvim/.config/nvim/fnl/modules/keybinds.fnl b/nvim/.config/nvim/fnl/modules/keybinds.fnl new file mode 100644 index 0000000..dd6407f --- /dev/null +++ b/nvim/.config/nvim/fnl/modules/keybinds.fnl @@ -0,0 +1,42 @@ +(module modules.keybinds + {require {nvim aniseed.nvim + utils utils + wk which-key}}) + +(defn cmd [s desc] + [(.. "" s "") desc]) + +(nvim.command "let g:mapleader = \"\\\"") + +;; TODO: look into compe +(utils.keymap :i "" "compe#complete()" {:expr true}) +(utils.keymap :i "" "compe#close('')" {:expr true}) + +(utils.keymap :i :kj "") + +(utils.keymap :v "<" "" ">gv") + +(utils.keymap :n "" "h") +(utils.keymap :n "" "j") +(utils.keymap :n "" "k") +(utils.keymap :n "" "l") + +(wk.setup {}) +(wk.register + {"" (cmd "Telescope find_files" "find file") + :r (cmd "Telescope live_grep" "ripgrep") + :b (cmd "Telescope buffers" "select buffer") + :w (cmd "w" "save file") + ":" (cmd "Telescope commands" "search commands") + + :t {:name "+toggle" + :i (cmd "IndentGuidesToggle" "indent guides") + :r (cmd "RainbowParentheses!!" "rainbow parens") + :g (cmd "Goyo" "goyo") + :l (cmd "Limelight!!" "limelight")} + + ;; TODO: lsp binds + :l {:name "+lsp"}} + + {:prefix ""}) diff --git a/nvim/.config/nvim/fnl/modules/looks.fnl b/nvim/.config/nvim/fnl/modules/looks.fnl new file mode 100644 index 0000000..1446941 --- /dev/null +++ b/nvim/.config/nvim/fnl/modules/looks.fnl @@ -0,0 +1,45 @@ +(module modules.looks + {require {nvim aniseed.nvim + utils utils}}) + +(def colors + {:primary + {:background "#fdf6e3" + :foreground "#586e75"} + + :normal + {:black "#07e642" + :red "#dc322f" + :green "#859900" + :yellow "#b58900" + :blue "#268bd2" + :magenta "#d33682" + :cyan "#2aa198" + :white "#eee8d5"} + + :bright + {:black "#002b36" + :red "#cb4b16" + :green "#586e75" + :yellow "#657b83" + :blue "#839496" + :magenta "#6c71c4" + :cyan "#93a1a1" + :white "#fdf6e3"}}) + +(set nvim.o.termguicolors true) +(set nvim.o.background "light") +(set nvim.g.lightline {:colorscheme "solarized"}) +(set nvim.o.fillchars (.. nvim.o.fillchars "vert:│")) + +(nvim.command "colorscheme NeoSolarized") +(utils.highlight "Comment" {:gui "italic"}) + +(utils.highlight "ExtraWhitespace" {:bg colors.normal.red}) +(nvim.command "match ExtraWhitespace /\\s\\+$/") + +(utils.highlight + ["LineNr" + "SignColumn" + "VertSplits"] + {:bg colors.primary.background}) diff --git a/nvim/.config/nvim/fnl/modules/options.fnl b/nvim/.config/nvim/fnl/modules/options.fnl new file mode 100644 index 0000000..eaf0253 --- /dev/null +++ b/nvim/.config/nvim/fnl/modules/options.fnl @@ -0,0 +1,35 @@ +(module modules.options + {require {nvim aniseed.nvim}}) + +(set nvim.o.mouse "a") +(set nvim.o.undodir (.. nvim.env.XDG_CACHE_HOME "/vim-undodir")) +(set nvim.o.undofile true) +(set nvim.o.shortmess (.. nvim.o.shortmess "c")) +(set nvim.o.hidden true) +(set nvim.o.encoding "utf-8") +(set nvim.o.hlsearch true) +(set nvim.o.incsearch true) +(set nvim.o.inccommand "nosplit") +(set nvim.o.ignorecase true) +(set nvim.o.smartcase true) +(set nvim.o.completeopt "longest,menuone,preview") +(set nvim.o.laststatus 2) +(set nvim.o.lazyredraw true) +(set nvim.o.splitbelow true) +(set nvim.o.splitright true) +(set nvim.o.matchtime 2) +(set nvim.o.showmatch true) +(set nvim.o.wrap false) +(set nvim.o.writebackup false) +(set nvim.o.showmode false) +(set nvim.o.updatetime 250) +(set nvim.o.signcolumn "yes") +(set nvim.o.shiftwidth 4) +(set nvim.o.tabstop 4) +(set nvim.o.backspace "indent,eol,start") +(set nvim.o.shiftround true) +(set nvim.o.autoindent true) +(set nvim.o.smartindent true) +(set nvim.o.expandtab true) + +(set nvim.wo.cursorline true) diff --git a/nvim/.config/nvim/fnl/modules/plugins/gitsigns.fnl b/nvim/.config/nvim/fnl/modules/plugins/gitsigns.fnl new file mode 100644 index 0000000..c405c4d --- /dev/null +++ b/nvim/.config/nvim/fnl/modules/plugins/gitsigns.fnl @@ -0,0 +1,4 @@ +(module modules.plugins.singify + {require {gitsigns gitsigns}}) + +(gitsigns.setup) diff --git a/nvim/.config/nvim/fnl/modules/plugins/telescope.fnl b/nvim/.config/nvim/fnl/modules/plugins/telescope.fnl new file mode 100644 index 0000000..ca17eba --- /dev/null +++ b/nvim/.config/nvim/fnl/modules/plugins/telescope.fnl @@ -0,0 +1,7 @@ +(module modules.plugins.telescope + {require {actions telescope.actions + telescope telescope}}) + +(telescope.setup + {:defaults + {:i {"" actions.close}}}) diff --git a/nvim/.config/nvim/fnl/utils.fnl b/nvim/.config/nvim/fnl/utils.fnl new file mode 100644 index 0000000..e380c55 --- /dev/null +++ b/nvim/.config/nvim/fnl/utils.fnl @@ -0,0 +1,31 @@ +(module utils + {require {a aniseed.core + nvim aniseed.nvim}}) + +(defn contains? [list elem] + (or (a.some #(= elem $1) list)) false) + +(defn filter-table [f t] + (collect [k v (pairs t)] + (when (f k v) + (values k v)))) + +(defn without-keys [keys t] + (filter-table #(not (contains? keys $1)) t)) + +(defn keymap [mode from to ?opts] + "Set a mapping in the given mode, and some optional parameters, defaulting to {:noremap true :silent true}. + If :buffer is set, uses buf_set_keymap rather than set_keymap" + (local full-opts + (->> (or ?opts {}) + (a.merge {:noremap true :silent true}) + (without-keys [:buffer]))) + (if (and ?opts (?. ?opts :buffer)) + (nvim.buf_set_keymap 0 mode from to full-opts) + (nvim.set_keymap mode from to full-opts))) + +(defn highlight [groups colset] + (let [groups (if (a.string? groups) [groups] groups) + opts (a.merge {:fg "NONE" :bg "NONE" :gui "NONE"} colset)] + (each [_ group (ipairs groups)] + (nvim.command (.. "hi!" group " guifg='" opts.fg "' guibg='" opts.bg "' gui='" opts.gui "'"))))) diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index c8a544b..6a58c7e 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -1,13 +1,77 @@ -local execute = vim.api.nvim_command +local exec = vim.api.nvim_command local fn = vim.fn local install_path = fn.stdpath('data')..'/site/pack/packer/opt/packer.nvim' -if fn.emtpy(fn.glob(install_path)) > 0 then +if fn.empty(fn.glob(install_path)) > 0 then fn.system({'git', 'clone', 'https://github.com/wbthomason/packer.nvim', install_path}) - execute 'packadd packer.nvim' end -require('plugins') +exec 'packadd packer.nvim' -vim.g['aniseed#env'] = vim.v['true'] +require('packer').startup(function () + use 'wbthomason/packer.nvim' + + use 'Olical/aniseed' + use 'norcalli/nvim.lua' + + -- TODO: look into galaxyline + -- TODO: setup treesitter + -- TODO: look into diffview + -- TODO: look into iamcco/markdown-preview.nvim + use 'ap/vim-css-color' + use 'bhurlow/vim-parinfer' + use 'folke/lsp-trouble.nvim' + use 'folke/which-key.nvim' + use 'glepnir/lspsaga.nvim' + use 'godlygeek/tabular' + use 'hrsh7th/nvim-compe' + use 'itchyny/lightline.vim' + use 'jiangmiao/auto-pairs' + use 'junegunn/goyo.vim' + use 'junegunn/limelight.vim' + use 'junegunn/rainbow_parentheses.vim' + use 'junegunn/vim-slash' + use 'justinmk/vim-sneak' + use 'nathanaelkane/vim-indent-guides' + use 'neovim/nvim-lspconfig' + use 'overcache/NeoSolarized' + use 'psliwka/vim-smoothie' + use 'ray-x/lsp_signature.nvim' + use 'roryokane/detectindent' + use 'rust-lang/rust.vim' + use 'sheerun/vim-polyglot' + use 'simrat39/rust-tools.nvim' + use 'tommcdo/vim-exchange' + use 'tpope/vim-fugitive' + use 'tpope/vim-repeat' + use 'tpope/vim-surround' + use 'vmchale/ats-vim' + use 'wellle/targets.vim' + + use { + 'Olical/conjure', + requires = { + 'tami5/compe-conjure' + }, + + config = "vim.g['conjure#client#fennel#aniseed#aniseed_module_prefix'] = 'aniseed.'", + } + + use { + 'lewis6991/gitsigns.nvim', + requires = { + 'nvim-lua/plenary.nvim', + }, + } + + use { + 'nvim-telescope/telescope.nvim', + requires = { + 'nvim-lua/plenary.nvim', + 'nvim-lua/popup.nvim', + }, + } +end) + +vim.g['aniseed#env'] = true diff --git a/nvim/.config/nvim/lua/init.lua b/nvim/.config/nvim/lua/init.lua new file mode 100644 index 0000000..4aa7b88 --- /dev/null +++ b/nvim/.config/nvim/lua/init.lua @@ -0,0 +1,44 @@ +local _0_0 +do + local name_0_ = "init" + local module_0_ + do + local x_0_ = package.loaded[name_0_] + if ("table" == type(x_0_)) then + module_0_ = x_0_ + else + module_0_ = {} + end + end + module_0_["aniseed/module"] = name_0_ + module_0_["aniseed/locals"] = ((module_0_)["aniseed/locals"] or {}) + module_0_["aniseed/local-fns"] = ((module_0_)["aniseed/local-fns"] or {}) + package.loaded[name_0_] = module_0_ + _0_0 = module_0_ +end +local autoload = (require("aniseed.autoload")).autoload +local function _1_(...) + local ok_3f_0_, val_0_ = nil, nil + local function _1_() + return {require("aniseed.core"), require("aniseed.nvim")} + end + ok_3f_0_, val_0_ = pcall(_1_) + if ok_3f_0_ then + _0_0["aniseed/local-fns"] = {require = {a = "aniseed.core", nvim = "aniseed.nvim"}} + return val_0_ + else + return print(val_0_) + end +end +local _local_0_ = _1_(...) +local a = _local_0_[1] +local nvim = _local_0_[2] +local _2amodule_2a = _0_0 +local _2amodule_name_2a = "init" +do local _ = ({nil, _0_0, nil, {{}, nil, nil, nil}})[2] end +local config_path = nvim.fn.stdpath("config") +local module_glob = (config_path .. "/fnl/modules/**/*.fnl") +for _, path in ipairs(vim.fn.glob(module_glob, true, true, true)) do + require(string.gsub(string.gsub(string.gsub(string.gsub(path, (config_path .. "/fnl/"), ""), "/", "."), ".fnl", ""), "fnl", "lua")) +end +return nil \ No newline at end of file diff --git a/nvim/.config/nvim/lua/modules/keybinds.lua b/nvim/.config/nvim/lua/modules/keybinds.lua new file mode 100644 index 0000000..2b3c474 --- /dev/null +++ b/nvim/.config/nvim/lua/modules/keybinds.lua @@ -0,0 +1,67 @@ +local _0_0 +do + local name_0_ = "modules.keybinds" + local module_0_ + do + local x_0_ = package.loaded[name_0_] + if ("table" == type(x_0_)) then + module_0_ = x_0_ + else + module_0_ = {} + end + end + module_0_["aniseed/module"] = name_0_ + module_0_["aniseed/locals"] = ((module_0_)["aniseed/locals"] or {}) + module_0_["aniseed/local-fns"] = ((module_0_)["aniseed/local-fns"] or {}) + package.loaded[name_0_] = module_0_ + _0_0 = module_0_ +end +local autoload = (require("aniseed.autoload")).autoload +local function _1_(...) + local ok_3f_0_, val_0_ = nil, nil + local function _1_() + return {require("aniseed.nvim"), require("utils"), require("which-key")} + end + ok_3f_0_, val_0_ = pcall(_1_) + if ok_3f_0_ then + _0_0["aniseed/local-fns"] = {require = {nvim = "aniseed.nvim", utils = "utils", wk = "which-key"}} + return val_0_ + else + return print(val_0_) + end +end +local _local_0_ = _1_(...) +local nvim = _local_0_[1] +local utils = _local_0_[2] +local wk = _local_0_[3] +local _2amodule_2a = _0_0 +local _2amodule_name_2a = "modules.keybinds" +do local _ = ({nil, _0_0, nil, {{}, nil, nil, nil}})[2] end +local cmd +do + local v_0_ + do + local v_0_0 + local function cmd0(s, desc) + return {("" .. s .. ""), desc} + end + v_0_0 = cmd0 + _0_0["cmd"] = v_0_0 + v_0_ = v_0_0 + end + local t_0_ = (_0_0)["aniseed/locals"] + t_0_["cmd"] = v_0_ + cmd = v_0_ +end +nvim.command("let g:mapleader = \"\\\"") +utils.keymap("i", "", "compe#complete()", {expr = true}) +utils.keymap("i", "", "compe#close('')", {expr = true}) +utils.keymap("i", "kj", "") +utils.keymap("v", "<", "", ">gv") +utils.keymap("n", "", "h") +utils.keymap("n", "", "j") +utils.keymap("n", "", "k") +utils.keymap("n", "", "l") +wk.setup({}) +return wk.register({[":"] = cmd("Telescope commands", "search commands"), [""] = cmd("Telescope find_files", "find file"), b = cmd("Telescope buffers", "select buffer"), l = {name = "+lsp"}, r = cmd("Telescope live_grep", "ripgrep"), t = {g = cmd("Goyo", "goyo"), i = cmd("IndentGuidesToggle", "indent guides"), l = cmd("Limelight!!", "limelight"), name = "+toggle", r = cmd("RainbowParentheses!!", "rainbow parens")}, w = cmd("w", "save file")}, {prefix = ""}) \ No newline at end of file diff --git a/nvim/.config/nvim/lua/modules/looks.lua b/nvim/.config/nvim/lua/modules/looks.lua new file mode 100644 index 0000000..a0c6ddf --- /dev/null +++ b/nvim/.config/nvim/lua/modules/looks.lua @@ -0,0 +1,59 @@ +local _0_0 +do + local name_0_ = "modules.looks" + local module_0_ + do + local x_0_ = package.loaded[name_0_] + if ("table" == type(x_0_)) then + module_0_ = x_0_ + else + module_0_ = {} + end + end + module_0_["aniseed/module"] = name_0_ + module_0_["aniseed/locals"] = ((module_0_)["aniseed/locals"] or {}) + module_0_["aniseed/local-fns"] = ((module_0_)["aniseed/local-fns"] or {}) + package.loaded[name_0_] = module_0_ + _0_0 = module_0_ +end +local autoload = (require("aniseed.autoload")).autoload +local function _1_(...) + local ok_3f_0_, val_0_ = nil, nil + local function _1_() + return {require("aniseed.nvim"), require("utils")} + end + ok_3f_0_, val_0_ = pcall(_1_) + if ok_3f_0_ then + _0_0["aniseed/local-fns"] = {require = {nvim = "aniseed.nvim", utils = "utils"}} + return val_0_ + else + return print(val_0_) + end +end +local _local_0_ = _1_(...) +local nvim = _local_0_[1] +local utils = _local_0_[2] +local _2amodule_2a = _0_0 +local _2amodule_name_2a = "modules.looks" +do local _ = ({nil, _0_0, nil, {{}, nil, nil, nil}})[2] end +local colors +do + local v_0_ + do + local v_0_0 = {bright = {black = "#002b36", blue = "#839496", cyan = "#93a1a1", green = "#586e75", magenta = "#6c71c4", red = "#cb4b16", white = "#fdf6e3", yellow = "#657b83"}, normal = {black = "#07e642", blue = "#268bd2", cyan = "#2aa198", green = "#859900", magenta = "#d33682", red = "#dc322f", white = "#eee8d5", yellow = "#b58900"}, primary = {background = "#fdf6e3", foreground = "#586e75"}} + _0_0["colors"] = v_0_0 + v_0_ = v_0_0 + end + local t_0_ = (_0_0)["aniseed/locals"] + t_0_["colors"] = v_0_ + colors = v_0_ +end +nvim.o.termguicolors = true +nvim.o.background = "light" +nvim.g.lightline = {colorscheme = "solarized"} +nvim.o.fillchars = (nvim.o.fillchars .. "vert:\226\148\130") +nvim.command("colorscheme NeoSolarized") +utils.highlight("Comment", {gui = "italic"}) +utils.highlight("ExtraWhitespace", {bg = colors.normal.red}) +nvim.command("match ExtraWhitespace /\\s\\+$/") +return utils.highlight({"LineNr", "SignColumn", "VertSplits"}, {bg = colors.primary.background}) \ No newline at end of file diff --git a/nvim/.config/nvim/lua/modules/lsp.lua b/nvim/.config/nvim/lua/modules/lsp.lua new file mode 100644 index 0000000..d8981ef --- /dev/null +++ b/nvim/.config/nvim/lua/modules/lsp.lua @@ -0,0 +1,36 @@ +local _0_0 +do + local name_0_ = "modules.lsp" + local module_0_ + do + local x_0_ = package.loaded[name_0_] + if ("table" == type(x_0_)) then + module_0_ = x_0_ + else + module_0_ = {} + end + end + module_0_["aniseed/module"] = name_0_ + module_0_["aniseed/locals"] = ((module_0_)["aniseed/locals"] or {}) + module_0_["aniseed/local-fns"] = ((module_0_)["aniseed/local-fns"] or {}) + package.loaded[name_0_] = module_0_ + _0_0 = module_0_ +end +local autoload = (require("aniseed.autoload")).autoload +local function _1_(...) + local ok_3f_0_, val_0_ = nil, nil + local function _1_() + return {} + end + ok_3f_0_, val_0_ = pcall(_1_) + if ok_3f_0_ then + _0_0["aniseed/local-fns"] = {} + return val_0_ + else + return print(val_0_) + end +end +local _local_0_ = _1_(...) +local _2amodule_2a = _0_0 +local _2amodule_name_2a = "modules.lsp" +return ({nil, _0_0, nil, {{}, nil, nil, nil}})[2] \ No newline at end of file diff --git a/nvim/.config/nvim/lua/modules/options.lua b/nvim/.config/nvim/lua/modules/options.lua new file mode 100644 index 0000000..5bc3da2 --- /dev/null +++ b/nvim/.config/nvim/lua/modules/options.lua @@ -0,0 +1,69 @@ +local _0_0 +do + local name_0_ = "modules.options" + local module_0_ + do + local x_0_ = package.loaded[name_0_] + if ("table" == type(x_0_)) then + module_0_ = x_0_ + else + module_0_ = {} + end + end + module_0_["aniseed/module"] = name_0_ + module_0_["aniseed/locals"] = ((module_0_)["aniseed/locals"] or {}) + module_0_["aniseed/local-fns"] = ((module_0_)["aniseed/local-fns"] or {}) + package.loaded[name_0_] = module_0_ + _0_0 = module_0_ +end +local autoload = (require("aniseed.autoload")).autoload +local function _1_(...) + local ok_3f_0_, val_0_ = nil, nil + local function _1_() + return {require("aniseed.nvim")} + end + ok_3f_0_, val_0_ = pcall(_1_) + if ok_3f_0_ then + _0_0["aniseed/local-fns"] = {require = {nvim = "aniseed.nvim"}} + return val_0_ + else + return print(val_0_) + end +end +local _local_0_ = _1_(...) +local nvim = _local_0_[1] +local _2amodule_2a = _0_0 +local _2amodule_name_2a = "modules.options" +do local _ = ({nil, _0_0, nil, {{}, nil, nil, nil}})[2] end +nvim.o.mouse = "a" +nvim.o.undodir = (nvim.env.XDG_CACHE_HOME .. "/vim-undodir") +nvim.o.undofile = true +nvim.o.shortmess = (nvim.o.shortmess .. "c") +nvim.o.hidden = true +nvim.o.encoding = "utf-8" +nvim.o.hlsearch = true +nvim.o.incsearch = true +nvim.o.inccommand = "nosplit" +nvim.o.ignorecase = true +nvim.o.smartcase = true +nvim.o.completeopt = "longest,menuone,preview" +nvim.o.laststatus = 2 +nvim.o.lazyredraw = true +nvim.o.splitbelow = true +nvim.o.splitright = true +nvim.o.matchtime = 2 +nvim.o.showmatch = true +nvim.o.wrap = false +nvim.o.writebackup = false +nvim.o.showmode = false +nvim.o.updatetime = 250 +nvim.o.signcolumn = "yes" +nvim.o.shiftwidth = 4 +nvim.o.tabstop = 4 +nvim.o.backspace = "indent,eol,start" +nvim.o.shiftround = true +nvim.o.autoindent = true +nvim.o.smartindent = true +nvim.o.expandtab = true +nvim.wo.cursorline = true +return nil \ No newline at end of file diff --git a/nvim/.config/nvim/lua/modules/plugins/gitsigns.lua b/nvim/.config/nvim/lua/modules/plugins/gitsigns.lua new file mode 100644 index 0000000..d1c5ade --- /dev/null +++ b/nvim/.config/nvim/lua/modules/plugins/gitsigns.lua @@ -0,0 +1,38 @@ +local _0_0 +do + local name_0_ = "modules.plugins.singify" + local module_0_ + do + local x_0_ = package.loaded[name_0_] + if ("table" == type(x_0_)) then + module_0_ = x_0_ + else + module_0_ = {} + end + end + module_0_["aniseed/module"] = name_0_ + module_0_["aniseed/locals"] = ((module_0_)["aniseed/locals"] or {}) + module_0_["aniseed/local-fns"] = ((module_0_)["aniseed/local-fns"] or {}) + package.loaded[name_0_] = module_0_ + _0_0 = module_0_ +end +local autoload = (require("aniseed.autoload")).autoload +local function _1_(...) + local ok_3f_0_, val_0_ = nil, nil + local function _1_() + return {require("gitsigns")} + end + ok_3f_0_, val_0_ = pcall(_1_) + if ok_3f_0_ then + _0_0["aniseed/local-fns"] = {require = {gitsigns = "gitsigns"}} + return val_0_ + else + return print(val_0_) + end +end +local _local_0_ = _1_(...) +local gitsigns = _local_0_[1] +local _2amodule_2a = _0_0 +local _2amodule_name_2a = "modules.plugins.singify" +do local _ = ({nil, _0_0, nil, {{}, nil, nil, nil}})[2] end +return gitsigns.setup() \ No newline at end of file diff --git a/nvim/.config/nvim/lua/modules/plugins/telescope.lua b/nvim/.config/nvim/lua/modules/plugins/telescope.lua new file mode 100644 index 0000000..f26e7c7 --- /dev/null +++ b/nvim/.config/nvim/lua/modules/plugins/telescope.lua @@ -0,0 +1,39 @@ +local _0_0 +do + local name_0_ = "modules.plugins.telescope" + local module_0_ + do + local x_0_ = package.loaded[name_0_] + if ("table" == type(x_0_)) then + module_0_ = x_0_ + else + module_0_ = {} + end + end + module_0_["aniseed/module"] = name_0_ + module_0_["aniseed/locals"] = ((module_0_)["aniseed/locals"] or {}) + module_0_["aniseed/local-fns"] = ((module_0_)["aniseed/local-fns"] or {}) + package.loaded[name_0_] = module_0_ + _0_0 = module_0_ +end +local autoload = (require("aniseed.autoload")).autoload +local function _1_(...) + local ok_3f_0_, val_0_ = nil, nil + local function _1_() + return {require("telescope.actions"), require("telescope")} + end + ok_3f_0_, val_0_ = pcall(_1_) + if ok_3f_0_ then + _0_0["aniseed/local-fns"] = {require = {actions = "telescope.actions", telescope = "telescope"}} + return val_0_ + else + return print(val_0_) + end +end +local _local_0_ = _1_(...) +local actions = _local_0_[1] +local telescope = _local_0_[2] +local _2amodule_2a = _0_0 +local _2amodule_name_2a = "modules.plugins.telescope" +do local _ = ({nil, _0_0, nil, {{}, nil, nil, nil}})[2] end +return telescope.setup({defaults = {i = {[""] = actions.close}}}) \ No newline at end of file diff --git a/nvim/.config/nvim/lua/utils.lua b/nvim/.config/nvim/lua/utils.lua new file mode 100644 index 0000000..b339fad --- /dev/null +++ b/nvim/.config/nvim/lua/utils.lua @@ -0,0 +1,159 @@ +local _0_0 +do + local name_0_ = "utils" + local module_0_ + do + local x_0_ = package.loaded[name_0_] + if ("table" == type(x_0_)) then + module_0_ = x_0_ + else + module_0_ = {} + end + end + module_0_["aniseed/module"] = name_0_ + module_0_["aniseed/locals"] = ((module_0_)["aniseed/locals"] or {}) + module_0_["aniseed/local-fns"] = ((module_0_)["aniseed/local-fns"] or {}) + package.loaded[name_0_] = module_0_ + _0_0 = module_0_ +end +local autoload = (require("aniseed.autoload")).autoload +local function _1_(...) + local ok_3f_0_, val_0_ = nil, nil + local function _1_() + return {require("aniseed.core"), require("aniseed.nvim")} + end + ok_3f_0_, val_0_ = pcall(_1_) + if ok_3f_0_ then + _0_0["aniseed/local-fns"] = {require = {a = "aniseed.core", nvim = "aniseed.nvim"}} + return val_0_ + else + return print(val_0_) + end +end +local _local_0_ = _1_(...) +local a = _local_0_[1] +local nvim = _local_0_[2] +local _2amodule_2a = _0_0 +local _2amodule_name_2a = "utils" +do local _ = ({nil, _0_0, nil, {{}, nil, nil, nil}})[2] end +local contains_3f +do + local v_0_ + do + local v_0_0 + local function contains_3f0(list, elem) + local function _2_(_241) + return (elem == _241) + end + do local _ = a.some(_2_, list) end + return false + end + v_0_0 = contains_3f0 + _0_0["contains?"] = v_0_0 + v_0_ = v_0_0 + end + local t_0_ = (_0_0)["aniseed/locals"] + t_0_["contains?"] = v_0_ + contains_3f = v_0_ +end +local filter_table +do + local v_0_ + do + local v_0_0 + local function filter_table0(f, t) + local tbl_0_ = {} + for k, v in pairs(t) do + local _2_0, _3_0 = nil, nil + if f(k, v) then + _2_0, _3_0 = k, v + else + _2_0, _3_0 = nil + end + if ((nil ~= _2_0) and (nil ~= _3_0)) then + local k_0_ = _2_0 + local v_0_1 = _3_0 + tbl_0_[k_0_] = v_0_1 + end + end + return tbl_0_ + end + v_0_0 = filter_table0 + _0_0["filter-table"] = v_0_0 + v_0_ = v_0_0 + end + local t_0_ = (_0_0)["aniseed/locals"] + t_0_["filter-table"] = v_0_ + filter_table = v_0_ +end +local without_keys +do + local v_0_ + do + local v_0_0 + local function without_keys0(keys, t) + local function _2_(_241) + return not contains_3f(keys, _241) + end + return filter_table(_2_, t) + end + v_0_0 = without_keys0 + _0_0["without-keys"] = v_0_0 + v_0_ = v_0_0 + end + local t_0_ = (_0_0)["aniseed/locals"] + t_0_["without-keys"] = v_0_ + without_keys = v_0_ +end +local keymap +do + local v_0_ + do + local v_0_0 + local function keymap0(mode, from, to, _3fopts) + local full_opts = without_keys({"buffer"}, a.merge({noremap = true, silent = true}, (_3fopts or {}))) + local function _2_() + local res_0_ = (_3fopts).buffer + return (res_0_ and res_0_) + end + if (_3fopts and _2_()) then + return nvim.buf_set_keymap(0, mode, from, to, full_opts) + else + return nvim.set_keymap(mode, from, to, full_opts) + end + end + v_0_0 = keymap0 + _0_0["keymap"] = v_0_0 + v_0_ = v_0_0 + end + local t_0_ = (_0_0)["aniseed/locals"] + t_0_["keymap"] = v_0_ + keymap = v_0_ +end +local highlight +do + local v_0_ + do + local v_0_0 + local function highlight0(groups, colset) + local groups0 + if a["string?"](groups) then + groups0 = {groups} + else + groups0 = groups + end + local opts = a.merge({bg = "NONE", fg = "NONE", gui = "NONE"}, colset) + for _, group in ipairs(groups0) do + nvim.command(("hi!" .. group .. " guifg='" .. opts.fg .. "' guibg='" .. opts.bg .. "' gui='" .. opts.gui .. "'")) + end + return nil + end + v_0_0 = highlight0 + _0_0["highlight"] = v_0_0 + v_0_ = v_0_0 + end + local t_0_ = (_0_0)["aniseed/locals"] + t_0_["highlight"] = v_0_ + highlight = v_0_ +end +return nil \ No newline at end of file diff --git a/nvim/.config/nvim/plugin/packer_compiled.vim b/nvim/.config/nvim/plugin/packer_compiled.vim new file mode 100644 index 0000000..90db48b --- /dev/null +++ b/nvim/.config/nvim/plugin/packer_compiled.vim @@ -0,0 +1,243 @@ +" Automatically generated packer.nvim plugin loader code + +if !has('nvim-0.5') + echohl WarningMsg + echom "Invalid Neovim version for packer.nvim!" + echohl None + finish +endif + +packadd packer.nvim + +try + +lua << END + local time + local profile_info + local should_profile = false + if should_profile then + local hrtime = vim.loop.hrtime + profile_info = {} + time = function(chunk, start) + if start then + profile_info[chunk] = hrtime() + else + profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6 + end + end + else + time = function(chunk, start) end + end + +local function save_profiles(threshold) + local sorted_times = {} + for chunk_name, time_taken in pairs(profile_info) do + sorted_times[#sorted_times + 1] = {chunk_name, time_taken} + end + table.sort(sorted_times, function(a, b) return a[2] > b[2] end) + local results = {} + for i, elem in ipairs(sorted_times) do + if not threshold or threshold and elem[2] > threshold then + results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms' + end + end + + _G._packer = _G._packer or {} + _G._packer.profile_output = results +end + +time("Luarocks path setup", true) +local package_path_str = "/home/buffet/.cache/nvim/packer_hererocks/2.0.5/share/lua/5.1/?.lua;/home/buffet/.cache/nvim/packer_hererocks/2.0.5/share/lua/5.1/?/init.lua;/home/buffet/.cache/nvim/packer_hererocks/2.0.5/lib/luarocks/rocks-5.1/?.lua;/home/buffet/.cache/nvim/packer_hererocks/2.0.5/lib/luarocks/rocks-5.1/?/init.lua" +local install_cpath_pattern = "/home/buffet/.cache/nvim/packer_hererocks/2.0.5/lib/lua/5.1/?.so" +if not string.find(package.path, package_path_str, 1, true) then + package.path = package.path .. ';' .. package_path_str +end + +if not string.find(package.cpath, install_cpath_pattern, 1, true) then + package.cpath = package.cpath .. ';' .. install_cpath_pattern +end + +time("Luarocks path setup", false) +time("try_loadstring definition", true) +local function try_loadstring(s, component, name) + local success, result = pcall(loadstring(s)) + if not success then + print('Error running ' .. component .. ' for ' .. name) + error(result) + end + return result +end + +time("try_loadstring definition", false) +time("Defining packer_plugins", true) +_G.packer_plugins = { + NeoSolarized = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/NeoSolarized" + }, + aniseed = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/aniseed" + }, + ["ats-vim"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/ats-vim" + }, + ["auto-pairs"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/auto-pairs" + }, + ["compe-conjure"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/compe-conjure" + }, + conjure = { + config = { "vim.g['conjure#client#fennel#aniseed#aniseed_module_prefix'] = 'aniseed.'" }, + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/conjure" + }, + detectindent = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/detectindent" + }, + ["gitsigns.nvim"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/gitsigns.nvim" + }, + ["goyo.vim"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/goyo.vim" + }, + ["lightline.vim"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/lightline.vim" + }, + ["limelight.vim"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/limelight.vim" + }, + ["lsp-trouble.nvim"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/lsp-trouble.nvim" + }, + ["lsp_signature.nvim"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/lsp_signature.nvim" + }, + ["lspsaga.nvim"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/lspsaga.nvim" + }, + ["nvim-compe"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/nvim-compe" + }, + ["nvim-lspconfig"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/nvim-lspconfig" + }, + ["nvim.lua"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/nvim.lua" + }, + ["packer.nvim"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/packer.nvim" + }, + ["plenary.nvim"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/plenary.nvim" + }, + ["popup.nvim"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/popup.nvim" + }, + ["rainbow_parentheses.vim"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/rainbow_parentheses.vim" + }, + ["rust-tools.nvim"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/rust-tools.nvim" + }, + ["rust.vim"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/rust.vim" + }, + tabular = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/tabular" + }, + ["targets.vim"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/targets.vim" + }, + ["telescope.nvim"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/telescope.nvim" + }, + ["vim-css-color"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/vim-css-color" + }, + ["vim-exchange"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/vim-exchange" + }, + ["vim-fugitive"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/vim-fugitive" + }, + ["vim-indent-guides"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/vim-indent-guides" + }, + ["vim-parinfer"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/vim-parinfer" + }, + ["vim-polyglot"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/vim-polyglot" + }, + ["vim-repeat"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/vim-repeat" + }, + ["vim-slash"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/vim-slash" + }, + ["vim-smoothie"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/vim-smoothie" + }, + ["vim-sneak"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/vim-sneak" + }, + ["vim-surround"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/vim-surround" + }, + ["which-key.nvim"] = { + loaded = true, + path = "/home/buffet/.local/share/nvim/site/pack/packer/start/which-key.nvim" + } +} + +time("Defining packer_plugins", false) +-- Config for: conjure +time("Config for conjure", true) +vim.g['conjure#client#fennel#aniseed#aniseed_module_prefix'] = 'aniseed.' +time("Config for conjure", false) +if should_profile then save_profiles() end + +END + +catch + echohl ErrorMsg + echom "Error in packer_compiled: " .. v:exception + echom "Please check your config for correctness" + echohl None +endtry diff --git a/nvim/.config/nvim/plugins.lua b/nvim/.config/nvim/plugins.lua deleted file mode 100644 index ca2d672..0000000 --- a/nvim/.config/nvim/plugins.lua +++ /dev/null @@ -1,4 +0,0 @@ -return require('packer').startup(function () - use 'Olical/aniseed' - use 'norcalli/nvim.lua' -end)