more stuff in lua/fennel

This commit is contained in:
elkowar 2021-04-23 16:46:45 +02:00
parent 57b985b9ff
commit 6ea22fa0ec
16 changed files with 725 additions and 264 deletions

View file

@ -9,54 +9,35 @@
(require "plugins.telescope") (require "plugins.telescope")
(require "plugins.lsp") (require "plugins.lsp")
(require "plugins.galaxyline") (require "plugins.galaxyline")
(require "plugins.bufferline")
(global pp
(fn [x]
(print (fennel.view x))))
;(set nvim.g.conjure#client#fennel#aniseed#aniseed_module_prefix "aniseed.") ;(set nvim.g.conjure#client#fennel#aniseed#aniseed_module_prefix "aniseed.")
(local colors (utils.colors))
(local bufferline (require "bufferline"))
; :h bufferline-lua-highlights
(let [selected { :guibg colors.neutral_aqua :guifg colors.dark0 :gui ""}
visible { :guibg colors.dark1 :guifg colors.neutral_aqua :gui ""}]
(bufferline.setup
{ :options
{ :diagnostics "nvim_lsp"
:diagnostics_indicator (fn [cnt lvl diagnostics-dict] (.. " (" cnt ")"))
:show_buffer_close_icons false
:show_close_icon false
:show_tab_indicators false
:enforce_regular_tabs false
:tab_size 10}
:highlights
{ :fill { :guibg colors.dark0 :guifg colors.light0}
:background visible
:buffer_visible visible
:buffer_selected selected
:modified visible
:modified_visible visible
:modified_selected selected
:error visible
:error_selected selected
:error_visible visible
:warning visible
:warning_selected selected
:warning_visible visible
:separator visible
:indicator_selected {:guibg colors.neutral_aqua :guifg colors.neutral_aqua}
; stuff I've never seen before :thonk:
:pick_selected {:guibg colors.bright_red :guifg colors.bright_red}
:tab_selected {:guibg colors.bright_green :guifg colors.bright_green}
:tab {:guibg colors.bright_yellow :guifg colors.bright_yellow}}}))
(utils.highlight :BufferLineInfoSelected { :bg colors.neutral_aqua :fg colors.dark0 :gui "NONE"}) ; " :: and _ as space ------------------------------------------------------------------- {{{
(var remapped-space nil)
(fn _G.RebindShit [newKey]
(set remapped-space {:old (vim.fn.maparg :<Space> :i)
:cur newKey})
(utils.keymap :i :<Space> newKey {:buffer true}))
(fn _G.UnbindSpaceStuff []
(if (and remapped-space (~= remapped-space {}))
(do
(utils.del-keymap :i :<Space> true)
(if (~= remapped-space.old "")
(utils.keymap :i :<Space> remapped-space.old {:buffer true}))
(set remapped-space nil))))
(nvim.command "autocmd! InsertLeave * :call v:lua.UnbindSpaceStuff()")
(utils.keymap :n "<Tab>j" ":call v:lua.RebindShit('_')<CR>")
(utils.keymap :n "<Tab>k" ":call v:lua.RebindShit('::')<CR>")
(utils.keymap :i "<Tab>j" "<space><C-o>:call v:lua.RebindShit('_')<CR>")
(utils.keymap :i "<Tab>k" "<space><C-o>:call v:lua.RebindShit('::')<CR>")
(utils.keymap :n "ö" "a")
; }}}

View file

@ -6,13 +6,11 @@
require-macros [macros]}) require-macros [macros]})
(utils.noremap :n :<leader> ":<c-u>WhichKey '<Space>'<CR>") (utils.keymap :n :<leader> ":<c-u>WhichKey '<Space>'<CR>")
(utils.noremap :v :<leader> ":<c-u>WhichKeyVisual '<Space>'<CR>") (utils.keymap :v :<leader> ":<c-u>WhichKeyVisual '<Space>'<CR>")
;(utils.mapexpr :i :<CR> "compe#confirm(lexima#expand('<LT>CR>', 'i'))") (utils.keymap :i :<C-Space> "compe#complete()" {:expr true})
(utils.keymap :i :<esc> "compe#close('<esc>')" {:expr true})
(utils.mapexpr :i :<C-Space> "compe#complete()")
(utils.mapexpr :i :<esc> "compe#close('<esc>')")

