Merge branch 'main' of github.com:ficcdaf/dotfiles
merging changes because autoyadm.sh was broken on dbox lol
This commit is contained in:
commit
8d2e4bf382
12 changed files with 61 additions and 215 deletions
|
@ -14,14 +14,14 @@ vim.api.nvim_create_autocmd("FileType", {
|
|||
cl.Group.new("@constant.builtin", cl.colors.complement)
|
||||
end,
|
||||
})
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "tex",
|
||||
callback = function()
|
||||
vim.cmd([[
|
||||
syntax match texMathSymbol "\\oplus" conceal cchar=⊕
|
||||
]])
|
||||
end,
|
||||
})
|
||||
-- vim.api.nvim_create_autocmd("FileType", {
|
||||
-- pattern = "tex",
|
||||
-- callback = function()
|
||||
-- vim.cmd([[
|
||||
-- syntax match texMathSymbol "\\oplus" conceal cchar=⊕
|
||||
-- ]])
|
||||
-- end,
|
||||
-- })
|
||||
-- This autocommand fixes syntax highlighting for inline math in markdown files
|
||||
-- Together with vimtex, it will apply very sexy good stuff here!
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
|
@ -31,26 +31,22 @@ vim.api.nvim_create_autocmd("FileType", {
|
|||
syn region mathBlock start=/\$\$/ end=/\$\$/ contains=@tex
|
||||
" inline math
|
||||
syn match mathInline '\$[^$].\{-}\$' contains=@tex
|
||||
" syn include @tex syntax/tex.vim
|
||||
" actually highlight the region we defined as "math"
|
||||
syn include @tex syntax/tex.vim
|
||||
hi def link mathBlock Statement
|
||||
hi def link mathInline Statement
|
||||
]])
|
||||
vim.g.vimtex_syntax_custom_cmds = vim.tbl_extend("force", vim.g.vimtex_syntax_custom_cmds or {}, {
|
||||
-- { name = "oplus", mathmode = 1, concealchar = "⊕" },
|
||||
{ name = "oplus", mathmode = 1, concealchar = "⊕" },
|
||||
})
|
||||
-- vim.g.vimtex_syntax_conceal = {
|
||||
-- math = 1,
|
||||
-- oplus = "⊕",
|
||||
-- }
|
||||
end,
|
||||
})
|
||||
vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||
pattern = { "markdown" },
|
||||
callback = function()
|
||||
vim.opt_local.breakindent = true
|
||||
-- We want markdown files to autosave
|
||||
vim.api.nvim_create_autocmd({ "InsertLeave", "TextChanged" }, {
|
||||
buffer = 0,
|
||||
command = "silent! write",
|
||||
})
|
||||
vim.opt_local.wrap = true
|
||||
vim.opt_local.spell = true
|
||||
-- local secondary = "#379393"
|
||||
|
|
|
@ -60,6 +60,9 @@ map({ "n" }, "<PageUp>", "<Up>zz", { remap = false })
|
|||
map({ "n", "x" }, "<M-i>", "$", { remap = false })
|
||||
map({ "n", "x" }, "<M-m>", "0", { remap = false })
|
||||
|
||||
-- easily access null register
|
||||
map({ "n", "x" }, "<leader>n", '"_', { remap = false, silent = true, desc = "Null Register" })
|
||||
|
||||
-- remove the default lazyvim, and also swap H and L (for move cursor) to make more sense on colemak
|
||||
vim.keymap.del({ "n" }, "<S-h>")
|
||||
vim.keymap.del({ "n" }, "<S-l>")
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
return {
|
||||
"echasnovski/mini.files",
|
||||
lazy = false,
|
||||
keys = {
|
||||
{
|
||||
"<leader>e",
|
||||
|
@ -9,14 +10,14 @@ return {
|
|||
desc = "Open mini.files (current file directory)",
|
||||
},
|
||||
{
|
||||
"<leader>E",
|
||||
"<leader>fm",
|
||||
function()
|
||||
require("mini.files").open(vim.uv.cwd(), true)
|
||||
end,
|
||||
desc = "Open mini.files (cwd)",
|
||||
},
|
||||
{
|
||||
"<leader>fm",
|
||||
"<leader>E",
|
||||
function()
|
||||
require("mini.files").open(LazyVim.root(), true)
|
||||
end,
|
||||
|
@ -24,10 +25,21 @@ return {
|
|||
},
|
||||
},
|
||||
opts = {
|
||||
content = {
|
||||
-- hide hidden files by default
|
||||
filter = function(fs_entry)
|
||||
return not vim.startswith(fs_entry.name, ".")
|
||||
end,
|
||||
},
|
||||
mappings = {
|
||||
go_in_plus = "<CR>",
|
||||
synchronize = ":w",
|
||||
-- go_out = "<BS>",
|
||||
-- reset = "-",
|
||||
},
|
||||
options = {
|
||||
permanent_delete = false,
|
||||
use_as_default_explorer = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,17 +1,37 @@
|
|||
local function mapPrefix(prefix, enabled)
|
||||
-- create the WK group for the prefix
|
||||
require("which-key").add({
|
||||
{ prefix, group = "+NoNeckPain" },
|
||||
})
|
||||
-- define the suffix mappings
|
||||
local mappings = {
|
||||
toggle = "p",
|
||||
toggleLeftSide = "ql",
|
||||
toggleRightSide = "qr",
|
||||
widthUp = "=",
|
||||
widthDown = "-",
|
||||
scratchPad = "s",
|
||||
}
|
||||
-- concat prefix and suffix
|
||||
for action, suffix in pairs(mappings) do
|
||||
mappings[action] = prefix .. suffix
|
||||
end
|
||||
-- include the enabled flag
|
||||
mappings.enabled = enabled
|
||||
return mappings
|
||||
end
|
||||
-- Ok, this plugin is really awesome!
|
||||
-- And everyone should know about it -- game changer!!!
|
||||
return {
|
||||
"shortcuts/no-neck-pain.nvim",
|
||||
version = "*",
|
||||
opts = function()
|
||||
require("which-key").add({
|
||||
{ "<leader>n", group = "+NoNeckPain" },
|
||||
})
|
||||
return {
|
||||
width = 120,
|
||||
mappings = {
|
||||
enabled = true,
|
||||
},
|
||||
mappings = mapPrefix("<leader>N", true),
|
||||
-- mappings = {
|
||||
-- enabled = true,
|
||||
-- },
|
||||
autocmds = {
|
||||
enableOnVimEnter = true,
|
||||
skipEnteringNoNeckPainBuffer = true,
|
||||
|
|
|
@ -3,7 +3,7 @@ return {
|
|||
---@module 'oil'
|
||||
---@type oil.SetupOpts
|
||||
opts = {
|
||||
default_file_explorer = true,
|
||||
default_file_explorer = false,
|
||||
delete_to_trash = true,
|
||||
columns = {
|
||||
"icon",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue