options and maps

This commit is contained in:
Christoph J. Scherr 2024-01-20 01:42:31 +01:00
parent c3b3363298
commit 84509df6a0
Signed by: PlexSheep
GPG Key ID: 7CDD0B14851A08EF
7 changed files with 470 additions and 101 deletions

1
.gitignore vendored
View File

@ -1,5 +1,4 @@
plugin
spell
ftplugin
syntax
coc-settings.json

View File

@ -1,6 +1,7 @@
local opt = vim.opt
local g = vim.g
g.maplocalleader = ";"
opt.foldmethod = "indent"
opt.foldnestmax = 10
opt.foldlevel = 4
@ -11,5 +12,124 @@ opt.wrap = false
opt.breakindent = false
opt.spell = true
opt.list = true
opt.timeout = true
opt.timeoutlen = 300 -- ms
opt.conceallevel = 2
opt.undofile = true
opt.undolevels = 10000
opt.writebackup = false
opt.history = 5000
opt.shada = { "'1000", "<50", "s10", "h" }
-- Tabs and Indents
-- ===
opt.textwidth = 80 -- Text width maximum chars before wrapping
opt.tabstop = 4 -- The number of spaces a tab is
opt.shiftwidth = 4 -- Number of spaces to use in auto(indent)
opt.smarttab = true -- Tab insert blanks according to 'shiftwidth'
opt.autoindent = true -- Use same indenting on new lines
opt.smartindent = true -- Smart autoindenting on new lines
opt.shiftround = true -- Round indent to multiple of 'shiftwidth'
-- Timing
-- ===
opt.ttimeout = true
opt.timeoutlen = 500 -- Time out on mappings
opt.ttimeoutlen = 10 -- Time out on key codes
opt.updatetime = 500 -- Idle time to write swap and trigger CursorHold
-- Searching
-- ===
opt.ignorecase = true -- Search ignoring case
opt.smartcase = true -- Keep case when searching with *
opt.infercase = true -- Adjust case in insert completion mode
opt.incsearch = true -- Incremental search
-- Formatting
-- ===
opt.wrap = false -- No wrap by default
opt.linebreak = true -- Break long lines at 'breakat'
opt.breakat = '\\ \\ ;:,!?' -- Long lines break chars
opt.startofline = false -- Cursor in same column for few commands
opt.splitbelow = true -- Splits open bottom right
opt.splitright = true
opt.breakindentopt = { shift = 2, min = 20 }
opt.formatoptions = "cqanlmBjp" -- see :h fo-table & :h formatoptions
-- Diff
-- ===
opt.diffopt:append({ 'iwhite', 'indent-heuristic', 'algorithm:patience' })
opt.wildmode = 'longest:full,full' -- Command-line completion mode
-- Editor UI
-- ===
opt.termguicolors = true
opt.shortmess = "xsTOInfFitloCaAs"
opt.showmode = true -- Show mode in cmd window
opt.scrolloff = 2 -- Keep at least n lines above/below
opt.sidescrolloff = 0 -- Keep at least n lines left/right
opt.numberwidth = 2 -- Minimum number of columns to use for the line number
opt.number = true -- Show line numbers
opt.ruler = false -- Default status ruler
opt.list = true -- Show hidden characters
if vim.g.started_by_firenvim == false then
opt.showtabline = 3 -- Always show the tabs line
opt.laststatus = 3 -- Always show laststatus
else
opt.showtabline = 1 -- Don't show tabline in firenvim, unless multitab
opt.laststatus = 3 -- Don't show laststatus in firenvim
end
opt.helpheight = 0 -- Disable help window resizing
opt.winwidth = 30 -- Minimum width for active window
opt.winminwidth = 1 -- Minimum width for inactive windows
opt.winheight = 1 -- Minimum height for active window
opt.winminheight = 1 -- Minimum height for inactive window
opt.showcmd = false -- show command in status line
opt.cmdheight = 0
opt.cmdwinheight = 5 -- Command-line lines
opt.equalalways = true -- Resize windows on split or close
opt.colorcolumn = '+0' -- Column highlight at textwidth's max character-limit
opt.cursorline = true
opt.cursorlineopt = { 'number', 'screenline' }
opt.pumheight = 10 -- Maximum number of items to show in the popup menu
opt.pumwidth = 10 -- Minimum width for the popup menu
opt.pumblend = 10 -- Popup blend
-- autocommands
-- ===
local function augroup(name)
return vim.api.nvim_create_augroup("plex_" .. name, {})
end
-- highlight on yank
vim.api.nvim_create_autocmd("TextYankPost", {
group = augroup "highlight_yank",
callback = function()
vim.highlight.on_yank()
end,
})
-- Disable conceallevel for specific file-types.
vim.api.nvim_create_autocmd('FileType', {
group = augroup('fix_conceallevel'),
pattern = { 'latex', 'tex' },
callback = function()
vim.opt_local.conceallevel = 0
end,
})
-- Resize splits if window got resized
vim.api.nvim_create_autocmd('VimResized', {
group = augroup('resize_splits'),
callback = function()
vim.cmd('wincmd =')
end,
})