View file

@ -0,0 +1,47 @@
(module plugins.bufferline
{require {a aniseed.core
fennel aniseed.fennel
nvim aniseed.nvim
utils utils
bufferline bufferline}})
(local colors (utils.colors))
; :h bufferline-lua-highlights
(let [selected { :guibg colors.neutral_aqua :guifg colors.dark0 :gui ""}
visible { :guibg colors.dark1 :guifg colors.neutral_aqua :gui ""}]
(bufferline.setup
{ :options
{ :diagnostics "nvim_lsp"
:diagnostics_indicator (fn [cnt lvl diagnostics-dict] (.. " (" cnt ")"))
:show_buffer_close_icons false
:show_close_icon false
:show_tab_indicators false
:enforce_regular_tabs false
:tab_size 10}
:highlights
{ :fill { :guibg colors.dark0 :guifg colors.light0}
:background visible
:buffer_visible visible
:buffer_selected selected
:modified visible
:modified_visible visible
:modified_selected selected
:error visible
:error_selected selected
:error_visible visible
:warning visible
:warning_selected selected
:warning_visible visible
:separator visible
:indicator_selected {:guibg colors.neutral_aqua :guifg colors.neutral_aqua}
; stuff I've never seen before :thonk:
:pick_selected {:guibg colors.bright_red :guifg colors.bright_red}
:tab_selected {:guibg colors.bright_green :guifg colors.bright_green}
:tab {:guibg colors.bright_yellow :guifg colors.bright_yellow}}}))
(utils.highlight :BufferLineInfoSelected { :bg colors.neutral_aqua :fg colors.dark0 :gui "NONE"})

View file

@ -41,11 +41,9 @@
(fn init-lsp [lsp-name ?opts] (fn init-lsp [lsp-name ?opts]
"initialize a language server with defaults" "initialize a language server with defaults"
(let [merged-opts {:on_attach on_attach}] (let [merged-opts (a.merge {:on_attach on_attach} (or ?opts {}))]
(each [k v (pairs (or opts {}))]
(tset merged-opts k v))
((. lsp lsp-name :setup) merged-opts))) ((. lsp lsp-name :setup) merged-opts)))
(init-lsp :rust_analyzer { :capabilities capabilities}) (init-lsp :rust_analyzer { :capabilities capabilities})
(init-lsp :tsserver { :root_dir (lsp.util.root_pattern "package.json")}) (init-lsp :tsserver { :root_dir (lsp.util.root_pattern "package.json")})

View file

@ -7,12 +7,10 @@
telescope telescope telescope telescope
actions telescope.actions}}) actions telescope.actions}})
(telescope.setup (telescope.setup
{:defaults {:defaults
{:i { "<esc>" actions.close}}}) {:i { "<esc>" actions.close}}})
(telescope.load_extension "media_files") (telescope.load_extension "media_files")
(utils.noremap :n :<C-p> ":Telescope find_files<CR>") (utils.keymap :n :<C-p> ":Telescope find_files<CR>")

View file

