home/nvim: Delete old configs

This commit is contained in:
The Hedgehog 2022-11-11 11:06:11 -05:00
parent b62fc43860
commit a17185d089
Signed by: thehedgehog
GPG key ID: 8CDF3F7CAA53A0F5
50 changed files with 0 additions and 2344 deletions

View file

@ -1,29 +0,0 @@
-- Load impatient.nvim for fast loading
-- require'impatient'.enable_profile()
local fn = vim.fn
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
packer_bootstrap = fn.system({'git','clone','--depth','1','https://github.com/wbthomason/packer.nvim',install_path})
end
-- Load the plugins file. This incurs virtually no runtime penalty, as lazy-
-- loading plugins is handled by packer.nvim.
require('plugins')
vim.cmd('colorscheme catppuccin')
vim.g.mapleader = " "
require('config.vim')
-- Load my keybindings
-- require('config.keybindings')
-- Load my custom autocommands
-- require('config.autocmds')
-- Set leader
-- require("nvim-mapper").map("n", "<Space>", "<Nop>", { silent = true }, "", "", "")
-- set default notification thing to nvim-notify
-- vim.notify = require("notify")

View file

@ -1,69 +0,0 @@
vim.g.catppuccin_flavour = "mocha"
require("catppuccin").setup({
transparent_background = false,
term_colors = false,
compile = {
enabled = true,
path = vim.fn.stdpath("cache") .. "/catppuccin",
},
dim_inactive = {
enabled = false,
shade = "dark",
percentage = 0.15,
},
styles = {
comments = { "italic" },
conditionals = { "italic" },
loops = {},
functions = {},
keywords = {},
strings = {},
variables = {},
numbers = {},
booleans = {},
properties = {},
types = {},
operators = {},
},
integrations = {
barbar = false,
cmp = true,
fidget = false,
gitsigns = true,
leap = false,
lsp_saga = false,
lsp_trouble = false,
markdown = true,
neogit = false,
notify = false,
telescope = true,
treesitter = false,
treesitter_context = false,
ts_rainbow = false,
which_key = false,
indent_blankline = {
enabled = false,
colored_indent_levels = false,
},
native_lsp = {
enabled = true,
virtual_text = {
errors = { "italic" },
hints = { "italic" },
warnings = { "italic" },
information = { "italic" },
},
underlines = {
errors = { "underline" },
hints = { "underline" },
warnings = { "underline" },
information = { "underline" },
},
},
},
color_overrides = {},
highlight_overrides = {},
})
vim.cmd [[colorscheme catppuccin]]

View file

@ -1,49 +0,0 @@
local db = require('dashboard')
db.custom_header = {
'',
'▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▀▀▓▀█▓▓▓▓▓▓▓▄█████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓',
'▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█▄▀▓▄▀▌▐█▄▀▀▀█▄▄▄▄▄▄▄█████▄▄▄▄▓▀▀█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓',
'▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐██▄▓▀ ██▓▓▓█▓▓▓█▓███████████▓▓▓▓▄▀▀▀▀▀▓▄▄▀▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓',
'▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌█████▄▐▀▓▓▓▓▓▓▓███████████████▄▄▄███▓▓▓▓▓▓▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓',
'▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████▐▓▓▓▓▓▓▓████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█▐█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓',
'▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓███ ▓▓█▓▓▓▓▓▓▓██████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▌ ███▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓',
'▓▓▓▓▓▓▓▓▓▓▓▓▓███▓▓█ ▓▓▓▓▓▓▓▓████████████████████▓▓▓▓▓▓▓▓▓▀▓▓ █▄▓▓██▓▓▓▓▓▓▓▓▓▓▓▓▓',
'███████████████████▀▄▀▓▓▀█▓███████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓███ ████████████████',
'███████████████████▐█▄▓ ▄▄▄▄▀▀▀▀▀▀▀▀▀▄███▓▓▓▓▀▓▒▓▓███▓▓▓▓▓▓████▌████████████████',
'███████████████████ ▓▓▓ ▓▌▄▀▀▀▓▓▓▓▄ ▓▄▄▄▄█▓▓█ ▓██████▓▓▓███▓▌████████████████',
'████████████████████ ▀ ▄▄▄▓▓▓▓▄▄▄▄▄▄▄▄▄▄▄▓▓▄▀████████▓▓▓▓ ████████████████',
'█████████████████████▐▄ ▓▓█▄ ▄ ▓▓▓▀▀▀▀▀▓▓▓▓▓▓▓▓▓▓█▄▀█▓▓▓▓▓▓▓▓▓█████████████████',
'████████████████████▌▀█▐▓▌▀█ ▓ ▄▄ ▐▀ ▀▀▀▓█▄▄ ▓▓▓▓▓▓▄█████████████████',
'██████████████████████▌▄▄▀▀▀▀▀ ▓▓▓ ▓▓▓██▓▓ ▄██▐▓▓▓▓█▀▓▓▓ ███████████████████',
'██████████████████████▌▓▓▓▓▓▓▀▄█▓▓▄▄▀▀▀▓▓▓▄▄▄█▓▓▓ █▓▓▓▓ ▓▓▓▐▐███████████████████',
'███████████████████████▐▓▓▓▓▄█▓▓▓▓▓▓▓▓██▄▄▄▄▄▄▄▄▄▄▓▓▓▓▌▓ ▓▓▄█▀▀█████████████████',
'▓▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ █▓▓▓▓█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▀▄██▀▄▓▓▓▓▓▓▓▓▓▓▓██▌▓▓▓▓',
'▓▓▓▓▓▓█▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ █▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▀▓ ▓▓▀▓▄█▓▓▓▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓',
'▓▓▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ █▓█▄▓▀▀▀▀▀█▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓ ▀▓▓▓▄▄▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓',
'▓▓▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓▀▀▓▓▓▓ █▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▄▓▓▓ █▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▌▓▓▓▓▓',
'▓▓▓▓▓▓▓██▓▓▓▓▓▀▀▀▀▀▀ ▐▓▓▓▓▓▄█▓▓▓▓▓▓▓▓▓▓▓▓▀▀▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓',
'▓▓▓▓▓▓▓▀▀ ▓▓▓▓▓▓▒▒▒▒▌▐▓▓▓▓▓▓▄▄▄▀▀▀▀▀▀▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌ ▀▀▓▓▓▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓▓',
'▓▓▓▓▓▌▒▒▒▓▓▓▓▓▓▓▓▓▄▄▄▐▓▓▓▓▓▓▓▀▀▀▀ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▐█▄▀▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓▓▓',
'▓▓▓▓▓ ▓▒▄▄███████▀▀▀▀▐█▀▀▀▀ ░ ▓▓▓▓▓▓▓▓▀▀ ▓▒▒ ▄▓▓▓ ▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓▓▓▓',
'▓▓▓▓▓▐▓▓▀▒▒▒▒▒▒▒▒▒▒ ▓▒▓ ▄ ▄▀▀█ ▓▓▓▓▓▀ ░ ▄█▓▓▓▀ ▀▀▀▓▓███▓▓▓▓▓▓▓▓▓▓',
' ░▒ ▒▒ ░░ ░ ▒▒ ▄▀ ▐▌ ▐ ▄ ▄▄██▓▓▀ ▓▒▒▒▓▓▓▄ ▀▀░ ',
'░░░░░ ░░ ▒▒▒▒▒▒▒▒▒▒ ▓ ▓ ▄▄ ▄ ▄█▓███▓▓▀▓▓▒▒▒▒▒▒▒▒▒▒▒▓▓▄ ▒░░░░░',
'░░░░░ ▒░░░░ ▒▒░▒▒▒▓▄ ▓▌ ▓ ▄▓ ▒▒▒░ ▐▓▓▓▓▓▓▀ ▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓ ░░░░',
'░░░░░░░░░░░░ ▒▓▄▄▄▄▄▄▄▄▄▄ ▓ ▀▓▓▓▀ ▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓ ░░░',
'░░░░░░░░░░░░▐▒ ▀█▓▓▓▓▓▓▓▓▓█▄▓▄ ▒▒ ▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ░░░',
'',
}
db.custom_footer = { '', '' }
if packer_plugins ~= nil then
local count = #vim.tbl_keys(packer_plugins)
db.custom_footer[2] = 'Using ' .. count .. ' plugins'
end
db.custom_center = {
{
icon = '',
desc = 'File Finder',
shortcut = 'SPC f f',
},
}

View file

