mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-11-06 03:12:24 +00:00
asdf
This commit is contained in:
parent
b47fb640dd
commit
957a317106
8 changed files with 2 additions and 633 deletions
2
files/.config/nvim/.gitignore
vendored
Normal file
2
files/.config/nvim/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
lua
|
||||
plugin
|
|
@ -1,65 +0,0 @@
|
|||
local _0_0 = nil
|
||||
do
|
||||
local name_0_ = "init"
|
||||
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("aniseed.fennel"), require("keybinds"), require("aniseed.nvim"), require("utils")}
|
||||
end
|
||||
ok_3f_0_, val_0_ = pcall(_1_)
|
||||
if ok_3f_0_ then
|
||||
_0_0["aniseed/local-fns"] = {["require-macros"] = {macros = true}, require = {a = "aniseed.core", fennel = "aniseed.fennel", kb = "keybinds", 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 fennel = _local_0_[2]
|
||||
local kb = _local_0_[3]
|
||||
local nvim = _local_0_[4]
|
||||
local utils = _local_0_[5]
|
||||
local _2amodule_2a = _0_0
|
||||
local _2amodule_name_2a = "init"
|
||||
do local _ = ({nil, _0_0, {{nil}, nil, nil, nil}})[2] end
|
||||
require("plugins.telescope")
|
||||
require("plugins.lsp")
|
||||
require("plugins.galaxyline")
|
||||
require("plugins.bufferline")
|
||||
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
|
||||
_G.UnbindSpaceStuff = function()
|
||||
if (remapped_space and (remapped_space ~= {})) then
|
||||
utils["del-keymap"]("i", "<Space>", true)
|
||||
if (remapped_space.old ~= "") then
|
||||
utils.keymap("i", "<Space>", remapped_space.old, {buffer = true})
|
||||
end
|
||||
remapped_space = nil
|
||||
return nil
|
||||
end
|
||||
end
|
||||
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")
|
|
@ -1,56 +0,0 @@
|
|||
local _0_0 = nil
|
||||
do
|
||||
local name_0_ = "keybinds"
|
||||
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("aniseed.fennel"), 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-macros"] = {macros = true}, require = {a = "aniseed.core", fennel = "aniseed.fennel", nvim = "aniseed.nvim", utils = "utils", wk = "which-key"}}
|
||||
return val_0_
|
||||
else
|
||||
return print(val_0_)
|
||||
end
|
||||
end
|
||||
local _local_0_ = _1_(...)
|
||||
local a = _local_0_[1]
|
||||
local fennel = _local_0_[2]
|
||||
local nvim = _local_0_[3]
|
||||
local utils = _local_0_[4]
|
||||
local wk = _local_0_[5]
|
||||
local _2amodule_2a = _0_0
|
||||
local _2amodule_name_2a = "keybinds"
|
||||
do local _ = ({nil, _0_0, {{nil}, nil, nil, nil}})[2] end
|
||||
utils.keymap("i", "<C-Space>", "compe#complete()", {expr = true})
|
||||
utils.keymap("i", "<esc>", "compe#close('<esc>')", {expr = true})
|
||||
wk.setup({})
|
||||
local function cmd(s, desc)
|
||||
return {("<cmd>" .. s .. "<cr>"), desc}
|
||||
end
|
||||
local function le(s, desc)
|
||||
return cmd(("call luaeval(\"" .. s .. "\")"), desc)
|
||||
end
|
||||
local function rebind(s, desc)
|
||||
return {s, desc}
|
||||
end
|
||||
wk.register({[":"] = cmd("Telescope commands", "Search command with fzf"), b = {b = cmd("Buffers", "select open buffer"), c = cmd("bdelete!", "close open buffer"), name = "+buffers", w = cmd("bwipeout!", "wipeout open buffer")}, c = {name = "+comment out"}, e = {name = "+emmet"}, f = {j = rebind("zj", "jump to next fold"), k = rebind("zk", "jump to previous fold"), n = cmd("foldclose", "close fold"), name = "+folds", o = cmd("foldopen", "open fold")}, h = cmd("bprevious", "previous buffer"), l = cmd("bnext", "next buffer"), m = {A = cmd("Lspsaga show_line_diagnostics", "Line diagnostics"), E = cmd("Telescope lsp_workspace_diagnostics", "List diagnostics"), S = cmd("Telescope lsp_document_symbols", "Symbols in document"), a = cmd("Lspsaga show_cursor_diagnostics", "Cursor diagnostics"), b = cmd("Lspsaga lsp_finder", "Find stuff"), d = cmd("Lspsaga hover_doc", "Show documentation"), e = cmd("LspTroubleOpen", "Show diagnostics"), f = le("vim.lsp.buf.formatting()", "format file"), g = le("vim.lsp.buf.definition()", "Go to definition"), i = le("vim.lsp.buf.implementation()", "Show implementation"), n = cmd("Lspsaga rename", "Rename"), name = "+Code actions", o = cmd("SymbolsOutline", "Outline"), r = cmd("Telescope lsp_references", "Show references"), s = cmd("Telescope lsp_dynamic_workspace_symbols", "Symbols in workspace"), t = cmd("Lspsaga signature_help", "Show signature help"), v = cmd("Lspsaga code_action", "Apply codeaction"), x = cmd("Lspsaga preview_definition", "Preview definition")}, o = cmd("Telescope live_grep", "Grep files"), p = cmd("Telescope file_browser", "Open file-browser"), v = {g = cmd("Goyo | set linebreak", "toggle focus mode"), i = cmd("IndentGuidesToggle", "toggle indent guides"), m = cmd("set nonumber! norelativenumber", "toggle numbers"), n = cmd("set relativenumber!", "toggle relative numbers"), name = "+view-and-layout"}}, {prefix = "<leader>"})
|
||||
wk.register({["<tab>"] = "which_key_ignore", z = {c = cmd("foldclose", "close fold"), name = "+folds", o = cmd("foldopen", "open fold")}})
|
||||
nvim.o.timeoutlen = 200
|
||||
return nil
|
|
@ -1,50 +0,0 @@
|
|||
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, diagnostic = {guibg = colors.dark1, guifg = colors.neutral_red}, diagnostic_selected = {guibg = colors.neutral_aqua, guifg = colors.faded_red}, diagnostic_visible = {guibg = colors.dark1, guifg = colors.neutral_red}, duplicate = visible, duplicate_selected = selected, duplicate_visible = visible, error = visible, error_selected = selected, error_visible = selected, fill = {guibg = colors.dark0, guifg = colors.light0}, indicator_selected = {guibg = colors.neutral_aqua, guifg = colors.neutral_aqua}, info_diagnostic = {guibg = "blue", guifg = colors.neutral_yellow}, info_diagnostic_selected = {guibg = "blue", guifg = colors.faded_yellow}, info_diagnostic_visible = {guibg = "blue", guifg = colors.neutral_yellow}, 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_diagnostic = {guibg = colors.dark1, guifg = colors.neutral_yellow}, warning_diagnostic_selected = {guibg = colors.neutral_aqua, guifg = colors.faded_yellow}, warning_diagnostic_visible = {guibg = colors.dark1, guifg = colors.neutral_yellow}, 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"})
|
|
@ -1,127 +0,0 @@
|
|||
local _0_0 = nil
|
||||
do
|
||||
local name_0_ = "plugins.galaxyline"
|
||||
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("aniseed.fennel"), require("galaxyline"), require("galaxyline.condition"), require("galaxyline.provider_diagnostic"), require("galaxyline.provider_fileinfo"), require("galaxyline.provider_vcs"), require("aniseed.nvim"), require("utils")}
|
||||
end
|
||||
ok_3f_0_, val_0_ = pcall(_1_)
|
||||
if ok_3f_0_ then
|
||||
_0_0["aniseed/local-fns"] = {["require-macros"] = {macros = true}, require = {["gl-condition"] = "galaxyline.condition", ["gl-diagnostic"] = "galaxyline.provider_diagnostic", ["gl-fileinfo"] = "galaxyline.provider_fileinfo", ["gl-vcs"] = "galaxyline.provider_vcs", a = "aniseed.core", fennel = "aniseed.fennel", galaxyline = "galaxyline", 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 fennel = _local_0_[2]
|
||||
local galaxyline = _local_0_[3]
|
||||
local gl_condition = _local_0_[4]
|
||||
local gl_diagnostic = _local_0_[5]
|
||||
local gl_fileinfo = _local_0_[6]
|
||||
local gl_vcs = _local_0_[7]
|
||||
local nvim = _local_0_[8]
|
||||
local utils = _local_0_[9]
|
||||
local _2amodule_2a = _0_0
|
||||
local _2amodule_name_2a = "plugins.galaxyline"
|
||||
do local _ = ({nil, _0_0, {{nil}, nil, nil, nil}})[2] end
|
||||
local colors = utils.colors()
|
||||
local modes = {R = {colors = {bg = colors.neutral_aqua, fg = colors.dark0}, text = "REPLACE"}, Rv = {colors = {bg = colors.neutral_aqua, fg = colors.dark0}, text = "VIRTUAL"}, S = {colors = {bg = colors.neutral_aqua, fg = colors.dark0}, text = "SELECT"}, V = {colors = {bg = colors.neutral_blue, fg = colors.dark0}, text = "VISUAL LINE"}, ["\22"] = {colors = {bg = colors.neutral_blue, fg = colors.dark0}, text = "VISUAL BLOCK"}, ["r?"] = {colors = {bg = colors.neutral_aqua, fg = colors.dark0}, text = "CONFIRM"}, c = {colors = {bg = colors.neutral_aqua, fg = colors.dark0}, text = "CMD"}, ce = {colors = {bg = colors.neutral_aqua, fg = colors.dark0}, text = "NORMEX"}, cv = {colors = {bg = colors.neutral_aqua, fg = colors.dark0}, text = "EX"}, i = {colors = {bg = colors.neutral_yellow, fg = colors.dark0}, text = "INSERT"}, ic = {colors = {bg = colors.neutral_aqua, fg = colors.dark0}, text = "INSCOMP"}, n = {colors = {bg = colors.neutral_aqua, fg = colors.dark0}, text = "NORMAL"}, no = {colors = {bg = colors.neutral_aqua, fg = colors.dark0}, text = "OP-PENDING"}, r = {colors = {bg = colors.neutral_aqua, fg = colors.dark0}, text = "HIT-ENTER"}, s = {colors = {bg = colors.neutral_aqua, fg = colors.dark0}, text = "SELECT"}, t = {colors = {bg = colors.neutral_aqua, fg = colors.dark0}, text = "TERM"}, v = {colors = {bg = colors.neutral_blue, fg = colors.dark0}, text = "VISUAL"}}
|
||||
local function buf_empty_3f()
|
||||
return (1 == nvim.fn.empty(nvim.fn.expand("%:t")))
|
||||
end
|
||||
local function get_current_file_name()
|
||||
local file = nvim.fn.expand("%:t")
|
||||
if (1 == nvim.fn.empty(file)) then
|
||||
return ""
|
||||
elseif nvim.bo.readonly then
|
||||
return ("RO " .. file)
|
||||
elseif (nvim.bo.modifiable and nvim.bo.modified) then
|
||||
return (file .. " \239\129\128")
|
||||
else
|
||||
return file
|
||||
end
|
||||
end
|
||||
local function get_mode_data()
|
||||
return (modes[nvim.fn.mode()] or {colors = {bg = colors.neutral_orange, fg = colors.dark0}, text = nvim.fn.mode()})
|
||||
end
|
||||
local function vim_mode_provider()
|
||||
local modedata = get_mode_data()
|
||||
utils.highlight("GalaxyViMode", modedata.colors)
|
||||
return (" " .. modedata.text .. " ")
|
||||
end
|
||||
utils.highlight("StatusLine", {bg = colors.dark1, fg = colors.light0})
|
||||
galaxyline.short_line_list = {"dbui", "diff", "peekaboo", "undotree", "vista", "vista_markdown"}
|
||||
local function _2_()
|
||||
return ""
|
||||
end
|
||||
galaxyline.section.left = {{ViMode = {provider = vim_mode_provider}}, {FileName = {highlight = {colors.light4, colors.dark1}, provider = get_current_file_name}}, {Space = {highlight = {colors.light0, colors.dark1}, provider = _2_}}}
|
||||
local function make_lsp_diagnostic_provider(kind)
|
||||
local function _3_()
|
||||
local n = vim.lsp.diagnostic.get_count(0, kind)
|
||||
if (n == 0) then
|
||||
return ""
|
||||
else
|
||||
return (" " .. n .. " ")
|
||||
end
|
||||
end
|
||||
return _3_
|
||||
end
|
||||
local function git_branch_provider()
|
||||
local branch = gl_vcs.get_git_branch()
|
||||
if ("master" == branch) then
|
||||
return ""
|
||||
else
|
||||
return branch
|
||||
end
|
||||
end
|
||||
local function _3_()
|
||||
return nvim.bo.filetype
|
||||
end
|
||||
local function _4_()
|
||||
return (" " .. gl_fileinfo.line_column() .. " ")
|
||||
end
|
||||
galaxyline.section.right = {{GitBranch = {highlight = {colors.light4, colors.dark1}, provider = git_branch_provider}}, {FileType = {highlight = {colors.neutral_aqua, colors.dark1}, provider = _3_}}, {DiagnosticInfo = {highlight = {colors.dark1, colors.neutral_blue}, provider = make_lsp_diagnostic_provider("Info")}}, {DiagnosticWarn = {highlight = {colors.dark1, colors.neutral_yellow}, provider = make_lsp_diagnostic_provider("Warning"), separator = ""}}, {DiagnosticError = {highlight = {colors.dark1, colors.bright_red}, provider = make_lsp_diagnostic_provider("Error"), separator = ""}}, {LineInfo = {highlight = "GalaxyViMode", provider = _4_, separator = ""}}}
|
||||
local function add_segment_defaults(data)
|
||||
return a.merge({highlight = {colors.light0, colors.dark1}, separator = " ", separator_highlight = "StatusLine"}, data)
|
||||
end
|
||||
local function map_gl_section(f, section)
|
||||
local tbl_0_ = {}
|
||||
for _, elem in ipairs(section) do
|
||||
local _5_
|
||||
do
|
||||
local tbl_0_0 = {}
|
||||
for k, v in pairs(elem) do
|
||||
local _6_0, _7_0 = k, f(v)
|
||||
if ((nil ~= _6_0) and (nil ~= _7_0)) then
|
||||
local k_0_ = _6_0
|
||||
local v_0_ = _7_0
|
||||
tbl_0_0[k_0_] = v_0_
|
||||
end
|
||||
end
|
||||
_5_ = tbl_0_0
|
||||
end
|
||||
tbl_0_[(#tbl_0_ + 1)] = _5_
|
||||
end
|
||||
return tbl_0_
|
||||
end
|
||||
galaxyline.section.left = map_gl_section(add_segment_defaults, galaxyline.section.left)
|
||||
galaxyline.section.right = map_gl_section(add_segment_defaults, galaxyline.section.right)
|
||||
return nil
|
|
@ -1,103 +0,0 @@
|
|||
local _0_0 = nil
|
||||
do
|
||||
local name_0_ = "plugins.lsp"
|
||||
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("compe"), require("aniseed.fennel"), require("lspconfig"), require("lspconfig.configs"), require("lsp_signature"), require("aniseed.nvim"), require("lspsaga"), require("symbols-outline"), require("trouble"), require("utils")}
|
||||
end
|
||||
ok_3f_0_, val_0_ = pcall(_1_)
|
||||
if ok_3f_0_ then
|
||||
_0_0["aniseed/local-fns"] = {["require-macros"] = {macros = true}, require = {["lsp-configs"] = "lspconfig.configs", ["symbols-outline"] = "symbols-outline", a = "aniseed.core", compe = "compe", fennel = "aniseed.fennel", lsp = "lspconfig", lsp_signature = "lsp_signature", nvim = "aniseed.nvim", saga = "lspsaga", trouble = "trouble", utils = "utils"}}
|
||||
return val_0_
|
||||
else
|
||||
return print(val_0_)
|
||||
end
|
||||
end
|
||||
local _local_0_ = _1_(...)
|
||||
local a = _local_0_[1]
|
||||
local trouble = _local_0_[10]
|
||||
local utils = _local_0_[11]
|
||||
local compe = _local_0_[2]
|
||||
local fennel = _local_0_[3]
|
||||
local lsp = _local_0_[4]
|
||||
local lsp_configs = _local_0_[5]
|
||||
local lsp_signature = _local_0_[6]
|
||||
local nvim = _local_0_[7]
|
||||
local saga = _local_0_[8]
|
||||
local symbols_outline = _local_0_[9]
|
||||
local _2amodule_2a = _0_0
|
||||
local _2amodule_name_2a = "plugins.lsp"
|
||||
do local _ = ({nil, _0_0, {{nil}, nil, nil, nil}})[2] end
|
||||
local colors = utils.colors()
|
||||
local function on_attach(client, bufnr)
|
||||
lsp_signature.on_attach()
|
||||
if client.resolved_capabilities.document_highlight 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! * <buffer> \n autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight() \n autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()\n augroup END", false)
|
||||
end
|
||||
end
|
||||
local function better_root_pattern(patterns, except_patterns)
|
||||
local function _2_(path)
|
||||
if not lsp.util.root_pattern(except_patterns)(path) then
|
||||
return lsp.util.root_pattern(patterns)(path)
|
||||
end
|
||||
end
|
||||
return _2_
|
||||
end
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||
capabilities.textDocument.completion.completionItem.resolveSupport = {properties = {"documentation", "detail", "additionalTextEdits"}}
|
||||
local function init_lsp(lsp_name, _3fopts)
|
||||
local merged_opts = a.merge({on_attach = on_attach}, (_3fopts or {}))
|
||||
return lsp[lsp_name].setup(merged_opts)
|
||||
end
|
||||
init_lsp("rust_analyzer", {capabilities = capabilities})
|
||||
init_lsp("tsserver", {root_dir = lsp.util.root_pattern("package.json")})
|
||||
local function _2_()
|
||||
return vim.lsp.buf.range_formatting({}, {0, 0}, {vim.fn.line("$"), 0})
|
||||
end
|
||||
init_lsp("jsonls", {commands = {Format = {_2_}}})
|
||||
init_lsp("denols", {root_dir = better_root_pattern({".git"}, {"package.json"})})
|
||||
init_lsp("hls", {settings = {languageServerHaskell = {formattingProvider = "stylish-haskell"}}})
|
||||
init_lsp("vimls")
|
||||
init_lsp("bashls")
|
||||
init_lsp("erlangls")
|
||||
init_lsp("yamlls")
|
||||
init_lsp("html")
|
||||
init_lsp("cssls")
|
||||
symbols_outline.setup({highlight_hovered_item = true, show_guides = true})
|
||||
compe.setup({autocomplete = false, debug = false, documentation = true, enabled = true, incomplete_delay = 400, max_abbr_width = 100, max_kind_width = 100, max_menu_width = 100, min_length = 1, preselect = "enable", source = {buffer = true, calc = true, nvim_lsp = true, nvim_lua = true, path = true, vsnip = false}, source_timeout = 200, throttle_time = 80})
|
||||
saga.init_lsp_saga({border_style = 1, code_action_keys = {exec = "<CR>", quit = "<esc>"}, finder_action_keys = {open = "<CR>", quit = "<esc>", scroll_down = "<C-d>", scroll_up = "<C-u>", split = "b", vsplit = "v"}, rename_action_keys = {exec = "<CR>", quit = "<esc>"}})
|
||||
utils.highlight("LspSagaCodeActionTitle", {fg = colors.bright_aqua})
|
||||
utils.highlight("LspSagaBorderTitle", {fg = colors.bright_aqua})
|
||||
utils.highlight("LspSagaCodeActionContent", {fg = colors.bright_aqua})
|
||||
utils.highlight("LspSagaFinderSelection", {fg = colors.bright_aqua})
|
||||
utils.highlight("LspSagaDiagnosticHeader", {fg = colors.bright_aqua})
|
||||
utils.highlight("TargetWord", {fg = colors.bright_aqua})
|
||||
utils.highlight("LspTroubleFoldIcon", {bg = "NONE", fg = colors.bright_orange})
|
||||
utils.highlight("LspTroubleCount", {bg = "NONE", fg = colors.bright_green})
|
||||
utils.highlight("LspTroubleText", {bg = "NONE", fg = colors.light0})
|
||||
utils.highlight("LspTroubleSignError", {bg = "NONE", fg = colors.bright_red})
|
||||
utils.highlight("LspTroubleSignWarning", {bg = "NONE", fg = colors.bright_yellow})
|
||||
utils.highlight("LspTroubleSignInformation", {bg = "NONE", fg = colors.bright_aqua})
|
||||
utils.highlight("LspTroubleSignHint", {bg = "NONE", fg = colors.bright_blue})
|
||||
vim.o.signcolumn = "yes"
|
||||
return trouble.setup({auto_close = true, auto_open = false, auto_preview = true, icons = false})
|
|
@ -1,44 +0,0 @@
|
|||
local _0_0 = nil
|
||||
do
|
||||
local name_0_ = "plugins.telescope"
|
||||
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("telescope.actions"), require("aniseed.fennel"), require("aniseed.nvim"), require("telescope"), require("utils")}
|
||||
end
|
||||
ok_3f_0_, val_0_ = pcall(_1_)
|
||||
if ok_3f_0_ then
|
||||
_0_0["aniseed/local-fns"] = {require = {a = "aniseed.core", actions = "telescope.actions", fennel = "aniseed.fennel", nvim = "aniseed.nvim", telescope = "telescope", utils = "utils"}}
|
||||
return val_0_
|
||||
else
|
||||
return print(val_0_)
|
||||
end
|
||||
end
|
||||
local _local_0_ = _1_(...)
|
||||
local a = _local_0_[1]
|
||||
local actions = _local_0_[2]
|
||||
local fennel = _local_0_[3]
|
||||
local nvim = _local_0_[4]
|
||||
local telescope = _local_0_[5]
|
||||
local utils = _local_0_[6]
|
||||
local _2amodule_2a = _0_0
|
||||
local _2amodule_name_2a = "plugins.telescope"
|
||||
do local _ = ({nil, _0_0, {{}, nil, nil, nil}})[2] end
|
||||
telescope.setup({defaults = {i = {["<esc>"] = actions.close}}})
|
||||
telescope.load_extension("media_files")
|
||||
return utils.keymap("n", "<C-p>", ":Telescope find_files<CR>")
|
|
@ -1,188 +0,0 @@
|
|||
local _0_0 = nil
|
||||
do
|
||||
local name_0_ = "utils"
|
||||
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("fun"), require("aniseed.nvim")}
|
||||
end
|
||||
ok_3f_0_, val_0_ = pcall(_1_)
|
||||
if ok_3f_0_ then
|
||||
_0_0["aniseed/local-fns"] = {["require-macros"] = {macros = true}, require = {a = "aniseed.core", fun = "fun", nvim = "aniseed.nvim"}}
|
||||
return val_0_
|
||||
else
|
||||
return print(val_0_)
|
||||
end
|
||||
end
|
||||
local _local_0_ = _1_(...)
|
||||
local a = _local_0_[1]
|
||||
local fun = _local_0_[2]
|
||||
local nvim = _local_0_[3]
|
||||
local _2amodule_2a = _0_0
|
||||
local _2amodule_name_2a = "utils"
|
||||
do local _ = ({nil, _0_0, {{nil}, nil, nil, nil}})[2] end
|
||||
local dbg = nil
|
||||
do
|
||||
local v_0_ = nil
|
||||
do
|
||||
local v_0_0 = nil
|
||||
local function dbg0(x)
|
||||
a.pr(x)
|
||||
return x
|
||||
end
|
||||
v_0_0 = dbg0
|
||||
_0_0["dbg"] = v_0_0
|
||||
v_0_ = v_0_0
|
||||
end
|
||||
local t_0_ = (_0_0)["aniseed/locals"]
|
||||
t_0_["dbg"] = v_0_
|
||||
dbg = v_0_
|
||||
end
|
||||
local contains_3f = nil
|
||||
do
|
||||
local v_0_ = nil
|
||||
do
|
||||
local v_0_0 = nil
|
||||
local function contains_3f0(list, elem)
|
||||
local function _2_(_241)
|
||||
return (elem == _241)
|
||||
end
|
||||
return fun.any(_2_, list)
|
||||
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 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
|
||||
local colors = nil
|
||||
do
|
||||
local v_0_ = nil
|
||||
do
|
||||
local v_0_0 = nil
|
||||
local function colors0()
|
||||
return {bright_aqua = "#8ec07c", bright_blue = "#83a598", bright_green = "#b8bb26", bright_orange = "#fe8019", bright_purple = "#d3869b", bright_red = "#fb4934", bright_yellow = "#fabd2f", dark0 = "#282828", dark0_hard = "#1d2021", dark0_soft = "#32302f", dark1 = "#3c3836", dark2 = "#504945", dark3 = "#665c54", dark4 = "#7c6f64", faded_aqua = "#427b58", faded_blue = "#076678", faded_green = "#79740e", faded_orange = "#af3a03", faded_purple = "#8f3f71", faded_red = "#9d0006", faded_yellow = "#b57614", gray = "#928374", light0 = "#fbf1c7", light0_hard = "#f9f5d7", light0_soft = "#f2e5bc", light1 = "#ebdbb2", light2 = "#d5c4a1", light3 = "#bdae93", light4 = "#a89984", neutral_aqua = "#689d6a", neutral_blue = "#458588", neutral_green = "#98971a", neutral_orange = "#d65d0e", neutral_purple = "#b16286", neutral_red = "#cc241d", neutral_yellow = "#d79921"}
|
||||
end
|
||||
v_0_0 = colors0
|
||||
_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
|
||||
local highlight = nil
|
||||
do
|
||||
local v_0_ = nil
|
||||
do
|
||||
local v_0_0 = nil
|
||||
local function highlight0(group, colset)
|
||||
local default = {bg = "NONE", fg = "NONE", gui = "NONE"}
|
||||
local opts = a.merge(default, colset)
|
||||
return nvim.command(("hi! " .. group .. " guifg='" .. opts.fg .. "' guibg='" .. opts.bg .. "' gui='" .. opts.gui .. "'"))
|
||||
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
|
||||
local comp = nil
|
||||
do
|
||||
local v_0_ = nil
|
||||
do
|
||||
local v_0_0 = nil
|
||||
local function comp0(f, g)
|
||||
local function _2_(...)
|
||||
return f(g(...))
|
||||
end
|
||||
return _2_
|
||||
end
|
||||
v_0_0 = comp0
|
||||
_0_0["comp"] = v_0_0
|
||||
v_0_ = v_0_0
|
||||
end
|
||||
local t_0_ = (_0_0)["aniseed/locals"]
|
||||
t_0_["comp"] = v_0_
|
||||
comp = v_0_
|
||||
end
|
||||
return nil
|
Loading…
Reference in a new issue