@ -1,15 +1,37 @@
(module utils (module utils
{require {a aniseed.core {require {a aniseed.core
nvim aniseed.nvim} nvim aniseed.nvim
fun fun}
require-macros [macros]}) require-macros [macros]})
(defn noremap [mode from to]
"Sets a mapping with {:noremap true :silent true}."
(nvim.set_keymap mode from to {:noremap true :silent true}))
(defn mapexpr [mode from to] (defn dbg [x]
"Sets a mapping with {:noremap true :silent true :expr true}." (a.pr x)
(nvim.set_keymap mode from to {:noremap true :silent true :expr true})) x)
(defn contains? [list elem]
(fun.any #(= elem $1) list))
(defn without-keys [keys t]
(fun.filter #(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])
fun.tomap))
(if (and ?opts (?. ?opts :buffer))
(nvim.buf_set_keymap 0 mode from to full-opts)
(nvim.set_keymap mode from to full-opts)))
(defn del-keymap [mode from ?buf-local]
"Remove a keymap. Arguments: mode, mapping, bool if mapping should be buffer-local."
(if ?buf-local
(nvim.buf_del_keymap 0 mode from)
(nvim.del_keymap mode from)))

View file

@ -9,8 +9,7 @@
let g:vim_config_root = expand('<sfile>:p:h') let g:vim_config_root = expand('<sfile>:p:h')
let $VIM_ROOT = g:vim_config_root let $VIM_ROOT = g:vim_config_root
source $VIM_ROOT/plugins.vim luafile $VIM_ROOT/plugins.lua
if &shell =~# 'fish$' if &shell =~# 'fish$'
set shell=bash set shell=bash
@ -219,44 +218,6 @@ hi SignifySignAdd cterm=NONE gui=NONE guifg='#8ec07c'
" }}} " }}}
" }}}
" :: and _ as space ------------------------------------------------------------------- {{{
function RebindShit(newKey)
let b:RemappedSpace={
\ 'old': maparg("<Space>", "i"),
\ 'cur': a:newKey
\ }
exe 'inoremap <buffer> <Space>' a:newKey
endfun
function! UnbindSpaceStuff()
if get(b:, "RemappedSpace", {}) != {}
exe 'iunmap <buffer> <Space>'
if b:RemappedSpace['old'] != ""
exe 'inoremap <buffer> <space>' b:RemappedSpace['old']
endif
unlet b:RemappedSpace
endif
endfun
augroup UnmapSpaceStuff
autocmd!
autocmd InsertLeave * call UnbindSpaceStuff()
augroup END
nnoremap <Tab>j :call RebindShit("_")<CR>a
nnoremap <Tab>k :call RebindShit("::")<CR>a
inoremap <Tab>j <space><C-o>:call RebindShit("_")<CR>
inoremap <Tab>k <space><C-o>:call RebindShit("::")<CR>
nnoremap ö a
" }}} " }}}

View file

@ -41,18 +41,25 @@ do local _ = ({nil, _0_0, {{nil}, nil, nil, nil}})[2] end
require("plugins.telescope") require("plugins.telescope")
require("plugins.lsp") require("plugins.lsp")
require("plugins.galaxyline") require("plugins.galaxyline")
local function _2_(x) require("plugins.bufferline")
return print(fennel.view(x)) local remapped_space = nil
_G.RebindShit = function(newKey)
remapped_space = {cur = newKey, old = vim.fn.maparg("<Space>", "i")}
return utils.keymap("i", "<Space>", newKey, {buffer = true})
end end
pp = _2_ _G.UnbindSpaceStuff = function()
local colors = utils.colors() if (remapped_space and (remapped_space ~= {})) then
local bufferline = require("bufferline") utils["del-keymap"]("i", "<Space>", true)
do if (remapped_space.old ~= "") then
local selected = {gui = "", guibg = colors.neutral_aqua, guifg = colors.dark0} utils.keymap("i", "<Space>", remapped_space.old, {buffer = true})
local visible = {gui = "", guibg = colors.dark1, guifg = colors.neutral_aqua} end
local function _3_(cnt, lvl, diagnostics_dict) remapped_space = nil
return (" (" .. cnt .. ")") return nil
end end
bufferline.setup({highlights = {background = visible, buffer_selected = selected, buffer_visible = visible, error = {guifg = colors.bright_green}, error_selected = selected, error_visible = visible, fill = {guibg = colors.dark0, guifg = colors.light0}, indicator_selected = {guibg = colors.neutral_aqua, guifg = colors.neutral_aqua}, modified = visible, modified_selected = selected, modified_visible = visible, pick_selected = {guibg = colors.bright_red, guifg = colors.bright_red}, separator = visible, tab = {guibg = colors.bright_yellow, guifg = colors.bright_yellow}, tab_selected = {guibg = colors.bright_green, guifg = colors.bright_green}, warning = visible, warning_selected = selected, warning_visible = visible}, options = {diagnostics = "nvim_lsp", diagnostics_indicator = _3_, enforce_regular_tabs = false, show_buffer_close_icons = false, show_close_icon = false, show_tab_indicators = false, tab_size = 10}})
end end
return utils.highlight("BufferLineInfoSelected", {bg = colors.neutral_aqua, fg = colors.dark0, gui = "NONE"}) nvim.command("autocmd! InsertLeave * :call v:lua.UnbindSpaceStuff()")
utils.keymap("n", "<Tab>j", ":call v:lua.RebindShit('_')<CR>")
utils.keymap("n", "<Tab>k", ":call v:lua.RebindShit('::')<CR>")
utils.keymap("i", "<Tab>j", "<space><C-o>:call v:lua.RebindShit('_')<CR>")
utils.keymap("i", "<Tab>k", "<space><C-o>:call v:lua.RebindShit('::')<CR>")
return utils.keymap("n", "\195\182", "a")