@ -1,362 +0,0 @@
-- Heirline config
-- Defines a bunch of components, then uses them.
local conditions = require('heirline.conditions')
local utils = require('heirline.utils')
local line = require('heirline')
-- Define some colors
local colors = {
bright_bg = utils.get_highlight("Folded").bg,
bright_fg = utils.get_highlight("Folded").fg,
red = utils.get_highlight("DiagnosticError").fg,
dark_red = utils.get_highlight("DiffDelete").bg,
green = utils.get_highlight("String").fg,
blue = utils.get_highlight("Function").fg,
gray = utils.get_highlight("NonText").fg,
orange = utils.get_highlight("Constant").fg,
purple = utils.get_highlight("Statement").fg,
cyan = utils.get_highlight("Special").fg,
diag_warn = utils.get_highlight("DiagnosticWarn").fg,
diag_error = utils.get_highlight("DiagnosticError").fg,
diag_hint = utils.get_highlight("DiagnosticHint").fg,
diag_info = utils.get_highlight("DiagnosticInfo").fg,
git_del = utils.get_highlight("diffRemoved").fg,
git_add = utils.get_highlight("diffAdded").fg,
git_change = utils.get_highlight("diffChanged").fg,
}
require('heirline').load_colors(colors)
-- Mode component
local ViMode = {
init = function(self)
self.mode = vim.fn.mode(1)
if not self.once then
vim.api.nvim_create_autocmd('ModeChanged', {
pattern = '*:*o',
command = 'redrawstatus',
})
self.once = true
end
end,
static = {
mode_names = {
n = 'N',
no = 'N?',
nov = 'N?',
noV = 'N?',
['no\22'] = 'N?',
niI = 'Ni',
niR = 'Nr',
niV = 'Nv',
nt = 'Nt',
v = 'V',
vs = 'Vs',
V = 'V_',
Vs = 'Vs',
['\22'] = '^V',
['\22s'] = '^V',
s = 'S',
S = 'S_',
['\19'] = '^S',
i = 'I',
ic = 'Ic',
ix = 'Ix',
R = 'R',
Rc = 'Rc',
Rx = 'Rx',
Rv = 'Rv',
Rvc = 'Rv',
Rvx = 'Rv',
c = 'C',
cv = 'Ex',
r = '...',
rm = 'M',
['r?'] = '?',
['!'] = '!',
t = 'T',
},
mode_colors = {
n = 'red' ,
i = 'green',
v = 'cyan',
V = 'cyan',
['\22'] = 'cyan',
c = 'orange',
s = 'purple',
S = 'purple',
['\19'] = 'purple',
R = 'orange',
r = 'orange',
['!'] = 'red',
t = 'red',
}
},
provider = function(self)
return ' %2('..self.mode_names[self.mode]..'%)'
end,
hl = function(self)
local mode = self.mode:sub(1, 1)
return { fg = self.mode_colors[mode], bold = true, }
end,
update = {
'ModeChanged',
},
}
ViMode = utils.surround({ "", "" }, "bright_bg", { ViMode, Snippets })
-- LSP Diagnostics
local Diagnostics = {
condition = conditions.has_diagnostics,
-- static = {
-- error_icon = vim.fn.sign_getdefined('DiagnosticSignError')[1].text,
-- warn_icon = vim.fn.sign_getdefined('DiagnosticSignWarn')[1].text,
-- info_icon = vim.fn.sign_getdefined('DiagnosticSignInfo')[1].text,
-- hint_icon = vim.fn.sign_getdefined('DiagnosticSignHint')[1].text,
-- },
init = function(self)
self.errors = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.ERROR })
self.warnings = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.WARN })
self.hints = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.HINT })
self.info = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.INFO })
self.error_icon = #vim.fn.sign_getdefined('DiagnosticSignError')[1].text
self.warn_icon = #vim.fn.sign_getdefined('DiagnosticSignWarn')[1].text
self.info_icon = #vim.fn.sign_getdefined('DiagnosticSignInfo')[1].text
self.hint_icon = #vim.fn.sign_getdefined('DiagnosticSignHint')[1].text
end,
update = { 'DiagnosticChanged', 'BufEnter' },
{
provider = '![',
},
{
provider = function(self)
return self.errors > 0 and (self.error_icon .. self.errors .. ' ')
end,
hl = { fg = 'diag_error' },
},
{
provider = function(self)
return self.warnings > 0 and (self.warn_icon .. self.warnings .. ' ')
end,
hl = { fg = 'diag_warn' },
},
{
provider = function(self)
return self.info > 0 and (self.info_icon .. self.info .. ' ')
end,
hl = { fg = 'diag_info' },
},
{
provider = function(self)
return self.hints > 0 and (self.hint_icon .. self.hints)
end,
hl = { fg = 'diag_hint' },
},
{
provider = ']',
},
}
-- Git status
local Git = {
condition = conditions.is_git_repo,
init = function(self)
self.status_dict = vim.b.gitsigns_status_dict
self.has_changes = self.status_dict.added ~= 0 or self.status_dict.removed ~= 0 or self.status_dict.changed ~= 0
end,
hl = { fg = 'orange' },
{
provider = function(self)
return '' .. self.status_dict.head
end,
hl = { bold = true }
},
{
condition = function(self)
return self.has_changes
end,
provider = '('
},
{
provider = function(self)
local count = self.status_dict.added or 0
return count > 0 and ('+' .. count)
end,
hl = { fg = 'git_add' },
},
{
provider = function(self)
local count = self.status_dict.removed or 0
return count > 0 and ('-' .. count)
end,
hl = { fg = 'git_del' },
},
{
provider = function(self)
local count = self.status_dict.changed or 0
return count > 0 and ('~' .. count)
end,
hl = { fg = 'git_change' },
},
{
condition = function(self)
return self.has_changes
end,
provider = ')',
},
}
-- Filename
local FileNameBlock = {
init = function(self)
self.filename = vim.api.nvim_buf_get_name(0)
end,
}
local FileIcon = {
init = function(self)
local filename = self.filename
local extension = vim.fn.fnamemodify(filename, ":e")
self.icon, self.icon_color = require("nvim-web-devicons").get_icon_color(filename, extension, { default = true })
end,
provider = function(self)
return self.icon and (self.icon .. " ")
end,
hl = function(self)
return { fg = self.icon_color }
end
}
local FileName = {
provider = function(self)
local filename = vim.fn.fnamemodify(self.filename, ":.")
if filename == "" then return "[No Name]" end
if not conditions.width_percent_below(#filename, 0.25) then
filename = vim.fn.pathshorten(filename)
end
return filename
end,
hl = { fg = utils.get_highlight("Directory").fg },
}
local FileFlags = {
{
condition = function()
return vim.bo.modified
end,
provider = "[+]",
hl = { fg = "green" },
},
{
condition = function()
return not vim.bo.modifiable or vim.bo.readonly
end,
provider = "",
hl = { fg = "orange" },
},
}
local FileNameModifer = {
hl = function()
if vim.bo.modified then
return { fg = "cyan", bold = true, force=true }
end
end,
}
local FileFormat = {
provider = function()
local fmt = vim.bo.fileformat
return fmt ~= 'unix' and fmt:upper()
end
}
local FileType = {
provider = function()
return string.upper(vim.bo.filetype)
end,
hl = { fg = utils.get_highlight("Type").fg, bold = true },
}
local FileSize = {
provider = function()
local suffix = { 'b', 'k', 'M', 'G', 'T', 'P', 'E' }
local fsize = vim.fn.getfsize(vim.api.nvim_buf_get_name(0))
fsize = (fsize < 0 and 0) or fsize
if fsize < 1024 then
return fsize..suffix[1]
end
local i = math.floor((math.log(fsize) / math.log(1024)))
return string.format("%.2g%s", fsize / math.pow(1024, i), suffix[i + 1])
end
}
FileNameBlock = utils.insert(FileNameBlock,
FileIcon,
utils.insert(FileNameModifer, FileName),
unpack(FileFlags),
{ provider = '%<'}
)
-- LSP
local LSPActive = {
condition = conditions.lsp_attached,
update = {'LspAttach', 'LspDetach'},
provider = function()
local names = {}
for i, server in pairs(vim.lsp.buf_get_clients(0)) do
table.insert(names, server.name)
end
return " [" .. table.concat(names, " ") .. "]"
end,
hl = { fg = "green", bold = true },
}
local LSPMessages = {
provider = require("lsp-status").status,
hl = { fg = "gray" },
}
-- Ruler
local Ruler = {
-- %l = current line number
-- %L = number of lines in the buffer
-- %c = column number
-- %P = percentage through file of displayed window
provider = "%7(%l/%3L%):%2c %P",
}
-- Scrollbar
local ScrollBar ={
static = {
-- sbar = { '▁', '▂', '▃', '▄', '▅', '▆', '▇', '█' }
sbar = { '🭶', '🭷', '🭸', '🭹', '🭺', '🭻' }
},
provider = function(self)
local curr_line = vim.api.nvim_win_get_cursor(0)[1]
local lines = vim.api.nvim_buf_line_count(0)
local i = math.floor((curr_line - 1) / lines * #self.sbar) + 1
return string.rep(self.sbar[i], 2)
end,
hl = { fg = "blue", bg = "bright_bg" },
}
-- Alignment
local Align = { provider = "%=" }
local Space = { provider = " " }
local StatusLine = {
ViMode, Space, FileNameBlock, Space, Git, Space, Diagnostics, Align,
LSPActive, Space, FileType, Space, Ruler, Space, ScrollBar
}
require'heirline'.setup(StatusLine)

View file

@ -1,44 +0,0 @@
local lsp = require('lspconfig')
local configs = require('lspconfig/configs')
-- Add zk setup
configs.zk = {
default_config = {
cmd = {'zk', 'lsp'},
filetypes = {'markdown'},
root_dir = function()
return vim.loop.cwd()
end,
settings = {}
};
}
lsp.sumneko_lua.setup {}
lsp.rust_analyzer.setup {}
lsp.astro.setup {}
lsp.bashls.setup {}
lsp.beancount.setup {}
lsp.dockerls.setup {}
lsp.diagnosticls.setup {}
lsp.marksman.setup {}
lsp.pyright.setup {}
lsp.rust_analyzer.setup {}
lsp.tailwindcss.setup {}
lsp.taplo.setup {}
lsp.tsserver.setup {}
lsp.vimls.setup {}
lsp.zk.setup {}

View file

@ -1,10 +0,0 @@
local null_ls = require('null-ls')
local format = null_ls.builtins.formatting
local diag = null_ls.builtins.diagnostics
local action = null_ls.builtins.code_actions
local completion = null_ls.builtins.completion
require("null-ls").setup({
sources = {
format.alejandra,
},
})

View file

@ -1,95 +0,0 @@
-- thehedgeh0g's neovim config.
-- This is intended for use on my machines, and this is not a general-purpose
-- config. I don't provide support for anyone else's use cases, and if you
-- use this, expect breakages at any time, as I update my workflow. Thanks!
-- I do provide comments as to why I do what I do, but those may not be
-- updated to reflect my current workflow, as my real notes are in a
-- private repo. But I try to keep the comments up to date.
-- Set some variables to make this less verbose
-- vim.g is global options
local g = vim.g
-- vim.o is general options
local o = vim.o
-- vim.wo is options that only affect the (w)indow
-- local wo = vim.wo
-- vim.bo is options that only affect the (b)uffer
-- local bo = vim.bo
-- Run Vim commands a bit more tersely
-- local cmd = vim.cmd
-- Set timeoutlen
g.timeoutlen = 50
-- Tab width 4.
o.tabstop = 4
o.shiftwidth = 4
o.expandtab = true
-- Set better colors
o.termguicolors = true
-- Set background colors
o.background = 'dark'
-- Show cursor position below each window
o.showmode = true
-- Autoindent
o.autoindent = true
-- The difference between these(above and below this) can be found here:
-- https://vi.stackexchange.com/questions/5818
-- Smart indent
o.smartindent = true
-- Autowrite buffers when leaving
o.autowriteall = true
-- Always write without asking
o.writeany = true
-- Reread files if they are modified outside of vim.
o.autoread = true
-- Set line numbering to relative
o.relativenumber = true
o.number = true
-- Set font
vim.cmd("set guifont=FiraCode\\ Nerd\\ Font\\ Mono:h14")
-- Disable some providers
g.loaded_ruby_provider = 0
g.loaded_perl_provider = 0
g.loaded_python_provider = 0
-- Disable all built-in vim plugins
g.loaded_gzip = 0
g.loaded_zip = 0
g.loaded_zipPlugin = 0
g.loaded_tar = 0
g.loaded_tarPlugin = 0
g.loaded_getscript = 0
g.loaded_getscriptPlugin = 0
g.loaded_vimball = 0
g.loaded_vimballPlugin = 0
g.loaded_2html_plugin = 0
g.loaded_matchit = 0
g.loaded_matchparen = 0
g.loaded_logiPat = 0
g.loaded_rrhelper = 0
g.loaded_netrw = 0
g.loaded_netrwPlugin = 0
g.loaded_netrwSettings = 0
g.loaded_netrwFileHandlers = 0
g.loaded_getscriptPlugin = 0
vim.cmd("au BufNewFile,BufReadPost *.md set filetype=markdown")
g.markdown_fenced_languages = {'nix', 'python'}

View file

@ -1,21 +0,0 @@
local notify = require('notify')
notify.print_history = function()
local color = {
DEBUG = 'NotifyDEBUGTitle',
TRACE = 'NotifyTRACETitle',
INFO = 'NotifyINFOTitle',
WARN = 'NotifyWARNTitle',
ERROR = 'NotifyERRORTitle',
}
for _, m in ipairs(notify.history()) do
vim.api.nvim_echo({
{vim.fn.strftime('%FT%T', m.time), 'Identifier'},
{' ', 'Normal'},
{m.level, color[m.level] or 'Title'},
{' ', 'Normal'},
{table.concat(m.message, ' '), 'Normal'},
}, false, {})
end
end
vim.cmd([[command! Message :lua require'notify'.print_history()<CR>]])

View file

@ -1,95 +0,0 @@
return require('packer').startup({function(use)
-- Allow Packer to manage itself
use 'wbthomason/packer.nvim'
use 'lewis6991/impatient.nvim'
use 'nvim-lua/plenary.nvim'
use {
'catppuccin/nvim',
as = 'catppuccin',
config = function() require('config.catppuccin') end,
}
use {
'glepnir/dashboard-nvim',
as = 'dashboard',
config = function() require('config.dashboard') end,
}
use {
'nvim-telescope/telescope.nvim',
as = 'telescope',
config = function() require('config.telescope') end,
}
use {
'nvim-lua/lsp-status.nvim',
as = 'lsp-status',
config = function() require('lsp-status').register_progress() end,
}
use {
'kyazdani42/nvim-web-devicons',
as = 'devicons',
config = function() require'nvim-web-devicons'.setup { default = true } end,
}
use {
'lewis6991/gitsigns.nvim',
as = 'gitsigns',
config = function() require('gitsigns').setup() end,
}
use {
"williamboman/mason.nvim",
as = "mason",
config = function() require("mason").setup() end,
}
use {
"williamboman/mason-lspconfig.nvim",
as = "mason-lspconfig",
after = "mason",
config = function() require("mason-lspconfig").setup() end,
}
use {
'neovim/nvim-lspconfig',
as = 'lspconfig',
config = function() require('config.lsp') end,
after = "mason-lspconfig",
}
use {
"jose-elias-alvarez/null-ls.nvim",
as = "null-ls",
config = function() require('config.null-ls') end,
after = "mason",
}
use {
"jayp0521/mason-null-ls.nvim",
as = "mason-null-ls",
after = "null-ls",
config = function() require("mason-null-ls").setup() end,
}
use {
'rebelot/heirline.nvim',
config = function() require('config.heirline') end,
after = { 'lsp-status', 'gitsigns', 'lspconfig', 'devicons', },
}
end,
config = {
-- Packer Configuration
display = {
open_fn = require'packer.util'.float,
prompt_border = 'single',
},
profile = {
enable = true
},
}})

View file

@ -1,12 +0,0 @@
-- thehedgeh0g's neovim config.
-- This is intended for use on my machines, and this is not a general-purpose
-- config. I don't provide support for anyone else's use cases, and if you
-- use this, expect breakages at any time, as I update my workflow. Thanks!
-- I do provide comments as to why I do what I do, but those may not be
-- updated to reflect my current workflow, as my real notes are in a
-- private repo. But I try to keep the comments up to date.
-- The autocommands file
-- I load my autocommands in here. This is things like
-- Only loading certain plugins on filetype and
-- cwd combos, for instance.

View file

@ -1,8 +0,0 @@
vim.g.chadtree_settings = {
options = {
show_hidden = true,
version_control = {
enable = true,
},
}
}

View file

@ -1,52 +0,0 @@
local cmp = require'cmp'
cmp.setup({
snippet = {
expand = function(args)
require('luasnip').lsp_expand(args.body)
end,
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
mapping = cmp.mapping.preset.insert({
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(),
['<CR>'] = cmp.mapping.confirm({ select = true }),
}),
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
}, {
{ name = 'buffer' },
})
})
-- Set configuration for specific filetype.
cmp.setup.filetype('gitcommit', {
sources = cmp.config.sources({
{ name = 'cmp_git' },
}, {
{ name = 'buffer' },
})
})
cmp.setup.cmdline('/', {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = 'buffer' }
}
})
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' }
}, {
{ name = 'cmdline' }
})
})
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())

