This commit is contained in:
Steve 2023-03-30 21:15:46 -04:00
commit 984dc04492
30 changed files with 2213 additions and 1 deletions

View file

@ -0,0 +1,12 @@
local M = {}
function M.setup()
local {PLUGIN} = require({PLUGIN})
local conf = {
conf = {
}
}
{PLUGIN}.setup(conf)
end
return M

View file

@ -0,0 +1,261 @@
local M = {}
function M.setup()
local aerial = require("aerial")
local conf = {
backends = { "treesitter", "lsp", "markdown", "man" },
float = {
relative = "editor",
override = function(conf)
local padding = 4
conf.anchor = 'NE'
conf.row = padding
conf.col = vim.o.columns - padding
return conf
end,
},
layout = {
-- These control the width of the aerial window.
-- They can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
-- min_width and max_width can be a list of mixed types.
-- max_width = {40, 0.2} means "the lesser of 40 columns or 20% of total"
max_width = { 80, 0.2 },
width = nil,
min_width = 40,
-- key-value pairs of window-local options for aerial window (e.g. winhl)
win_opts = {},
-- Determines the default direction to open the aerial window. The 'prefer'
-- options will open the window in the other direction *if* there is a
-- different buffer in the way of the preferred direction
-- Enum: prefer_right, prefer_left, right, left, float
default_direction = "right",
-- Determines where the aerial window will be opened
-- edge - open aerial at the far right/left of the editor
-- window - open aerial to the right/left of the current window
placement = "edge",
},
-- Determines how the aerial window decides which buffer to display symbols for
-- window - aerial window will display symbols for the buffer in the window from which it was opened
-- global - aerial window will display symbols for the current window
attach_mode = "global",
-- List of enum values that configure when to auto-close the aerial window
-- unfocus - close aerial when you leave the original source window
-- switch_buffer - close aerial when you change buffers in the source window
-- unsupported - close aerial when attaching to a buffer that has no symbol source
close_automatic_events = {},
-- Keymaps in aerial window. Can be any value that `vim.keymap.set` accepts OR a table of keymap
-- options with a `callback` (e.g. { callback = function() ... end, desc = "", nowait = true })
-- Additionally, if it is a string that matches "aerial.<name>",
-- it will use the mapping at require("aerial.action").<name>
-- Set to `false` to remove a keymap
keymaps = {
["?"] = "actions.show_help",
["g?"] = "actions.show_help",
["<CR>"] = "actions.jump",
["<2-LeftMouse>"] = "actions.jump",
["<C-v>"] = "actions.jump_vsplit",
["<C-s>"] = "actions.jump_split",
["p"] = "actions.scroll",
["<C-j>"] = "actions.down_and_scroll",
["<C-k>"] = "actions.up_and_scroll",
["{"] = "actions.prev",
["}"] = "actions.next",
["[["] = "actions.prev_up",
["]]"] = "actions.next_up",
["q"] = "actions.close",
["o"] = "actions.tree_toggle",
["za"] = "actions.tree_toggle",
["O"] = "actions.tree_toggle_recursive",
["zA"] = "actions.tree_toggle_recursive",
["l"] = "actions.tree_open",
["zo"] = "actions.tree_open",
["L"] = "actions.tree_open_recursive",
["zO"] = "actions.tree_open_recursive",
["h"] = "actions.tree_close",
["zc"] = "actions.tree_close",
["H"] = "actions.tree_close_recursive",
["zC"] = "actions.tree_close_recursive",
["zr"] = "actions.tree_increase_fold_level",
["zR"] = "actions.tree_open_all",
["zm"] = "actions.tree_decrease_fold_level",
["zM"] = "actions.tree_close_all",
["zx"] = "actions.tree_sync_folds",
["zX"] = "actions.tree_sync_folds",
},
-- When true, don't load aerial until a command or function is called
-- Defaults to true, unless `on_attach` is provided, then it defaults to false
lazy_load = true,
-- Disable aerial on files with this many lines
disable_max_lines = 10000,
-- Disable aerial on files this size or larger (in bytes)
disable_max_size = 2000000, -- Default 2MB
-- A list of all symbols to display. Set to false to display all symbols.
-- This can be a filetype map (see :help aerial-filetype-map)
-- To see all available values, see :help SymbolKind
filter_kind = {
"Class",
"Constructor",
"Enum",
"Function",
"Interface",
"Module",
"Method",
"Struct",
},
-- Determines line highlighting mode when multiple splits are visible.
-- split_width Each open window will have its cursor location marked in the
-- aerial buffer. Each line will only be partially highlighted
-- to indicate which window is at that location.
-- full_width Each open window will have its cursor location marked as a
-- full-width highlight in the aerial buffer.
-- last Only the most-recently focused window will have its location
-- marked in the aerial buffer.
-- none Do not show the cursor locations in the aerial window.
highlight_mode = "split_width",
-- Highlight the closest symbol if the cursor is not exactly on one.
highlight_closest = true,
-- Highlight the symbol in the source buffer when cursor is in the aerial win
highlight_on_hover = false,
-- When jumping to a symbol, highlight the line for this many ms.
-- Set to false to disable
highlight_on_jump = 300,
-- Define symbol icons. You can also specify "<Symbol>Collapsed" to change the
-- icon when the tree is collapsed at that symbol, or "Collapsed" to specify a
-- default collapsed icon. The default icon set is determined by the
-- "nerd_font" option below.
-- If you have lspkind-nvim installed, it will be the default icon set.
-- This can be a filetype map (see :help aerial-filetype-map)
icons = {},
-- Control which windows and buffers aerial should ignore.
-- If attach_mode is "global", focusing an ignored window/buffer will
-- not cause the aerial window to update.
-- If open_automatic is true, focusing an ignored window/buffer will not
-- cause an aerial window to open.
-- If open_automatic is a function, ignore rules have no effect on aerial
-- window opening behavior; it's entirely handled by the open_automatic
-- function.
ignore = {
-- Ignore unlisted buffers. See :help buflisted
unlisted_buffers = true,
-- List of filetypes to ignore.
filetypes = {},
-- Ignored buftypes.
-- Can be one of the following:
-- false or nil - No buftypes are ignored.
-- "special" - All buffers other than normal buffers are ignored.
-- table - A list of buftypes to ignore. See :help buftype for the
-- possible values.
-- function - A function that returns true if the buffer should be
-- ignored or false if it should not be ignored.
-- Takes two arguments, `bufnr` and `buftype`.
buftypes = "special",
-- Ignored wintypes.
-- Can be one of the following:
-- false or nil - No wintypes are ignored.
-- "special" - All windows other than normal windows are ignored.
-- table - A list of wintypes to ignore. See :help win_gettype() for the
-- possible values.
-- function - A function that returns true if the window should be
-- ignored or false if it should not be ignored.
-- Takes two arguments, `winid` and `wintype`.
wintypes = "special",
},
-- Use symbol tree for folding. Set to true or false to enable/disable
-- Set to "auto" to manage folds if your previous foldmethod was 'manual'
-- This can be a filetype map (see :help aerial-filetype-map)
manage_folds = true,
-- When you fold code with za, zo, or zc, update the aerial tree as well.
-- Only works when manage_folds = true
-- Fold code when you open/collapse symbols in the tree.
-- Only works when manage_folds = true
link_tree_to_folds = true,
-- Set default symbol icons to use patched font icons (see https://www.nerdfonts.com/)
-- "auto" will set it to true if nvim-web-devicons or lspkind-nvim is installed.
nerd_font = "auto",
-- Call this function when aerial attaches to a buffer.
on_attach = function(bufnr) end,
-- Call this function when aerial first sets symbols on a buffer.
on_first_symbols = function(bufnr) end,
-- Automatically open aerial when entering supported buffers.
-- This can be a function (see :help aerial-open-automatic)
open_automatic = false,
-- Run this command after jumping to a symbol (false will disable)
post_jump_cmd = "normal! zz",
-- When true, aerial will automatically close after jumping to a symbol
close_on_select = false,
-- The autocmds that trigger symbols update (not used for LSP backend)
update_events = "TextChanged,InsertLeave",
-- Show box drawing characters for the tree hierarchy
show_guides = true,
guides = {
-- When the child item has a sibling below it
mid_item = "├─",
-- When the child item is the last in the list
last_item = "└─",
-- When there are nested child guides to the right
nested_top = "",
-- Raw indentation
whitespace = " ",
},
lsp = {
-- Fetch document symbols when LSP diagnostics update.
-- If false, will update on buffer changes.
diagnostics_trigger_update = true,
-- Set to false to not update the symbols when there are LSP errors
update_when_errors = true,
-- How long to wait (in ms) after a buffer change before updating
-- Only used when diagnostics_trigger_update = false
update_delay = 300,
},
treesitter = {
-- How long to wait (in ms) after a buffer change before updating
update_delay = 300,
},
markdown = {
-- How long to wait (in ms) after a buffer change before updating
update_delay = 300,
},
man = {
-- How long to wait (in ms) after a buffer change before updating
update_delay = 300,
},
}
aerial.setup(conf)
end
return M

View file

@ -0,0 +1,20 @@
local M = {}
function M.setup()
local aerial = require("aerial")
local conf = {
backends = { "treesitter", "lsp", "markdown", "man" },
float = {
relative = "win",
override = function(conf)
local padding = 1
conf.anchor = 'NE'
conf.row = padding
conf.col = vim.api.nvim_win_get_width(0) - padding
return conf
end,
},
}
aerial.setup(conf)
end
return M

View file

@ -0,0 +1,23 @@
local g = vim.g
local colors = require('dracula').colors()
vim.cmd[[colorscheme dracula]]
g.rainbow_guifgs = {
colors.red,
colors.orange,
colors.yellow,
colors.green,
colors.purple,
colors.cyan,
colors.pink,
colors.bright_red,
colors.bright_green,
colors.bright_yellow,
colors.bright_blue,
colors.bright_magenta,
colors.bright_cyan
}
g.rainbow_active = 1
--vim.highlight.create('Beacon', {guibg=colors.green, guifg=colors.bg}, false)
vim.api.nvim_set_hl(0, 'Beacon', {bg=colors.green, fg=colors.bg})

View file

@ -0,0 +1,33 @@
local M = {}
local home = os.getenv('HOME')
function scandir(directory)
local i, t, popen = 0, {}, io.popen
local pfile = popen('ls "'..directory..'"')
for filename in pfile:lines() do
i = i + 1
t[i] = filename
end
pfile:close()
return t
end
function M()
catTable = scandir(vim.fn.stdpath('config') .. '/static/')
math.random()
math.randomseed(os.time()+math.random())
math.random(); math.random(); math.random();
file = vim.fn.stdpath('config') .. '/static/' .. catTable[math.random(#catTable)]
local fheight = io.popen('cat '..file..' | wc -l')
local fwidth = io.popen('awk "{print length}" '..file..' | sort -nr | head -1')
local db = require 'dashboard'
db.preview_command = 'cat | lolcat -F 0.3 -p 15'
db.preview_file_path = file
db.preview_file_height = tonumber(fheight:read("*a"))
db.preview_file_width = tonumber(fwidth:read("*a"))
db.header_pad = 0
end
return M()

View file

@ -0,0 +1,80 @@
local M = {}
function M.setup()
local dracula = require("dracula")
--dracula.setup({
-- customize dracula color palette
local conf = {
-- Default dracula colors
-- colors = {
-- bg = "#282A36",
-- fg = "#F8F8F2",
-- selection = "#44475A",
-- comment = "#6272A4",
-- red = "#FF5555",
-- orange = "#FFB86C",
-- yellow = "#F1FA8C",
-- green = "#50fa7b",
-- purple = "#BD93F9",
-- cyan = "#8BE9FD",
-- pink = "#FF79C6",
-- bright_red = "#FF6E6E",
-- bright_green = "#69FF94",
-- bright_yellow = "#FFFFA5",
-- bright_blue = "#D6ACFF",
-- bright_magenta = "#FF92DF",
-- bright_cyan = "#A4FFFF",
-- bright_white = "#FFFFFF",
-- menu = "#21222C",
-- visual = "#3E4452",
-- gutter_fg = "#4B5263",
-- nontext = "#3B4048",
-- },
-- Dracula PRO
colors = {
bg = "#393649",
fg = "#F8F8F2",
selection = "#454158", --prof = #454158
comment = "#6272A4", --pro = #7970A9
red = "#FF9580",
orange = "#FFCA80",
yellow = "#FFFF80",
green = "#8AFF80",
purple = "#9580FF",
cyan = "#80FFEA",
pink = "#FF80BF",
bright_red = "#FF6E6E",
bright_green = "#69FF94",
bright_yellow = "#FFFFA5",
bright_blue = "#D6ACFF",
bright_magenta = "#FF92DF",
bright_cyan = "#A4FFFF",
bright_white = "#FFFFFF",
menu = "#21222C",
visual = "#3E4452",
gutter_fg = "#4B5263",
nontext = "#3B4048",
},
-- show the '~' characters after the end of buffers
show_end_of_buffer = true, -- default false
-- use transparent background
transparent_bg = true, -- default false
-- set custom lualine background color
lualine_bg_color = "#44475a", -- default nil
-- set italic comment
italic_comment = true, -- default false
-- overrides the default highlights see `:h synIDattr`
overrides = {
-- Examples
-- NonText = { fg = dracula.colors().white }, -- set NonText fg to white
-- NvimTreeIndentMarker = { link = "NonText" }, -- link to NonText highlight
-- Nothing = {} -- clear highlight of Nothing
},
}
dracula.setup(conf)
end
-- to use colors in other places
-- local colors = require('dracula').colors()
return M

View file

@ -0,0 +1,17 @@
local M = {}
function M.setup()
local lualine = require 'lualine'
local conf = {
options = {
icons_enabled = true,
theme = 'dracula-nvim',
},
sections = {
lualine_x = {"aerial"},
}
}
lualine.setup(conf)
end
return M

View file

@ -0,0 +1,46 @@
-- require("nvim-tree").setup({
-- disable_netrw = true,
-- hijack_netrw = true,
-- sort_by = "case_sensitive",
-- view = {
-- adaptive_size = true,
-- mappings = {
-- list = {
-- { key = "u", action = "dir_up" },
-- },
-- },
-- },
-- renderer = {
-- group_empty = true,
-- },
-- filters = {
-- dotfiles = false,
-- },
-- })
local M = {}
function M.setup()
local ntree = require 'nvim-tree'
local conf = {
disable_netrw = true,
hijack_netrw = true,
sort_by = "case_sensitive",
view = {
adaptive_size = true,
mappings = {
list = {
{ key = "u", action = "dir_up" },
},
},
},
renderer = {
group_empty = true,
},
filters = {
dotfiles = false,
},
}
ntree.setup(conf)
end
return M

View file

@ -0,0 +1,61 @@
local M = {}
function M.setup()
local colors = require('dracula').colors()
local sitter = require("nvim-treesitter.configs")
local conf = {
ensure_installed = "all",
sync_install = false,
ignore_install = {""},
matchup = {
enable = true,
disable_virtual_text = true,
},
highlight = {
enable = true,
disable = {},
additional_vim_regex_highlighting = true,
},
autopairs = {
enable = true,
},
indent = {
enable = true,
--disable = {
--"python",
--"css"
--}
--
},
audotag = {
enable = true,
disable = {
"xml",
"markdown",
},
},
rainbow = {
enable = true,
extended_mode = false,
colors = {
colors.red,
colors.orange,
colors.yellow,
colors.green,
colors.purple,
colors.cyan,
colors.pink,
colors.bright_red,
colors.bright_green,
colors.bright_yellow,
colors.bright_blue,
colors.bright_magenta,
colors.bright_cyan
},
},
}
sitter.setup(conf)
end
return M

View file

@ -0,0 +1,63 @@
local M = {}
function M.setup()
local whichkey = require "which-key"
local conf = {
window = {
border = "single", -- none, single, double, shadow
position = "bottom", -- bottom, top
},
}
local opts = {
mode = "n", -- Normal mode
prefix = "<leader>",
buffer = nil, -- Global mappings. Specify a buffer number for buffer local mappings
silent = true, -- use `silent` when creating keymaps
noremap = true, -- use `noremap` when creating keymaps
nowait = false, -- use `nowait` when creating keymaps
}
local mappings = {
["w"] = { "<cmd>update!<CR>", "Save" },
["q"] = { "<cmd>q!<CR>", "Quit" },
["e"] = { "<cmd>NvimTreeToggle<CR>", "Nvim Tree"},
["a"] = { "<cmd>AerialToggle! float<CR>","Aerial Toggle"},
o = {
name = "+open",
},
b = {
name = "Buffer",
c = { "<Cmd>bd!<Cr>", "Close current buffer" },
D = { "<Cmd>%bd|e#|bd#<Cr>", "Delete all buffers" },
},
z = {
name = "Packer",
c = { "<cmd>PackerCompile<cr>", "Compile" },
i = { "<cmd>PackerInstall<cr>", "Install" },
s = { "<cmd>PackerSync<cr>", "Sync" },
S = { "<cmd>PackerStatus<cr>", "Status" },
u = { "<cmd>PackerUpdate<cr>", "Update" },
},
g = {
name = "Git",
s = { "<cmd>Neogit<CR>", "Status" },
},
v = {
name = "Visual",
r = { "<cmd>RainbowToggle<cr>", "Rainbow Brackets Toggle"},
},
}
whichkey.setup(conf)
whichkey.register(mappings, opts)
end
return M

View file

@ -0,0 +1,20 @@
local M = {}
function M.setup()
local winshift = require("winshift")
local conf = {
conf = {
highlight_moving_win = true, --hl window when being moved
focused_hl_group = "Visual", -- hl group for moving window
moving_win_options = {
wrap = false,
cursorline = false,
cusorcolumn = false,
colorcolumn = "",
}
}
}
winshift.setup(conf)
end
return M