View file

@ -37,10 +37,10 @@ local utils = _local_0_[4]
local _2amodule_2a = _0_0 local _2amodule_2a = _0_0
local _2amodule_name_2a = "keybinds" local _2amodule_name_2a = "keybinds"
do local _ = ({nil, _0_0, {{nil}, nil, nil, nil}})[2] end do local _ = ({nil, _0_0, {{nil}, nil, nil, nil}})[2] end
utils.noremap("n", "<leader>", ":<c-u>WhichKey '<Space>'<CR>") utils.keymap("n", "<leader>", ":<c-u>WhichKey '<Space>'<CR>")
utils.noremap("v", "<leader>", ":<c-u>WhichKeyVisual '<Space>'<CR>") utils.keymap("v", "<leader>", ":<c-u>WhichKeyVisual '<Space>'<CR>")
utils.mapexpr("i", "<C-Space>", "compe#complete()") utils.keymap("i", "<C-Space>", "compe#complete()", {expr = true})
utils.mapexpr("i", "<esc>", "compe#close('<esc>')") utils.keymap("i", "<esc>", "compe#close('<esc>')", {expr = true})
local function le(s) local function le(s)
return (":call luaeval(\"" .. s .. "\")") return (":call luaeval(\"" .. s .. "\")")
end end

View file

@ -0,0 +1,50 @@
local _0_0 = nil
do
local name_0_ = "plugins.bufferline"
local module_0_ = nil
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 function _1_(...)
local ok_3f_0_, val_0_ = nil, nil
local function _1_()
return {require("aniseed.core"), require("bufferline"), require("aniseed.fennel"), require("aniseed.nvim"), require("utils")}
end
ok_3f_0_, val_0_ = pcall(_1_)
if ok_3f_0_ then
_0_0["aniseed/local-fns"] = {require = {a = "aniseed.core", bufferline = "bufferline", fennel = "aniseed.fennel", nvim = "aniseed.nvim", utils = "utils"}}
return val_0_
else
return print(val_0_)
end
end
local _local_0_ = _1_(...)
local a = _local_0_[1]
local bufferline = _local_0_[2]
local fennel = _local_0_[3]
local nvim = _local_0_[4]
local utils = _local_0_[5]
local _2amodule_2a = _0_0
local _2amodule_name_2a = "plugins.bufferline"
do local _ = ({nil, _0_0, {{}, nil, nil, nil}})[2] end
local colors = utils.colors()
do
local selected = {gui = "", guibg = colors.neutral_aqua, guifg = colors.dark0}
local visible = {gui = "", guibg = colors.dark1, guifg = colors.neutral_aqua}
local function _2_(cnt, lvl, diagnostics_dict)
return (" (" .. cnt .. ")")
end
bufferline.setup({highlights = {background = visible, buffer_selected = selected, buffer_visible = visible, error = visible, error_selected = selected, error_visible = visible, fill = {guibg = colors.dark0, guifg = colors.light0}, indicator_selected = {guibg = colors.neutral_aqua, guifg = colors.neutral_aqua}, modified = visible, modified_selected = selected, modified_visible = visible, pick_selected = {guibg = colors.bright_red, guifg = colors.bright_red}, separator = visible, tab = {guibg = colors.bright_yellow, guifg = colors.bright_yellow}, tab_selected = {guibg = colors.bright_green, guifg = colors.bright_green}, warning = visible, warning_selected = selected, warning_visible = visible}, options = {diagnostics = "nvim_lsp", diagnostics_indicator = _2_, enforce_regular_tabs = false, show_buffer_close_icons = false, show_close_icon = false, show_tab_indicators = false, tab_size = 10}})
end
return utils.highlight("BufferLineInfoSelected", {bg = colors.neutral_aqua, fg = colors.dark0, gui = "NONE"})

View file