View File

@ -6,36 +6,36 @@ M.disabled = {
["<C-a>"] = "",
["<C-s>"] = "",
["<C-c>"] = "",
["<leader>n"] = "",
["<leader>rn"] = "",
["<Up>"] = "",
["<Down>"] = "",
["<leader>x"] = "",
["<leader>/"] = "",
["<leader>ra"] = "",
["<LEADER>n"] = "",
["<LEADER>rn"] = "",
["<UP>"] = "",
["<DOWN>"] = "",
["<LEADER>x"] = "",
["<LEADER>/"] = "",
["<LEADER>ra"] = "",
["[d"] = "",
["]d"] = "",
["[c"] = "",
["]c"] = "",
["<leader>h"] = "",
["<leader>ff"] = "",
["<leader>fm"] = "",
["<leader>fa"] = "",
["<leader>fw"] = "",
["<leader>fb"] = "",
["<leader>fh"] = "",
["<leader>fo"] = "",
["<leader>fz"] = "",
["<leader>cm"] = "",
["<leader>gt"] = "",
["<leader>pt"] = "",
["<leader>th"] = "",
["<leader>ma"] = "",
["<leader>v"] = "",
["<leader>rh"] = "",
["<leader>ph"] = "",
["<leader>gb"] = "",
["<leader>td"] = "",
["<LEADER>h"] = "",
["<LEADER>ff"] = "",
["<LEADER>fm"] = "",
["<LEADER>fa"] = "",
["<LEADER>fw"] = "",
["<LEADER>fb"] = "",
["<LEADER>fh"] = "",
["<LEADER>fo"] = "",
["<LEADER>fz"] = "",
["<LEADER>cm"] = "",
["<LEADER>gt"] = "",
["<LEADER>pt"] = "",
["<LEADER>th"] = "",
["<LEADER>ma"] = "",
["<LEADER>v"] = "",
["<LEADER>rh"] = "",
["<LEADER>ph"] = "",
["<LEADER>gb"] = "",
["<LEADER>td"] = "",
["#"] = "",
["?"] = "",
},
@ -45,7 +45,7 @@ M.disabled = {
v = {
["#"] = "",
["?"] = "",
["<leader>/"] = "",
["<LEADER>/"] = "",
},
}
@ -54,7 +54,7 @@ M.tabufline = {
n = {
-- cycle through buffers
["<tab>"] = {
["<TAB>"] = {
function()
require("nvchad.tabufline").tabuflineNext()
end,
@ -83,7 +83,7 @@ M.comment = {
-- toggle comment in both modes
n = {
["<leader>v"] = {
["<LEADER>v"] = {
function()
require("Comment.api").toggle.linewise.current()
end,
@ -92,8 +92,8 @@ M.comment = {
},
v = {
["<leader>v"] = {
"<ESC><cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<CR>",
["<LEADER>v"] = {
"<ESC><CMD>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<CR>",
"Toggle comment",
},
},
@ -102,44 +102,44 @@ M.comment = {
M.leap = {
plugin = true,
n = {
["<leader>s"] = {
"<Plug>(leap-forward)",
["<LEADER>s"] = {
"<PLUG>(leap-forward)",
"leap forward",
},
["<leader>S"] = {
"<Plug>(leap-backward)",
["<LEADER>S"] = {
"<PLUG>(leap-backward)",
"leap backward",
},
["<leader>gs"] = {
"<Plug>(leap-from-window)",
["<LEADER>gs"] = {
"<PLUG>(leap-from-window)",
"leap from window",
},
},
x = {
["<leader>s"] = {
"<Plug>(leap-forward)",
["<LEADER>s"] = {
"<PLUG>(leap-forward)",
"leap forward",
},
["<leader>S"] = {
"<Plug>(leap-backward)",
["<LEADER>S"] = {
"<PLUG>(leap-backward)",
"leap forward",
},
["<leader>gs"] = {
"<Plug>(leap-from-window)",
["<LEADER>gs"] = {
"<PLUG>(leap-from-window)",
"leap from window",
},
},
o = {
["<leader>s"] = {
"<Plug>(leap-forward)",
["<LEADER>s"] = {
"<PLUG>(leap-forward)",
"leap forward",
},
["<leader>S"] = {
"<Plug>(leap-backward)",
["<LEADER>S"] = {
"<PLUG>(leap-backward)",
"leap forward",
},
["<leader>gs"] = {
"<Plug>(leap-from-window)",
["<LEADER>gs"] = {
"<PLUG>(leap-from-window)",
"leap from window",
},
},
@ -148,21 +148,21 @@ M.leap = {
M.lazygit = {
plugin = true,
n = {
["<leader>gg"] = { "<cmd> LazyGit <CR>", "Open LazyGit" },
["<LEADER>gg"] = { "<CMD> LazyGit <CR>", "Open LazyGit" },
},
}
M.lspconfig = {
plugin = true,
n = {
["[d"] = {
["<LEADER>ck"] = {
function()
vim.diagnostic.goto_prev { float = { border = "rounded" } }
end,
"Goto prev",
},
["<leader>cj"] = {
["<LEADER>cj"] = {
function()
vim.diagnostic.goto_next { float = { border = "rounded" } }
end,
@ -174,14 +174,14 @@ M.lspconfig = {
M.clipboard = {
plugin = false,
n = {
["<leader>y"] = { '"+y', "yank to system" },
["<leader>Y"] = { '"+Y', "yank to system" },
["<leader>yy"] = { '"+y', "yank to system" },
["<LEADER>y"] = { '"+y', "yank to system" },
["<LEADER>Y"] = { '"+Y', "yank to system" },
["<LEADER>yy"] = { '"+y', "yank to system" },
},
v = {
["<leader>y"] = { '"+y', "yank to system" },
["<leader>Y"] = { '"+Y', "yank to system" },
["<leader>yy"] = { '"+y', "yank to system" },
["<LEADER>y"] = { '"+y', "yank to system" },
["<LEADER>Y"] = { '"+Y', "yank to system" },
["<LEADER>yy"] = { '"+y', "yank to system" },
},
}
@ -189,25 +189,25 @@ M.telescope = {
plugin = true,
n = {
-- find
["<localleader>ff"] = { "<cmd> Telescope find_files <CR>", "Find files" },
["<localleader>fa"] = { "<cmd> Telescope find_files follow=true no_ignore=true hidden=true <CR>", "Find all" },
["<localleader>fw"] = { "<cmd> Telescope live_grep <CR>", "Live grep" },
["<localleader>fb"] = { "<cmd> Telescope buffers <CR>", "Find buffers" },
["<localleader>fh"] = { "<cmd> Telescope help_tags <CR>", "Help page" },
["<localleader>fo"] = { "<cmd> Telescope oldfiles <CR>", "Find oldfiles" },
["<localleader>fz"] = { "<cmd> Telescope current_buffer_fuzzy_find <CR>", "Find in current buffer" },
["<LOCALLEADER>ff"] = { "<CMD> Telescope find_files <CR>", "Find files" },
["<LOCALLEADER>fa"] = { "<CMD> Telescope find_files follow=true no_ignore=true hidden=true <CR>", "Find all" },
["<LOCALLEADER>fw"] = { "<CMD> Telescope live_grep <CR>", "Live grep" },
["<LOCALLEADER>fb"] = { "<CMD> Telescope buffers <CR>", "Find buffers" },
["<LOCALLEADER>fh"] = { "<CMD> Telescope help_tags <CR>", "Help page" },
["<LOCALLEADER>fo"] = { "<CMD> Telescope oldfiles <CR>", "Find oldfiles" },
["<LOCALLEADER>fz"] = { "<CMD> Telescope current_buffer_fuzzy_find <CR>", "Find in current buffer" },
-- git
["<localleader>cm"] = { "<cmd> Telescope git_commits <CR>", "Git commits" },
["<localleader>gt"] = { "<cmd> Telescope git_status <CR>", "Git status" },
["<LOCALLEADER>cm"] = { "<CMD> Telescope git_commits <CR>", "Git commits" },
["<LOCALLEADER>gt"] = { "<CMD> Telescope git_status <CR>", "Git status" },
-- pick a hidden term
["<localleader>pt"] = { "<cmd> Telescope terms <CR>", "Pick hidden term" },
["<LOCALLEADER>pt"] = { "<CMD> Telescope terms <CR>", "Pick hidden term" },
-- theme switcher
["<localleader>th"] = { "<cmd> Telescope themes <CR>", "Nvchad themes" },
["<LOCALLEADER>th"] = { "<CMD> Telescope themes <CR>", "Nvchad themes" },
["<localleader>ma"] = { "<cmd> Telescope marks <CR>", "telescope bookmarks" },
["<LOCALLEADER>ma"] = { "<CMD> Telescope marks <CR>", "telescope bookmarks" },
},
}
@ -239,11 +239,11 @@ M.nvimtree = {
plugin = true,
n = {
-- toggle
["<C-n>"] = { "<cmd> NvimTreeToggle <CR>", "Toggle nvimtree" },
["<F5>"] = { "<cmd> NvimTreeToggle <CR>", "Toggle nvimtree" },
["<C-n>"] = { "<CMD> NvimTreeToggle <CR>", "Toggle nvimtree" },
["<F5>"] = { "<CMD> NvimTreeToggle <CR>", "Toggle nvimtree" },
-- focus
["<localleader>e"] = { "<cmd> NvimTreeFocus <CR>", "Focus nvimtree" },
["<LOCALLEADER>e"] = { "<CMD> NvimTreeFocus <CR>", "Focus nvimtree" },
},
}
@ -256,13 +256,13 @@ M.movements = {
-- go to beginning and end
["<C-b>"] = { "<HOME>", "Beginning of line" },
["<C-e>"] = { "<End>", "End of line" },
["<C-e>"] = { "<END>", "End of line" },
-- navigate within insert mode
["<C-h>"] = { "<Left>", "Move left" },
["<C-l>"] = { "<Right>", "Move right" },
["<C-j>"] = { "<Down>", "Move down" },
["<C-k>"] = { "<Up>", "Move up" },
["<C-h>"] = { "<LEFT>", "Move left" },
["<C-l>"] = { "<RIGHT>", "Move right" },
["<C-j>"] = { "<DOWN>", "Move down" },
["<C-k>"] = { "<UP>", "Move up" },
},
n = {
--big move
@ -271,10 +271,14 @@ M.movements = {
-- go to beginning and end
["H"] = { "<HOME>", "Beginning of line" },
["L"] = { "<End>", "End of line" },
["L"] = { "<END>", "End of line" },
-- go to mark with "#"
["#"] = { "'", "go to mark" },
-- spell
["zn"] = { "]s", "go to next spelling mark"},
["zN"] = { "[s", "go to last spelling mark"},
},
v = {
--big move
@ -283,7 +287,7 @@ M.movements = {
-- go to beginning and end
["H"] = { "<HOME>", "Beginning of line" },
["L"] = { "<End>", "End of line" },
["L"] = { "<END>", "End of line" },
},
t = {
["<C-w>"] = {
@ -308,13 +312,13 @@ M.edit = {
},
-- do something useful with the arrows
["<Up>"] = { "<cmd> move-2<CR>", "Move line up", opts = { expr = true } },
["<Down>"] = { "<cmd> move+<CR>", "Move line down", opts = { expr = true } },
["<LEFT>"] = { "<cmd> << <CR>", "Less indentation", opts = { expr = true } },
["<RIGHT>"] = { "<cmd> >> <CR>", "More indentation", opts = { expr = true } },
["<UP>"] = { "<CMD> move-2<CR>", "Move line up", opts = { expr = true } },
["<DOWN>"] = { "<CMD> move+<CR>", "Move line down", opts = { expr = true } },
["<LEFT>"] = { "<CMD> << <CR>", "Less indentation", opts = { expr = true } },
["<RIGHT>"] = { "<CMD> >> <CR>", "More indentation", opts = { expr = true } },
-- format with conform
["<leader>ff"] = {
["<LEADER>ff"] = {
function()
require("conform").format()
end,
@ -322,7 +326,7 @@ M.edit = {
},
--
-- remove trailing whitespace
["<leader>fw"] = {
["<LEADER>fw"] = {
function()
require("mini.trailspace").trim()
end,
@ -334,8 +338,8 @@ M.edit = {
["<RIGHT>"] = { ">gv", "More indentation" },
},
x = {
["<Up>"] = { "move'<-2<CR>gv=gv", "Move line up", opts = { expr = true } },
["<Down>"] = { "move'<-2<CR>gv=gv", "Move line down", opts = { expr = true } },
["<UP>"] = { "move'<-2<CR>gv=gv", "Move line up", opts = { expr = true } },
["<DOWN>"] = { "move'<-2<CR>gv=gv", "Move line down", opts = { expr = true } },
},
t = {
--big move
@ -348,7 +352,7 @@ M.ui = {
plugin = false,
n = {
-- toggle wrap
["<leader>tw"] = {
["<LEADER>tw"] = {
function()
vim.opt_local.wrap = not vim.wo.wrap
vim.opt_local.breakindent = not vim.wo.breakindent
@ -363,19 +367,28 @@ M.ui = {
},
-- toggle some features
["<leader>tn"] = { "<cmd>setlocal nonumber!<CR>", "toggle line numbers" },
["<leader>trn"] = { "<cmd>setlocal nornu!<CR>", "toggle relative line numbers" },
["<leader>ts"] = { "<cmd>setlocal spell!<CR>", "toggle spell check" },
["<LEADER>tn"] = { "<CMD>setlocal nonumber!<CR>", "toggle line numbers" },
["<LEADER>trn"] = { "<CMD>setlocal nornu!<CR>", "toggle relative line numbers" },
["<LEADER>ts"] = { "<CMD>setlocal spell!<CR>", "toggle spell check" },
-- open windows
['<leader>"'] = { "<cmd>vsplit<CR>", "open a new window to the side" },
["<leader>%"] = { "<cmd>split<CR>", "open a new window on the totop" },
['<LEADER>"'] = { "<CMD>vsplit<CR>", "open a new window to the side" },
["<LEADER>%"] = { "<CMD>split<CR>", "open a new window on the totop" },
-- resize windows
["<C-Up>"] = { "<CMD>resize +1<CR>", "resize window" },
["<C-Down>"] = { "<CMD>resize -1<CR>", "resize window" },
["<C-Left>"] = { "<CMD>vertical resize +1<CR>", "resize window" },
["<C-Right>"] = { "<CMD>vertical resize -1<CR>", "resize window" },
-- tabs
["<leader>wtn"] = { "<cmd>tabnew<CR>", "open a new tab" },
["<leader>wtc"] = { "<cmd>tabclose<CR>", "close current tab" },
["<leader>wtj"] = { "<cmd>tabnext<CR>", "open a new tab" },
["<leader>wtk"] = { "<cmd>tabprevious<CR>", "open a new tab" },
["<LEADER>wtn"] = { "<CMD>tabnew<CR>", "open a new tab" },
["<LEADER>wtc"] = { "<CMD>tabclose<CR>", "close current tab" },
["<LEADER>wtj"] = { "<CMD>tabnext<CR>", "open a new tab" },
["<LEADER>wtk"] = { "<CMD>tabprevious<CR>", "open a new tab" },
-- folds
["<S-RETURN>"] = { "zMzv", "focus on this fold" },
},
}

BIN
spell/de.utf-8.spl Normal file

Binary file not shown.

BIN
spell/de.utf-8.sug Normal file

Binary file not shown.

237
spell/en.utf-8.add Normal file
View File

@ -0,0 +1,237 @@
#ifferent
Linter
Neorg
DevOps
NewTec
Mergetools
Quellrepository
gemerged
mergen
a
ccl
NTSG
a
Jira
ReqEng
cscherr
MD5
Hashchecker
Testvectors
#ossibilites
possibilites/!
Hexdumper
hexdumped
Atlassian
Initialkosten
Hexeditor
hexeditor
Hexdumping
stdin
md
regex101
#nglish
Manspider
Manspiders
subrace
subraces
swiftstride
beasthide
Eldeen
Khorvaire
drider
spiderful
spiderfew
Spiderfolk
Shrelluka
find/!
find
Magnam
arachna
matrem
namegen
Zessas
Webbington
Razu
Rhellu
cantrip
d12
d4
th
unnoteworthy
Qroczhreer
Blokhof
Hauck
spiderous
zlib
experimentelle
SHA
Etablierungs
the
strikethrough
RustBook
IEC62443
DHBW
gelinked
openssl
Yocto
gls
ECC
Kryptosystem
github
sfackler
mathmatics
www
sagemath
PlexSheep
plexcryptool
ECDSA
EdDSA
Stringverarbeitung
#onblocking
OOP
Fifo
serde
Deserialisierung
serde
Skripte
mathmatics
bbc
Kryptographischen/!
PyO3
#yo3
JSON
json
#yo3
Verifikationsmechanismus
projektinterne
Theoriephase
weise/!
Weise
merksam
Syscall
Enum
deu
JS
JS
getElementById
MDN
WebDocs
src
txt
ERRNO
vvvv
Rustonomicon
Rustdoc
paragraph
rustc
Klabnik
io
rustbook
Deserialize
deserialisierbaren
SIGTERM
Beendigungsabfrage
SIGKILL
stdout
stderr
Leveln
gedroppt
#ekonstruktor
Dekonstruktor/!
dealloziiert
Dealloziierung
Dealloziieren
vvvv
TODO
vvvv
Structs
nomicon
Wrapperklasse
tx
rx
struct
enum
priorisierbar
仕方がない
Gleichzeitigkeitsmechanismen
ServiceWrapper
Repräsentierung
Docstrings
Backends
dirs
MessageFrame
Addressor
init
Spektralgestalt
CTS
Addressor
Timestamp
str
BASEDIRECTORY
configs
fifo
PKI
secp384r1
Addressors
Keystore
Fifos
SBC
NTSecureCloudSolutions
newtec
loesungen
subfigure
Shield96
ATSAMA5D27
TrustZone
A5
ARMv7
eMMC
MT25QU0512BBB
ATECC608
Rückwärtskompatibilität
tls
opcua
texttt
rfcp
ssl
Lifecycle
v0
pyi
bietete
desc
Scherr
mariadb
Gawa
Django
opensource
Shader
shader
GLFW
shaders
GLSL
cpp
clangd
Hashtypen
Ver
vshot
oopsc
antlr
wir's
Naja
Vlam
UNE
Electionary
UNE's
recuse
hacky
config
Yubi
submodules
Curve25519
gpg
devops
lazygit
IDEs
hypervisors
QEMU
virt

BIN
spell/en.utf-8.add.spl Normal file

Binary file not shown.