View file

@ -1 +0,0 @@
require('Comment').setup()

View file

@ -1,54 +0,0 @@
-- Core COQ Settings
vim.g.coq_settings = {
auto_start = 'shut-up',
xdg = true,
keymap = {
recommended = false,
},
match = {
unifying_chars = {
"-",
"_",
".",
"/"
},
max_results = 20
}
}
local remap = vim.api.nvim_set_keymap
local npairs = require('nvim-autopairs')
npairs.setup({ map_bs = false, map_cr = false })
-- these mappings are coq recommended mappings unrelated to nvim-autopairs
remap('i', '<esc>', [[pumvisible() ? "<c-e><esc>" : "<esc>"]], { expr = true, noremap = true })
remap('i', '<c-c>', [[pumvisible() ? "<c-e><c-c>" : "<c-c>"]], { expr = true, noremap = true })
remap('i', '<tab>', [[pumvisible() ? "<c-n>" : "<tab>"]], { expr = true, noremap = true })
remap('i', '<s-tab>', [[pumvisible() ? "<c-p>" : "<bs>"]], { expr = true, noremap = true })
-- skip it, if you use another global object
_G.MUtils= {}
MUtils.CR = function()
if vim.fn.pumvisible() ~= 0 then
if vim.fn.complete_info({ 'selected' }).selected ~= -1 then
return npairs.esc('<c-y>')
else
return npairs.esc('<c-e>') .. npairs.autopairs_cr()
end
else
return npairs.autopairs_cr()
end
end
remap('i', '<cr>', 'v:lua.MUtils.CR()', { expr = true, noremap = true })
MUtils.BS = function()
if vim.fn.pumvisible() ~= 0 and vim.fn.complete_info({ 'mode' }).mode == 'eval' then
return npairs.esc('<c-e>') .. npairs.autopairs_bs()
else
return npairs.autopairs_bs()
end
end
remap('i', '<bs>', 'v:lua.MUtils.BS()', { expr = true, noremap = true })