@ -61,10 +61,7 @@ local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true capabilities.textDocument.completion.completionItem.snippetSupport = true
capabilities.textDocument.completion.completionItem.resolveSupport = {properties = {"documentation", "detail", "additionalTextEdits"}} capabilities.textDocument.completion.completionItem.resolveSupport = {properties = {"documentation", "detail", "additionalTextEdits"}}
local function init_lsp(lsp_name, _3fopts) local function init_lsp(lsp_name, _3fopts)
local merged_opts = {on_attach = on_attach} local merged_opts = a.merge({on_attach = on_attach}, (_3fopts or {}))
for k, v in pairs((opts or {})) do
merged_opts[k] = v
end
return lsp[lsp_name].setup(merged_opts) return lsp[lsp_name].setup(merged_opts)
end end
init_lsp("rust_analyzer", {capabilities = capabilities}) init_lsp("rust_analyzer", {capabilities = capabilities})

View file

@ -41,4 +41,4 @@ local _2amodule_name_2a = "plugins.telescope"
do local _ = ({nil, _0_0, {{}, nil, nil, nil}})[2] end do local _ = ({nil, _0_0, {{}, nil, nil, nil}})[2] end
telescope.setup({defaults = {i = {["<esc>"] = actions.close}}}) telescope.setup({defaults = {i = {["<esc>"] = actions.close}}})
telescope.load_extension("media_files") telescope.load_extension("media_files")
return utils.noremap("n", "<C-p>", ":Telescope find_files<CR>") return utils.keymap("n", "<C-p>", ":Telescope find_files<CR>")

View file

@ -19,11 +19,11 @@ end
local function _1_(...) local function _1_(...)
local ok_3f_0_, val_0_ = nil, nil local ok_3f_0_, val_0_ = nil, nil
local function _1_() local function _1_()
return {require("aniseed.core"), require("aniseed.nvim")} return {require("aniseed.core"), require("fun"), require("aniseed.nvim")}
end end
ok_3f_0_, val_0_ = pcall(_1_) ok_3f_0_, val_0_ = pcall(_1_)
if ok_3f_0_ then if ok_3f_0_ then
_0_0["aniseed/local-fns"] = {["require-macros"] = {macros = true}, require = {a = "aniseed.core", nvim = "aniseed.nvim"}} _0_0["aniseed/local-fns"] = {["require-macros"] = {macros = true}, require = {a = "aniseed.core", fun = "fun", nvim = "aniseed.nvim"}}
return val_0_ return val_0_
else else
return print(val_0_) return print(val_0_)
@ -31,41 +31,106 @@ local function _1_(...)
end end
local _local_0_ = _1_(...) local _local_0_ = _1_(...)
local a = _local_0_[1] local a = _local_0_[1]
local nvim = _local_0_[2] local fun = _local_0_[2]
local nvim = _local_0_[3]
local _2amodule_2a = _0_0 local _2amodule_2a = _0_0
local _2amodule_name_2a = "utils" local _2amodule_name_2a = "utils"
do local _ = ({nil, _0_0, {{nil}, nil, nil, nil}})[2] end do local _ = ({nil, _0_0, {{nil}, nil, nil, nil}})[2] end
local noremap = nil local dbg = nil
do do
local v_0_ = nil local v_0_ = nil
do do
local v_0_0 = nil local v_0_0 = nil
local function noremap0(mode, from, to) local function dbg0(x)
return nvim.set_keymap(mode, from, to, {noremap = true, silent = true}) a.pr(x)
return x
end end
v_0_0 = noremap0 v_0_0 = dbg0
_0_0["noremap"] = v_0_0 _0_0["dbg"] = v_0_0
v_0_ = v_0_0 v_0_ = v_0_0
end end
local t_0_ = (_0_0)["aniseed/locals"] local t_0_ = (_0_0)["aniseed/locals"]
t_0_["noremap"] = v_0_ t_0_["dbg"] = v_0_
noremap = v_0_ dbg = v_0_
end end
local mapexpr = nil local contains_3f = nil
do do
local v_0_ = nil local v_0_ = nil
do do
local v_0_0 = nil local v_0_0 = nil
local function mapexpr0(mode, from, to) local function contains_3f0(list, elem)
return nvim.set_keymap(mode, from, to, {expr = true, noremap = true, silent = true}) local function _2_(_241)
return (elem == _241)
end
return fun.any(_2_, list)
end end
v_0_0 = mapexpr0 v_0_0 = contains_3f0
_0_0["mapexpr"] = v_0_0 _0_0["contains?"] = v_0_0
v_0_ = v_0_0 v_0_ = v_0_0
end end
local t_0_ = (_0_0)["aniseed/locals"] local t_0_ = (_0_0)["aniseed/locals"]
t_0_["mapexpr"] = v_0_ t_0_["contains?"] = v_0_
mapexpr = v_0_ contains_3f = v_0_
end
local without_keys = nil
do
local v_0_ = nil
do
local v_0_0 = nil
local function without_keys0(keys, t)
local function _2_(_241)
return not contains_3f(keys, _241)
end
return fun.filter(_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 = nil
do
local v_0_ = nil
do
local v_0_0 = nil
local function keymap0(mode, from, to, _3fopts)
local full_opts = fun.tomap(without_keys({"buffer"}, a.merge({noremap = true, silent = true}, (_3fopts or {}))))
if (_3fopts and (_3fopts).buffer) 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 del_keymap = nil
do
local v_0_ = nil
do
local v_0_0 = nil
local function del_keymap0(mode, from, _3fbuf_local)
if _3fbuf_local then
return nvim.buf_del_keymap(0, mode, from)
else
return nvim.del_keymap(mode, from)
end
end
v_0_0 = del_keymap0
_0_0["del-keymap"] = v_0_0
v_0_ = v_0_0
end
local t_0_ = (_0_0)["aniseed/locals"]
t_0_["del-keymap"] = v_0_
del_keymap = v_0_
end end
local colors = nil local colors = nil
do do

View file

@ -0,0 +1,322 @@
" 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/leon/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/leon/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/leon/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/leon/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
local install_cpath_pattern = "/home/leon/.cache/nvim/packer_hererocks/2.1.0-beta3/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 = {
aniseed = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/aniseed"
},
["any-jump.vim"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/any-jump.vim"
},
detectindent = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/detectindent"
},
["editorconfig-vim"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/editorconfig-vim"
},
["fennel.vim"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/fennel.vim"
},
["galaxyline.nvim"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/galaxyline.nvim"
},
["goyo.vim"] = {
commands = { "Goyo" },
loaded = false,
needs_bufread = false,
path = "/home/leon/.local/share/nvim/site/pack/packer/opt/goyo.vim"
},
gruvbox = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/gruvbox"
},
["haskell-vim"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/haskell-vim"
},
["lspsaga.nvim"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/lspsaga.nvim"
},
["markdown-preview.nvim"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/markdown-preview.nvim"
},
nerdcommenter = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/nerdcommenter"
},
["nlua.nvim"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/nlua.nvim"
},
["nvim-bqf"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/nvim-bqf"
},
["nvim-bufferline.lua"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/nvim-bufferline.lua"
},
["nvim-compe"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/nvim-compe"
},
["nvim-lspconfig"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/nvim-lspconfig"
},
["nvim-lsputils"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/nvim-lsputils"
},
["nvim.lua"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/nvim.lua"
},
["plenary.nvim"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/plenary.nvim"
},
popfix = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/popfix"
},
["popup.nvim"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/popup.nvim"
},
["purescript-vim"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/purescript-vim"
},
["quick-scope"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/quick-scope"
},
["rainbow_parentheses.vim"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/rainbow_parentheses.vim"
},
["rust.vim"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/rust.vim"
},
["sad.vim"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/sad.vim"
},
["startuptime.vim"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/startuptime.vim"
},
tabular = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/tabular"
},
["targets.vim"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/targets.vim"
},
["telescope-media-files.nvim"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/telescope-media-files.nvim"
},
["telescope.nvim"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/telescope.nvim"
},
["typescript-vim"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/typescript-vim"
},
["vim-css-color"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/vim-css-color"
},
["vim-exchange"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/vim-exchange"
},
["vim-fugitive"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/vim-fugitive"
},
["vim-highlightedyank"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/vim-highlightedyank"
},
["vim-indent-guides"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/vim-indent-guides"
},
["vim-javascript"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/vim-javascript"
},
["vim-jsonc"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/vim-jsonc"
},
["vim-jsx"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/vim-jsx"
},
["vim-nix"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/vim-nix"
},
["vim-parinfer"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/vim-parinfer"
},
["vim-polyglot"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/vim-polyglot"
},
["vim-raku"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/vim-raku"
},
["vim-repeat"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/vim-repeat"
},
["vim-signify"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/vim-signify"
},
["vim-smoothie"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/vim-smoothie"
},
["vim-sneak"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/vim-sneak"
},
["vim-snippets"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/vim-snippets"
},
["vim-surround"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/vim-surround"
},
["vim-tmux-navigator"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/vim-tmux-navigator"
},
["vim-tsx"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/vim-tsx"
},
["vim-visual-multi"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/vim-visual-multi"
},
["vim-which-key"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/vim-which-key"
},
["webapi-vim"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/webapi-vim"
},
["yats.vim"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/yats.vim"
}
}
time("Defining packer_plugins", false)
-- Command lazy-loads
time("Defining lazy-load commands", true)
vim.cmd [[command! -nargs=* -range -bang -complete=file Goyo lua require("packer.load")({'goyo.vim'}, { cmd = "Goyo", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args> }, _G.packer_plugins)]]
time("Defining lazy-load commands", 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

View file

@ -0,0 +1,137 @@
local execute = vim.api.nvim_command
local fn = vim.fn
local install_path = fn.stdpath("data").."/site/pack/packer/opt/packer.nvim"
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
vim.cmd [[packadd packer.nvim]]
require("packer").startup(function(use)
use_rocks 'rtsisyk/fun'
use "kevinhwang91/nvim-bqf"
use "akinsho/nvim-bufferline.lua"
use {
"Olical/aniseed",
tag = "v3.16.0"
}
-- general purpose lua wrappers for nvim stuff
use "norcalli/nvim.lua"
use "tweekmonster/startuptime.vim"
use "tpope/vim-repeat"
use {
"junegunn/goyo.vim",
cmd = "Goyo",
}
use "liuchengxu/vim-which-key"
use "mhinz/vim-signify"
use "tpope/vim-fugitive"
use "preservim/nerdcommenter"
use "glepnir/galaxyline.nvim"
use "gruvbox-community/gruvbox"
use "godlygeek/tabular" -- :Tab /regex can align code on occurrences of the given regex. I.e. :Tab /= aligns all = signs in a block.
use "tpope/vim-surround"
use "christoomey/vim-tmux-navigator" -- good integration with tmux pane switching
use "nathanaelkane/vim-indent-guides" -- Can be toggled using <leader>ig (intent-guides)
-- <C-n> to select current word. <C-n> to select next occurrence.
-- with multiple lines selected in Visual mode, <C-n> to insert cursor in each line. I not i to insert in Visual-mode.
-- use "terryma/vim-multiple-cursors"
use "mg979/vim-visual-multi"
use "hauleth/sad.vim" -- Use siw instead of ciw. when using . afterwards, will find the next occurrence of the changed word and change it too
use "wellle/targets.vim" -- more text objects. IE: cin) (change in next parens). generally better handling of surrounding objects.
use "unblevable/quick-scope" -- highlight targets when pressing f<character>
use {
"iamcco/markdown-preview.nvim",
run = vim.fn["mkdp#util#install"]
}
use "machakann/vim-highlightedyank"
use "ciaranm/detectindent"
use "pechorin/any-jump.vim"
use "justinmk/vim-sneak"
use "psliwka/vim-smoothie"
use "editorconfig/editorconfig-vim"
use "honza/vim-snippets"
use "tommcdo/vim-exchange"
use "kien/rainbow_parentheses.vim"
use "bhurlow/vim-parinfer"
-- Language Plugins ----------------------------------------------------- {{{
use "bduggan/vim-raku"
use "LnL7/vim-nix"
use "kevinoid/vim-jsonc"
use "ap/vim-css-color"
use "pangloss/vim-javascript" -- syntax highlighting JS
use "ianks/vim-tsx"
use "leafgarland/typescript-vim"
use "sheerun/vim-polyglot" -- Syntax highlighting for most languages
-- use "mattn/emmet-vim"
use "purescript-contrib/purescript-vim"
use "HerringtonDarkholme/yats.vim" -- typescript syntax highlighting
use "mxw/vim-jsx"
-- Haskell
use "neovimhaskell/haskell-vim"
-- Rust
use "rust-lang/rust.vim"
use "mattn/webapi-vim"
use "bakpakin/fennel.vim"
use "tjdevries/nlua.nvim"
-- use "mxw/vim-prolog"
use "neovim/nvim-lspconfig"
-- use "nvim-lua/completion-nvim"
use "hrsh7th/nvim-compe"
use "glepnir/lspsaga.nvim"
-- use "cohama/lexima.vim"
use "nvim-lua/popup.nvim"
use "nvim-lua/plenary.nvim"
use "nvim-telescope/telescope.nvim"
use "RishabhRD/popfix"
use "RishabhRD/nvim-lsputils"
use "nvim-telescope/telescope-media-files.nvim"
-- }}}
end)