View file

@ -1,37 +0,0 @@
-- COQ.3p settings
-- 3rd-party completion sources
require("coq_3p") {
{
-- Neovim Lua API Source
src = 'nvimlua',
short_name = 'NVIM',
conf_only = false
},
-- {
-- Shell REPL source
-- src = 'repl',
-- sh = 'zsh',
-- shell = {
-- p = 'python',
-- n = 'node',
-- },
-- max_lines = 10,
-- deadline = 50,
-- unsafe = {
-- 'rm',
-- 'mv',
-- 'brew',
-- }
-- },
-- {
-- Calculator Source
-- src = 'bc',
-- short_name = 'CALC',
-- precision = 5
-- },
-- {
-- -- Orgmode.nvim Source
-- src = 'orgmode',
-- short_name = 'ORG'
-- }
}

View file

@ -1,29 +0,0 @@
-- thehedgeh0g's neovim config.
-- This is intended for use on my machines, and this is not a general-purpose
-- config. I don't provide support for anyone else's use cases, and if you
-- use this, expect breakages at any time, as I update my workflow. Thanks!
-- I do provide comments as to why I do what I do, but those may not be
-- updated to reflect my current workflow, as my real notes are in a
-- private repo. But I try to keep the comments up to date.
-- Dashboard-nvim configuration
local g = vim.g
-- Set finder
g.dashboard_default_executive = 'telescope'
-- set custom footer
vim.g.dashboard_custom_footer = {
"Neovim loaded in " .. vim.fn.printf(
"%.3f",
vim.fn.reltimefloat(vim.fn.reltime(vim.g.start_time))
) .. " seconds.",
}
-- disable dashboard sessions
g.dashboard_enable_session = false
-- Disable statusline in dashboard
g.dashboard_disable_statusline = true

View file

@ -1,27 +0,0 @@
-- local date = require('date')
-- local dial = require('dial')
-- local common = dial.common
--
-- local wiki_date_syntax = {
-- desc = "Wikipedia date syntax: %d %h %Y",
-- find = common.find_pattern("%d %h %Y"),
-- add = function(cursor, text, addend)
-- local year = tonumber(text:sub(8, 11))
-- local month = tostring(text:sub(4, 6))
-- local day = tonumber(text:sub(1, 2))
-- if cursor == nil then cursor = 1 end -- default: day
-- if cursor >= 8 then
-- year = year + addend
-- cursor = 8
-- elseif cursor >= 4 and cursor <= 6 then
-- month = month + addend
-- cursor = 4
-- else
-- day = day + addend
-- cursor = 1
-- end
-- local date = os.time{year=year, month=month, day=day}
-- text = os.date("%d %b %Y", date)
-- return cursor, text
-- end
-- }

View file

@ -1,6 +0,0 @@
require('dressing').setup({
select = {
enabled = true,
backend = { "fzf_lua", "telescope", "builtin", "nui" },
}
})

View file

@ -1,288 +0,0 @@
-- thehedgeh0g's neovim config.
-- This is intended for use on my machines, and this is not a general-purpose
-- config. I don't provide support for anyone else's use cases, and if you
-- use this, expect breakages at any time, as I update my workflow. Thanks!
-- I do provide comments as to why I do what I do, but those may not be
-- updated to reflect my current workflow, as my real notes are in a
-- private repo. But I try to keep the comments up to date.
-- Feline configuration
-- I use famiu/feline.nvim for my statusline,
-- and I don't use one of the built-in presets, though they are very good.
-- I built my own, mostly because I could.
-- Define the components table
local components = {
active = {},
inactive = {},
force_inactive = {
filetypes = {},
buftypes = {},
bufnames = {}
}
}
-- Initialize active statusline
table.insert(components.active, {})
table.insert(components.active, {})
table.insert(components.active, {})
table.insert(components.active, {})
table.insert(components.active, {})
-- Variable definitions to make this easier to use
local lsp = require('feline.providers.lsp')
local vi_mode_utils = require('feline.providers.vi_mode')
local git = require('feline.providers.git')
-- Bar that uses current mode color
components.active[1][1] = {
provider = '',
hl = function()
local val = {}
val.fg = vi_mode_utils.get_mode_color()
return val
end,
}
-- Components for left side when active
components.active[1][2] = {
-- The current mode
provider = 'vi_mode',
hl = function()
local val = {}
val.name = vi_mode_utils.get_mode_highlight_name()
val.fg = vi_mode_utils.get_mode_color()
val.style = 'bold'
return val
end,
right_sep = ' ',
}
components.active[1][3] = {
-- File info
provider = 'file_info',
type = 'base-only',
left_sep = {
'vertical_bar',
},
right_sep = {
'vertical_bar',
}
}
-- Git Segments
-- Git branch
components.active[2][1] = {
provider = 'git_branch',
left_sep = { str = 'block' },
right_sep = { str = 'block' },
hl = { fg = 'cyan' },
-- luacheck: globals winid
enabled = function() return git.git_info_exists(winid) end
}
components.active[2][2] = {
provider = 'git_diff_added',
hl = {
bg = 'green',
fg = 'black'
},
right_sep = {
'block',
hl = {
bg = 'green'
}
},
enabled = function() return git.git_info_exists(winid) end
}
components.active[2][3] = {
provider = 'git_diff_removed',
hl = {
bg = 'red',
fg = 'black'
},
left_sep = {
str = 'block',
hl = { fg = 'red' }
},
right_sep = {
str = 'block',
hl = { fg = 'red' }
},
enabled = function() return git.git_info_exists(winid) end
}
components.active[2][4] = {
provider = 'git_diff_changed',
hl = {
bg = 'violet',
fg = 'black'
},
left_sep = {
str = 'block',
hl = { fg = 'violet' }
},
right_sep = {
str = 'block',
hl = { fg = 'violet' }
},
enabled = function() return git.git_info_exists(winid) end
}
components.active[3][1] = {
{
hl = {
bg = 'bg'
}
}
}
-- LSP segments
components.active[4][1] = {
provider = 'diagnostic_hints',
hl = {
fg = 'black',
bg = 'cyan'
},
left_sep = {
str = 'block',
hl = { fg = 'cyan' }
},
right_sep = {
str = 'block',
hl = { fg = 'cyan' }
},
enabled = function() return lsp.diagnostics_exist('Hint', winid) end
}
components.active[4][2] = {
provider = 'diagnostic_info',
hl = {
fg = 'black',
bg = 'oceanblue'
},
left_sep = {
str = 'block',
hl = { fg = 'oceanblue' }
},
right_sep = {
str = 'block',
hl = { fg = 'oceanblue' }
},
enabled = function() return lsp.diagnostics_exist('Info', winid) end
}
components.active[4][3] = {
provider = 'diagnostic_warnings',
hl = {
fg = 'black',
bg = 'yellow'
},
left_sep = {
str = 'block',
hl = { fg = 'yellow' }
},
right_sep = {
str = 'block',
hl = { fg = 'yellow' }
},
enabled = function() return lsp.diagnostics_exist('Warning', winid) end
}
components.active[4][4] = {
provider = 'diagnostic_errors',
hl = {
fg = 'black',
bg = 'bg'
},
left_sep = {
str = 'block',
hl = { fg = 'bg' }
},
right_sep = {
str = 'block',
hl = { fg = 'bg' }
},
enabled = function() return lsp.diagnostics_exist('Error', winid) end
}
components.active[5][1] = {
-- file percentage
provider = 'line_percentage',
icon = '',
left_sep = {
{
str = 'block',
hl = {
fg = 'black',
bg = 'black'
}
},
},
right_sep = {
{
str = 'block',
hl = {
fg = 'black',
bg = 'black'
}
},
{str = ' '}
},
hl = {
fg = 'violet',
bg = 'black'
}
}
-- Disable on certain types of files
components.force_inactive.filetypes = {
'packer',
'help'
}
components.force_inactive.buftypes = {
'terminal',
}
local colors = {
none = "NONE",
bg_dark = "#1f2335",
bg = "#24283b",
bg_highlight = "#292e42",
terminal_black = "#414868",
fg = "#c0caf5",
fg_dark = "#a9b1d6",
fg_gutter = "#3b4261",
dark3 = "#545c7e",
dark5 = "#737aa2",
comment = "#565f89",
cyan = "#7dcfff",
blue = "#7aa2f7",
blue0 = "#3d59a1",
blue1 = "#2ac3de",
blue2 = "#0db9d7",
blue5 = "#89ddff",
blue6 = "#B4F9F8",
blue7 = "#394b70",
magenta = "#bb9af7",
magenta2 = "#ff007c",
purple = "#9d7cd8",
orange = "#ff9e64",
yellow = "#e0af68",
green = "#9ece6a",
green1 = "#73daca",
green2 = "#41a6b5",
teal = "#1abc9c",
red = "#f7768e",
red1 = "#db4b4b",
}
-- Setup with a few things
require('feline').setup ({
--properties = props,
components = components,
colors = colors,
})

View file

@ -1,33 +0,0 @@
local M = {}
function M.fzf_projectionist()
local project_dirs = {
-- vim.fn.expand is used to get full path, otherwise ls
-- will treat each as strings, which is not possible
vim.fn.expand'~/nix',
}
-- help wanted, if there's a possible loop for above case please tell me
local action = require "fzf.actions".action
coroutine.wrap(function()
local choice = require "fzf".fzf( project_dirs , '--preview="ls -la {}"')
if choice then
require('fzf-lua').files({
prompt = 'Project » ',
cwd = choice[1];
})
vim.cmd('chdir' .. choice[1])
end
end)()
end
function M.fzf_notes()
local choice = '~/notes'
require('fzf-lua').files({
prompt = 'Notes » ',
cwd = choice;
})
vim.cmd('chdir ' .. choice )
end
return M

View file

@ -1,221 +0,0 @@
local gl = require('galaxyline')
local condition = require('galaxyline.condition')
local gls = gl.section
gl.short_line_list = {'NvimTree','vista','dbui','packer', 'CHADTree'}
local colors = {
bg = '#1f2335',
fg = '#a9b1d6',
yellow = '#e0af68',
cyan = '#7dcfff',
darkblue = '#3d59a1',
green = '#9ece6a',
orange = '#ff9e64',
violet = '#9d7cd8',
magenta = '#bb9af7',
blue = '#7aa2f7';
red = '#f7768e';
}
gls.left[1] = {
RainbowRed = {
provider = function() return '' end,
highlight = {colors.blue,colors.bg}
},
}
gls.left[2] = {
ViMode = {
provider = function()
-- auto change color according the vim mode
local mode_color = {n = colors.red, i = colors.green,v=colors.blue,
[''] = colors.blue,V=colors.blue,
c = colors.magenta,no = colors.red,s = colors.orange,
S=colors.orange,[''] = colors.orange,
ic = colors.yellow,R = colors.violet,Rv = colors.violet,
cv = colors.red,ce=colors.red, r = colors.cyan,
rm = colors.cyan, ['r?'] = colors.cyan,
['!'] = colors.red,t = colors.red}
vim.api.nvim_command('hi GalaxyViMode guifg='..mode_color[vim.fn.mode()])
return ''
end,
highlight = {colors.red,colors.bg,'bold'},
},
}
gls.left[3] = {
FileSize = {
provider = 'FileSize',
condition = condition.buffer_not_empty,
highlight = {colors.fg,colors.bg}
}
}
gls.left[4] ={
FileIcon = {
provider = 'FileIcon',
condition = condition.buffer_not_empty,
highlight = {require('galaxyline.providers.fileinfo').get_file_icon_color,colors.bg},
},
}
gls.left[5] = {
FileName = {
provider = 'FileName',
condition = condition.buffer_not_empty,
highlight = {colors.magenta,colors.bg,'bold'}
}
}
gls.left[6] = {
DiagnosticError = {
provider = 'DiagnosticError',
icon = '',
highlight = {colors.red,colors.bg}
}
}
gls.left[7] = {
DiagnosticWarn = {
provider = 'DiagnosticWarn',
icon = '',
highlight = {colors.yellow,colors.bg},
}
}
gls.left[8] = {
DiagnosticHint = {
provider = 'DiagnosticHint',
icon = '',
highlight = {colors.cyan,colors.bg},
}
}
gls.left[9] = {
DiagnosticInfo = {
provider = 'DiagnosticInfo',
icon = '',
highlight = {colors.blue,colors.bg},
}
}
gls.mid[1] = {
ShowLspClient = {
provider = 'GetLspClient',
condition = function ()
local tbl = {['dashboard'] = true,['']=true}
if tbl[vim.bo.filetype] then
return false
end
return true
end,
icon = ' LSP:',
highlight = {colors.cyan,colors.bg,'bold'}
}
}
gls.right[1] = {
LineInfo = {
provider = 'LineColumn',
separator = ' ',
separator_highlight = {'NONE',colors.bg},
highlight = {colors.fg,colors.bg},
},
}
gls.right[1] = {
PerCent = {
provider = 'LinePercent',
separator = ' ',
separator_highlight = {'NONE',colors.bg},
highlight = {colors.fg,colors.bg,'bold'},
}
}
gls.right[3] = {
FileEncode = {
provider = 'FileEncode',
condition = condition.hide_in_width,
separator = ' ',
separator_highlight = {'NONE',colors.bg},
highlight = {colors.green,colors.bg,'bold'}
}
}
gls.right[4] = {
FileFormat = {
provider = 'FileFormat',
condition = condition.hide_in_width,
separator = ' ',
separator_highlight = {'NONE',colors.bg},
highlight = {colors.green,colors.bg,'bold'}
}
}
gls.right[5] = {
GitIcon = {
provider = function() return '' end,
condition = condition.check_git_workspace,
separator = ' ',
separator_highlight = {'NONE',colors.bg},
highlight = {colors.violet,colors.bg,'bold'},
}
}
gls.right[6] = {
GitBranch = {
provider = 'GitBranch',
condition = condition.check_git_workspace,
highlight = {colors.violet,colors.bg,'bold'},
}
}
gls.right[7] = {
DiffAdd = {
provider = 'DiffAdd',
condition = condition.hide_in_width,
icon = '',
highlight = {colors.green,colors.bg},
}
}
gls.right[8] = {
DiffModified = {
provider = 'DiffModified',
condition = condition.hide_in_width,
icon = '',
highlight = {colors.orane,colors.bg},
}
}
gls.right[9] = {
DiffRemove = {
provider = 'DiffRemove',
condition = condition.hide_in_width,
icon = '',
highlight = {colors.red,colors.bg},
}
}
gls.right[10] = {
RainbowBlue = {
provider = function() return '' end,
highlight = {colors.blue,colors.bg}
},
}
gls.short_line_left[1] = {
BufferType = {
provider = 'FileTypeName',
separator = ' ',
separator_highlight = {'NONE',colors.bg},
highlight = {colors.blue,colors.bg,'bold'}
}
}
gls.short_line_left[2] = {
SFileName = {
provider = 'SFileName',
condition = condition.buffer_not_empty,
highlight = {colors.fg,colors.bg,'bold'}
}
}
gls.short_line_right[1] = {
BufferIcon = {
provider= 'BufferIcon',
highlight = {colors.fg,colors.bg}
}
}

View file

@ -1 +0,0 @@
require('gitsigns').setup()

View file