View file

@ -1,122 +0,0 @@
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin('~/.vim/plugged')
Plug 'kevinhwang91/nvim-bqf'
Plug 'akinsho/nvim-bufferline.lua'
Plug 'Olical/aniseed', { 'tag': 'v3.16.0' }
" general purpose lua wrappers for nvim stuff
Plug 'norcalli/nvim.lua'
Plug 'tweekmonster/startuptime.vim'
Plug 'tpope/vim-repeat'
Plug 'junegunn/goyo.vim', {'on': 'Goyo'}
Plug 'liuchengxu/vim-which-key'
Plug 'mhinz/vim-signify'
Plug 'tpope/vim-fugitive'
Plug 'preservim/nerdcommenter'
Plug 'glepnir/galaxyline.nvim'
Plug 'gruvbox-community/gruvbox'
Plug 'godlygeek/tabular' " :Tab /regex can align code on occurrences of the given regex. I.e. :Tab /= aligns all = signs in a block.
Plug 'tpope/vim-surround'
Plug 'christoomey/vim-tmux-navigator' " good integration with tmux pane switching
Plug 'nathanaelkane/vim-indent-guides' " Can be toggled using <leader>ig (intent-guides)
" <C-n> to select current word. <C-n> to select next occurrence.
" with multiple lines selected in Visual mode, <C-n> to insert cursor in each line. I not i to insert in Visual-mode.
"Plug 'terryma/vim-multiple-cursors'
Plug 'mg979/vim-visual-multi'
Plug 'hauleth/sad.vim' " Use siw instead of ciw. when using . afterwards, will find the next occurrence of the changed word and change it too
Plug 'wellle/targets.vim' " more text objects. IE: cin) (change in next parens). generally better handling of surrounding objects.
Plug 'unblevable/quick-scope' " highlight targets when pressing f<character>
Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() } } " :MarkdownPreview for live markdown preview
Plug 'machakann/vim-highlightedyank'
Plug 'ciaranm/detectindent'
Plug 'pechorin/any-jump.vim'
Plug 'justinmk/vim-sneak'
Plug 'psliwka/vim-smoothie'
Plug 'editorconfig/editorconfig-vim'
Plug 'honza/vim-snippets'
Plug 'tommcdo/vim-exchange'
Plug 'kien/rainbow_parentheses.vim'
Plug 'bhurlow/vim-parinfer'
"Plug 'Olical/conjure', {'tag': 'v4.17.0'}
" Language Plugins ----------------------------------------------------- {{{
Plug 'bduggan/vim-raku'
Plug 'LnL7/vim-nix'
Plug 'kevinoid/vim-jsonc'
Plug 'ap/vim-css-color'
Plug 'pangloss/vim-javascript' " syntax highlighting JS
Plug 'ianks/vim-tsx'
Plug 'leafgarland/typescript-vim'
Plug 'sheerun/vim-polyglot' " Syntax highlighting for most languages
"Plug 'mattn/emmet-vim'
Plug 'purescript-contrib/purescript-vim'
Plug 'HerringtonDarkholme/yats.vim' " typescript syntax highlighting
Plug 'mxw/vim-jsx'
"" Haskell
Plug 'neovimhaskell/haskell-vim'
" Rust
Plug 'rust-lang/rust.vim'
Plug 'mattn/webapi-vim'
Plug 'bakpakin/fennel.vim'
Plug 'tjdevries/nlua.nvim'
"Plug 'mxw/vim-prolog'
Plug 'neovim/nvim-lspconfig'
"Plug 'nvim-lua/completion-nvim'
Plug 'hrsh7th/nvim-compe'
Plug 'glepnir/lspsaga.nvim'
"Plug 'cohama/lexima.vim'
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
Plug 'RishabhRD/popfix'
Plug 'RishabhRD/nvim-lsputils'
Plug 'nvim-telescope/telescope-media-files.nvim'
" }}}
call plug#end()