@ -1,37 +0,0 @@
vim.cmd [[highlight IndentBlanklineIndent1 guifg=#F7768E gui=nocombine]]
vim.cmd [[highlight IndentBlanklineIndent2 guifg=#FF9E64 gui=nocombine]]
vim.cmd [[highlight IndentBlanklineIndent3 guifg=#E0AF68 gui=nocombine]]
vim.cmd [[highlight IndentBlanklineIndent4 guifg=#9ECE6A gui=nocombine]]
vim.cmd [[highlight IndentBlanklineIndent5 guifg=#7AA2f7 gui=nocombine]]
vim.cmd [[highlight IndentBlanklineIndent6 guifg=#9D7CD8 gui=nocombine]]
vim.opt.listchars:append("eol:﬋")
vim.opt.listchars:append("space:")
require('indent_blankline').setup {
show_current_context_start = true,
show_current_context = true,
show_end_of_line = true,
use_treesitter = true,
char_highlight_list = {
"IndentBlanklineIndent1",
"IndentBlanklineIndent2",
"IndentBlanklineIndent3",
"IndentBlanklineIndent4",
"IndentBlanklineIndent5",
"IndentBlanklineIndent6",
},
buftype_exclude = {
'terminal',
'packer',
'help',
},
filetype_exclude = {
'alpha',
'packer',
'CHADTree',
'NeogitStatus',
'NeogitCommitMessage',
'NeogitGitCommandHistory',
}
}

View file

@ -1,81 +0,0 @@
-- thehedgeh0g's neovim config.
-- This is intended for use on my machines, and this is not a general-purpose
-- config. I don't provide support for anyone else's use cases, and if you
-- use this, expect breakages at any time, as I update my workflow. Thanks!
-- I do provide comments as to why I do what I do, but those may not be
-- updated to reflect my current workflow, as my real notes are in a
-- private repo. But I try to keep the comments up to date.
-- The keybindings file
-- This defines all keybindings in a style that makes them useful with which-key.
-- This also means that this will be a very verbose file.
-- See https://github.com/folke/which-key.nvim#%EF%B8%8F-mappings
-- for my preferred style of mapping keys.
local fzf = require('config.fzf')
local term = require('config.toggleterm')
-- Make this less verbose.
local wk = require("which-key")
wk.register({
f = {
name = "Find",
f = { "<cmd>Telescope find_files<cr>", "Find Files" },
n = { "<cmd>enew<cr>", "New File" },
b = { function() require('telescope').extensions.file_browser.file_browser({hidden = true}) end,"File Browser" },
t = { "<cmd>CHADopen<cr>", "Open File Tree" },
},
b = {
name = "Buffers",
n = { "<cmd>BufferNext<cr>", "Next Buffer" },
p = { "<cmd>BufferPrevious<cr>", "Previous Buffer" },
c = { "<cmd>BufferClose<cr>", "Close Buffer" },
P = { "<cmd>BufferPin<cr>", "Pin/Unpin Buffer" },
i = { "<cmd>BufferPick<cr>", "Pick Buffer" },
m = {
name = "Move Buffers",
l = { "<cmd>BufferMovePrevious<cr>", "Move Buffer Left" },
r = { "<cmd>BufferMoveNext<cr>", "Move Buffer Right" },
},
gl = { "<cmd>BufferLast<cr>", "Go To Last Buffer" },
},
h = {
name = "Help",
s = { "<cmd>Telescope help_tags<cr>", "Search helptags" },
},
p = {
name = "Projects",
s = { "<cmd>Telescope projects<cr>", "Search Projects" },
},
g = {
name = 'Git',
c = { "<cmd>Telescope git_commits<cr>", "Search Commits" },
b = { "<cmd>Telescope git_branches<cr>", "Search Branches" },
s = { "<cmd>Telescope git_status<cr>", "Git Status" },
o = { function() term.lazygit() end, "Open Lazygit"}
},
r = {
name = "Rust",
r = { function() require('rust-tools.runnables').runnables() end, "Rust Runnables" },
mu = { function() require'rust-tools.move_item'.move_item(up) end, "Move Item Up" },
md = { function() require'rust-tools.move_item'.move_item(down) end, "Move Item Down" },
c = {
name = "Crate",
v = {},
u = {},
U = {},
g = { function() require'rust-tools.crate_graph'.view_crate_graph(backend, output) end, "View Crate Graph"},
},
},
n = {
name = "Notes",
s = { function() fzf.fzf_notes() end, "Search Notes" }
}
},
{
mode = "n",
prefix = "<leader>",
noremap = true,
})

View file

@ -1,22 +0,0 @@
local lspconfig = require('lspconfig')
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
lspconfig.sumneko_lua.setup {
settings = {
Lua = {
runtime = {
version = 'LuaJIT',
},
diagnostics = {
globals = {'vim', 'table', 'package', 'print'},
},
workspace = {
library = vim.api.nvim_get_runtime_file("", true),
},
telemetry = {
enable = false,
},
},
},
}
require'lspconfig'.rnix.setup{}

View file

@ -1,3 +0,0 @@
require('neoclip').setup({
})

View file

@ -1,9 +0,0 @@
local neogit = require('neogit')
neogit.setup {
disable_insert_on_commit = false,
integrations = {
diffview = true,
},
disable_builtin_notifications = true,
}

View file

@ -1,15 +0,0 @@
require('neorg').setup {
-- Tell Neorg what modules to load
load = {
["core.defaults"] = {}, -- Load all the default modules
["core.norg.concealer"] = {}, -- Allows for use of icons
["core.norg.dirman"] = { -- Manage your directories with Neorg
config = {
workspaces = {
school = "~/notes/school",
tech = "~/notes/tech",
}
}
}
}
}

View file

@ -1,48 +0,0 @@
-- thehedgeh0g's neovim config.
-- This is intended for use on my machines, and this is not a general-purpose
-- config. I don't provide support for anyone else's use cases, and if you
-- use this, expect breakages at any time, as I update my workflow. Thanks!
-- I do provide comments as to why I do what I do, but those may not be
-- updated to reflect my current workflow, as my real notes are in a
-- private repo. But I try to keep the comments up to date.
-- Neovide Configuration
-- I use Neovide, a neovim frontend written in rust.
-- This is my config for it, using the settings listed at
-- https://github.com/neovide/neovide/wiki/Configuration
-- Set some variables to make this less verbose
-- vim.o is global options
local o = vim.o
-- vim.wo is options that only affect the (w)indow
local wo = vim.wo
-- vim.bo is options that only affect the (b)uffer
local bo = vim.bo
-- Set refresh rate to 60
g.neovide_refresh_rate = 60
-- Set transparency to 1(this disables transparency)
g.neovide_transparency = 1.0
-- Set neovide to use fullscreen
g.neovide_fullscreen = 'v:true'
-- Set neovide to remember last window size.
g.neovide_remember_window_size = 'v:true'
-- Allow neovide to use the Super key in combos
g.neovide_input_use_logo = 'v:true'
-- Set animation length
g.neovide_cursor_animation_length = 0.2
-- Set cursor trail length
g.neovide_cursor_trail_legth = 0.5
-- Set cursor particles
g.neovide_cursor_vfx_mode = 'railgun'

View file

@ -1,35 +0,0 @@
require("nnn").setup({
explorer = {
cmd = "nnn -G", -- command overrride (-F1 flag is implied, -a flag is invalid!)
width = 24, -- width of the vertical split
side = "topleft", -- or "botright", location of the explorer window
session = "", -- or "global" / "local" / "shared"
tabs = true, -- seperate nnn instance per tab
},
picker = {
cmd = "nnn -G", -- command override (-p flag is implied)
style = {
width = 0.9, -- width in percentage of the viewport
height = 0.8, -- height in percentage of the viewport
xoffset = 0.5, -- xoffset in percentage
yoffset = 0.5, -- yoffset in percentage
border = "single"-- border decoration for example "rounded"(:h nvim_open_win)
},
session = "", -- or "global" / "local" / "shared"
},
auto_open = {
setup = nil, -- or "explorer" / "picker", auto open on setup function
tabpage = nil, -- or "explorer" / "picker", auto open when opening new tabpage
empty = true,
ft_ignore = {
"gitcommit",
}
},
auto_close = true,
replace_netrw = 'picker',
mappings = {},
windownav = {
left = "<C-w>h",
right = "<C-w>l"
},
})

View file

@ -1,4 +0,0 @@
require('notify').setup({
timeout = 2000,
render = "minimal",
})

View file

@ -1,35 +0,0 @@
local null_ls = require('null-ls')
local format = null_ls.builtins.formatting
local diagnostic = null_ls.builtins.diagnostics
-- local actions = null_ls.builtins.code_actions
-- local hover = null_ls.builtins.hover
local sources = {
format.stylua.with({
condition = function(utils)
return utils.root_has_file("stylua.toml")
end,
}),
format.black,
format.fish_indent,
format.gofmt,
format.isort,
format.taplo,
format.trim_whitespace,
diagnostic.shellcheck,
diagnostic.luacheck.with({
extra_args = { "--config", vim.fn.expand("~/.config/.luacheckrc") }
}),
}
require("null-ls").setup({
sources = sources,
on_attach = function(client)
if client.server_capabilities.document_formatting then
vim.cmd("autocmd BufWritePre <buffer> lua vim.lsp.buf.format()")
end
end
})

View file

@ -1,12 +0,0 @@
vim.g.nvim_tree_gitignore = 1
vim.g.nvim_tree_quit_on_open = 1
vim.g.nvim_tree_indent_markers = 1
require('nvim-tree').setup {
disable_netrw = true,
hijack_netrw= true,
auto_close = true,
hijack_cursor = true,
update_cwd = true,
}

View file

@ -1,3 +0,0 @@
require('octo').setup({
})

View file

@ -1,59 +0,0 @@
require('orgmode').setup({
-- Global settings
-- All files with TODOs that go into the agenda.
org_agenda_files = {'~/notes/todos.org'},
-- The file that org captures go into.
org_default_notes_file = '~/notes/capture.org',
-- Al the todo keywords
-- Includes fast access keys
org_todo_keywords = {'TODO(t)', 'WORKING(w)', 'NEXT(n)', '|', 'DONE(d)'},
-- No indentation
org_indent_mode = 'noindent',
-- Archive file
org_archive_file = '~/notes/archive.org',
-- Agenda Settings
-- Deadline in days
org_deadline_warning_days = 7,
--Show week view on agenda by default
org_agenda_span = 'week',
-- Templates for capturing and refiling
-- TODO Finish the orgmode capture templates
org_agenda_templates = {
t = { description = "Task", template = "* TODO %?\n %u", target = "~/notes/todos.org" },
s = { description = "Spanish Note", template = "* %T \n** %?\n", target = "~/notes/spanish.org" },
h = { description = "History Note", template = "* %T \n** %?\n", target = "~/notes/history.org" },
g = { description = "Graphics Note", template = "* %T \n** %?\n", target = "~/notes/graphics.org" },
p = { description = "Photography Note", template = "* %T \n** %?\n", target = "~/notes/photography.org" },
a = { description = "AP Comp Sci Note", template = "* %T \n** %?\n", target = "~/notes/apcompsci.org" },
y = { description = "Physics Note", template = "* %T \n** %?\n", target = "~/notes/physics.org" },
m = { description = "Math Note", template = "* %T \n** %?\n", target = "~/notes/math.org" },
e = { description = "English Note", template = "* %T \n** %?\n", target = "~/notes/english.org" }
},
-- Priorities
org_priority_highest = 1,
org_priority_default = 2,
org_priority_lowest = 3,
-- Hide scheduled or deadline entries if they are done
org_agenda_skip_scheduled_if_done = true,
org_agenda_skip_deadline_if_done = true,
-- Tag settings
-- Allow child tags to inheirit parent tags
org_use_tag_inheritance = true,
-- Tags to exclude from inheiritance
org_tags_exclude_from_inheritance = {},
--
})

View file

@ -1,5 +0,0 @@
require("project_nvim").setup {
manual_mode = false,
show_hidden = true,
exclude_dirs = {"/private/var/*"},
}

View file

@ -1 +0,0 @@
require('rust-tools').setup({})

View file

@ -1,38 +0,0 @@
require'sniprun'.setup({
selected_interpreters = {'Python3_fifo'}, --" use those instead of the default for the current filetype
repl_enable = {'Python3_fifo', 'R_original'}, --" enable REPL-like behavior for the given interpreters
repl_disable = {}, --" disable REPL-like behavior for the given interpreters
interpreter_options = {
C_original = { compiler = "clang" },
GFM_original = {
default_filetype = 'bash'
}
},
inline_messages = 0, --" inline_message (0/1) is a one-line way to display messages
--" to workaround sniprun not being able to display anything
borders = 'single', --" type display borders around floating windows, if used
--" possible values are 'none', 'single', 'double', or 'shadow'
-- customize highlight groups (setting this field in configuration overrides colorscheme)
show_no_output = {
"Classic",
"TempFloatingWindow", --# implies LongTempFloatingWindow, which has no effect on its own
},
--" you can combo different display modes as desired
display = {
"Classic", -- "display results in the command-line area
"VirtualTextOk", -- "display ok results as virtual text (multiline is shortened)
-- "VirtualTextErr", -- "display error results as virtual text
-- "TempFloatingWindow", -- "display results in a floating window
-- "LongTempFloatingWindow", -- "same as above, but only long results. To use with VirtualText__
-- "Terminal" -- "display results in a vertical split
-- "TerminalWithCode", --# display results and code history in a vertical split
-- "NvimNotify", --# display with the nvim-notify plugin
-- "Api" --# return output to a programming interface
},
})

View file

@ -1,22 +0,0 @@
local home = vim.fn.expand("~/newnotes")
require('telekasten').setup({
home = home,
take_over_my_home = true,
dailies = home .. '/' .. 'daily',
weeklies = home .. '/' .. 'weekly',
templates = home .. '/' .. '_templates',
img_subdir = "_attachments",
extension = ".md",
follow_creates_nonexisting = true,
dailies_create_nonexisting = true,
weeklies_create_nonexisting = true,
template_new_weekly= home .. '/' .. '_templates/weekly.md',
template_new_daily = home .. '/' .. '_templates/daily.md',
template_new_note = home .. '/' .. '_templates/new_note.md',
image_link_style = "markdown",
plug_into_calendar = false,
subdirs_in_links = true,
template_handling = "smart",
new_note_location = "smart",
rename_update_links = true,
})

View file

@ -1,52 +0,0 @@
local telescope = require('telescope')
telescope.setup {
defaults = {
border = {},
borderchars = { " ", " ", " ", " ", " ", " ", " ", " " },
file_ignore_patterns = {
-- Alfred-specific files
"%.alfredworkflow",
"%.alfredpreferences",
-- macOS-specific files
"%.app",
".DS_Store",
".CFUserTextEncoding",
-- Images
"%.jpg",
"%.png",
"%.webp",
-- Misc files I can't open in neovim.
"%.pdf",
-- Vim swap files
"%.swp",
-- GPG-Encrypted files
"%.gpg",
".password-store/",
-- Git dirs
"^.git/"
},
},
extensions = {
project = {
base_dirs = {
{'~/projects/assembler/'},
},
hidden_files = true
},
}
}
-- Extensions
-- Fzy-native
telescope.load_extension('fzy_native')
-- Projects
telescope.load_extension('projects')
-- File browser
telescope.load_extension('file_browser')
-- ui.select
telescope.load_extension("ui-select")

View file

@ -1,14 +0,0 @@
local Terms = {}
local Terminal = require('toggleterm.terminal').Terminal
local lazygit = Terminal:new({
cmd = "lazygit",
hidden = true,
count = 11,
direction = 'float',
})
function Terms.lazygit()
lazygit:toggle()
end
return Terms

View file

@ -1,22 +0,0 @@
-- thehedgeh0g's neovim config.
-- This is intended for use on my machines, and this is not a general-purpose
-- config. I don't provide support for anyone else's use cases, and if you
-- use this, expect breakages at any time, as I update my workflow. Thanks!
-- I do provide comments as to why I do what I do, but those may not be
-- updated to reflect my current workflow, as my real notes are in a
-- private repo. But I try to keep the comments up to date.
require('nvim-treesitter.configs').setup {
ensure_installed = {'org'},
highlight = {
enable = true,
disable = {'org'},
additional_vim_regex_highlighting = {'org'}
},
incremental_selection = {
enable = true
},
indent = {
enable = true
},
}

View file

@ -1,49 +0,0 @@
require('trouble').setup {
position = "bottom", -- position of the list can be: bottom, top, left, right
height = 10, -- height of the trouble list when position is top or bottom
width = 50, -- width of the list when position is left or right
icons = true, -- use devicons for filenames
mode = "workspace_diagnostics", -- "workspace_diagnostics", "document_diagnostics", "quickfix",
-- "lsp_references", "loclist"
fold_open = "", -- icon used for open folds
fold_closed = "", -- icon used for closed folds
group = true, -- group results by file
padding = true, -- add an extra new line on top of the list
action_keys = { -- key mappings for actions in the trouble list
-- map to {} to remove a mapping, for example:
-- close = {},
close = "q", -- close the list
cancel = "<esc>", -- cancel the preview and get back to your last window / buffer / cursor
refresh = "r", -- manually refresh
jump = {"<cr>", "<tab>"}, -- jump to the diagnostic or open / close folds
open_split = { "<c-x>" }, -- open buffer in new split
open_vsplit = { "<c-v>" }, -- open buffer in new vsplit
open_tab = { "<c-t>" }, -- open buffer in new tab
jump_close = {"o"}, -- jump to the diagnostic and close the list
toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode
toggle_preview = "P", -- toggle auto_preview
hover = "K", -- opens a small popup with the full multiline message
preview = "p", -- preview the diagnostic location
close_folds = {"zM", "zm"}, -- close all folds
open_folds = {"zR", "zr"}, -- open all folds
toggle_fold = {"zA", "za"}, -- toggle fold of current file
previous = "k", -- preview item
next = "j" -- next item
},
indent_lines = true, -- add an indent guide below the fold icons
auto_open = false, -- automatically open the list when you have diagnostics
auto_close = false, -- automatically close the list when you have no diagnostics
auto_preview = true, -- automatically preview the location of the diagnostic. <esc> to close preview and go back to
-- last window
auto_fold = false, -- automatically fold a file trouble list at creation
auto_jump = {"lsp_definitions"}, -- for the given modes, automatically jump if there is only a single result
signs = {
-- icons / text used for a diagnostic
error = "",
warning = "",
hint = "",
information = "",
other = ""
},
use_diagnostic_signs = false -- enabling this will use the signs defined in your lsp client
}

View file

@ -1,95 +0,0 @@
-- thehedgeh0g's neovim config.
-- This is intended for use on my machines, and this is not a general-purpose
-- config. I don't provide support for anyone else's use cases, and if you
-- use this, expect breakages at any time, as I update my workflow. Thanks!
-- I do provide comments as to why I do what I do, but those may not be
-- updated to reflect my current workflow, as my real notes are in a
-- private repo. But I try to keep the comments up to date.
-- Set some variables to make this less verbose
-- vim.g is global options
local g = vim.g
-- vim.o is general options
local o = vim.o
-- vim.wo is options that only affect the (w)indow
-- local wo = vim.wo
-- vim.bo is options that only affect the (b)uffer
-- local bo = vim.bo
-- Run Vim commands a bit more tersely
-- local cmd = vim.cmd
-- Set timeoutlen
g.timeoutlen = 50
-- Tab width 4.
o.tabstop = 4
o.shiftwidth = 4
o.expandtab = true
-- Set better colors
o.termguicolors = true
-- Set background colors
o.background = 'dark'
-- Show cursor position below each window
o.showmode = true
-- Autoindent
o.autoindent = true
-- The difference between these(above and below this) can be found here:
-- https://vi.stackexchange.com/questions/5818
-- Smart indent
o.smartindent = true
-- Autowrite buffers when leaving
o.autowriteall = true
-- Always write without asking
o.writeany = true
-- Reread files if they are modified outside of vim.
o.autoread = true
-- Set line numbering to relative
o.relativenumber = true
o.number = true
-- Set font
vim.cmd("set guifont=FiraCode\\ Nerd\\ Font\\ Mono:h14")
-- Disable some providers
g.loaded_ruby_provider = 0
g.loaded_perl_provider = 0
g.loaded_python_provider = 0
-- Disable all built-in vim plugins
g.loaded_gzip = 0
g.loaded_zip = 0
g.loaded_zipPlugin = 0
g.loaded_tar = 0
g.loaded_tarPlugin = 0
g.loaded_getscript = 0
g.loaded_getscriptPlugin = 0
g.loaded_vimball = 0
g.loaded_vimballPlugin = 0
g.loaded_2html_plugin = 0
g.loaded_matchit = 0
g.loaded_matchparen = 0
g.loaded_logiPat = 0
g.loaded_rrhelper = 0
g.loaded_netrw = 0
g.loaded_netrwPlugin = 0
g.loaded_netrwSettings = 0
g.loaded_netrwFileHandlers = 0
g.loaded_getscriptPlugin = 0
vim.cmd("au BufNewFile,BufReadPost *.md set filetype=markdown")
g.markdown_fenced_languages = {'nix', 'python'}

View file

@ -1,72 +0,0 @@
-- thehedgeh0g's neovim config.
-- This is intended for use on my machines, and this is not a general-purpose
-- config. I don't provide support for anyone else's use cases, and if you
-- use this, expect breakages at any time, as I update my workflow. Thanks!
-- I do provide comments as to why I do what I do, but those may not be
-- updated to reflect my current workflow, as my real notes are in a
-- private repo. But I try to keep the comments up to date.
-- Configuration for which-key.nvim.
require("which-key").setup {
plugins = {
marks = true, -- shows a list of your marks on ' and `
registers = true, -- shows your registers on " in NORMAL or <C-r> in INSERT mode
spelling = {
enabled = false, -- enabling this will show WhichKey when pressing z= to select spelling suggestions
suggestions = 20, -- how many suggestions should be shown in the list?
},
-- the presets plugin, adds help for a bunch of default keybindings in Neovim
-- No actual key bindings are created
presets = {
operators = true, -- adds help for operators like d, y, ... and registers them for motion / text object completion
motions = true, -- adds help for motions
text_objects = true, -- help for text objects triggered after entering an operator
windows = true, -- default bindings on <c-w>
nav = true, -- misc bindings to work with windows
z = true, -- bindings for folds, spelling and others prefixed with z
g = true, -- bindings for prefixed with g
},
},
-- add operators that will trigger motion and text object completion
-- to enable all native operators, set the preset / operators plugin above
operators = { gc = "Comments" },
key_labels = {
-- override the label used to display some keys. It doesn't effect WK in any other way.
-- For example:
["<space>"] = "SPC",
["<cr>"] = "RET",
["<tab>"] = "TAB",
},
icons = {
breadcrumb = "»", -- symbol used in the command line area that shows your active key combo
separator = "", -- symbol used between a key and it's label
group = "+", -- symbol prepended to a group
},
window = {
border = "single", -- none, single, double, shadow
position = "bottom", -- bottom, top
margin = { 1, 0, 1, 0 }, -- extra window margin [top, right, bottom, left]
padding = { 2, 2, 2, 2 }, -- extra window padding [top, right, bottom, left]
},
layout = {
height = { min = 4, max = 25 }, -- min and max height of the columns
width = { min = 20, max = 50 }, -- min and max width of the columns
spacing = 3, -- spacing between columns
align = "left", -- align columns left, center or right
},
ignore_missing = false, -- enable this to hide mappings for which you didn't specify a label
hidden = { "<silent>", "<cmd>", "<Cmd>", "<CR>", "call", "lua", "^:", "^ "}, -- hide mapping boilerplate
show_help = true, -- show help message on the command line when the popup is visible
triggers = "auto", -- automatically setup triggers
-- triggers = {"<leader>"} -- or specify a list manually
triggers_blacklist = {
-- list of mode / prefixes that should never be hooked by WhichKey
-- this is mostly relevant for key maps that start with a native binding
-- most people should not need to change this
i = { "j", "k" },
v = { "j", "k" },
},
}
require("which-key").register({}, {})

View file

@ -1,36 +0,0 @@
vim.cmd([[
packadd wilder.nvim
" let l:hl = wilder#make_hl('WilderAccent', 'Pmenu', [{}, {}, {'foreground': '#ff5555'}]),
call wilder#setup({
\ 'modes': [':', '/', '?'],
\ 'next_key': '<Tab>',
\ 'previous_key': '<S-Tab>',
\ 'accept_key': '<Down>',
\ 'reject_key': '<Up>',
\ })
call wilder#set_option('renderer', wilder#popupmenu_renderer(wilder#popupmenu_border_theme({
\ 'highlights': {
\ 'border': 'Normal',
\ 'accent': wilder#make_hl('WilderAccent', 'Pmenu', [{}, {}, {'foreground': '#ff5555'}]),
\ },
\ 'highlighter': wilder#lua_fzy_highlighter(),
\ 'border': 'rounded',
\ 'left': [
\ ' ', wilder#popupmenu_devicons(),
\ ],
\ 'empty_message': wilder#popupmenu_empty_message_with_spinner(),
\ })))
call wilder#set_option('pipeline', [
\ wilder#branch(
\ wilder#python_file_finder_pipeline({
\ 'file_command': ['rg', '--files', '-.'],
\ 'dir_command': ['fd', '-td'],
\ 'filters': ['fuzzy_filter', 'difflib_sorter'],
\ }),
\ wilder#cmdline_pipeline(),
\ wilder#python_search_pipeline(),
\ ),
\ ])
]])

View file

@ -1,11 +0,0 @@
require('xplr').setup({
ui = {
border = {
style = "single"
}
},
previewer = {
split = true,
}
})

View file

@ -1,21 +0,0 @@
local notify = require('notify')
notify.print_history = function()
local color = {
DEBUG = 'NotifyDEBUGTitle',
TRACE = 'NotifyTRACETitle',
INFO = 'NotifyINFOTitle',
WARN = 'NotifyWARNTitle',
ERROR = 'NotifyERRORTitle',
}
for _, m in ipairs(notify.history()) do
vim.api.nvim_echo({
{vim.fn.strftime('%FT%T', m.time), 'Identifier'},
{' ', 'Normal'},
{m.level, color[m.level] or 'Title'},
{' ', 'Normal'},
{table.concat(m.message, ' '), 'Normal'},
}, false, {})
end
end
vim.cmd([[command! Message :lua require'notify'.print_history()<CR>]])