diff --git a/.gitignore b/.gitignore index 5cbe558..0cc9af9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ plugin -spell ftplugin syntax coc-settings.json diff --git a/lua/custom/init.lua b/lua/custom/init.lua index 407a21b..f6177c7 100644 --- a/lua/custom/init.lua +++ b/lua/custom/init.lua @@ -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, +}) + diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index 718c775..c1b3b8d 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -6,36 +6,36 @@ M.disabled = { [""] = "", [""] = "", [""] = "", - ["n"] = "", - ["rn"] = "", - [""] = "", - [""] = "", - ["x"] = "", - ["/"] = "", - ["ra"] = "", + ["n"] = "", + ["rn"] = "", + [""] = "", + [""] = "", + ["x"] = "", + ["/"] = "", + ["ra"] = "", ["[d"] = "", ["]d"] = "", ["[c"] = "", ["]c"] = "", - ["h"] = "", - ["ff"] = "", - ["fm"] = "", - ["fa"] = "", - ["fw"] = "", - ["fb"] = "", - ["fh"] = "", - ["fo"] = "", - ["fz"] = "", - ["cm"] = "", - ["gt"] = "", - ["pt"] = "", - ["th"] = "", - ["ma"] = "", - ["v"] = "", - ["rh"] = "", - ["ph"] = "", - ["gb"] = "", - ["td"] = "", + ["h"] = "", + ["ff"] = "", + ["fm"] = "", + ["fa"] = "", + ["fw"] = "", + ["fb"] = "", + ["fh"] = "", + ["fo"] = "", + ["fz"] = "", + ["cm"] = "", + ["gt"] = "", + ["pt"] = "", + ["th"] = "", + ["ma"] = "", + ["v"] = "", + ["rh"] = "", + ["ph"] = "", + ["gb"] = "", + ["td"] = "", ["#"] = "", ["?"] = "", }, @@ -45,7 +45,7 @@ M.disabled = { v = { ["#"] = "", ["?"] = "", - ["/"] = "", + ["/"] = "", }, } @@ -54,7 +54,7 @@ M.tabufline = { n = { -- cycle through buffers - [""] = { + [""] = { function() require("nvchad.tabufline").tabuflineNext() end, @@ -83,7 +83,7 @@ M.comment = { -- toggle comment in both modes n = { - ["v"] = { + ["v"] = { function() require("Comment.api").toggle.linewise.current() end, @@ -92,8 +92,8 @@ M.comment = { }, v = { - ["v"] = { - "lua require('Comment.api').toggle.linewise(vim.fn.visualmode())", + ["v"] = { + "lua require('Comment.api').toggle.linewise(vim.fn.visualmode())", "Toggle comment", }, }, @@ -102,44 +102,44 @@ M.comment = { M.leap = { plugin = true, n = { - ["s"] = { - "(leap-forward)", + ["s"] = { + "(leap-forward)", "leap forward", }, - ["S"] = { - "(leap-backward)", + ["S"] = { + "(leap-backward)", "leap backward", }, - ["gs"] = { - "(leap-from-window)", + ["gs"] = { + "(leap-from-window)", "leap from window", }, }, x = { - ["s"] = { - "(leap-forward)", + ["s"] = { + "(leap-forward)", "leap forward", }, - ["S"] = { - "(leap-backward)", + ["S"] = { + "(leap-backward)", "leap forward", }, - ["gs"] = { - "(leap-from-window)", + ["gs"] = { + "(leap-from-window)", "leap from window", }, }, o = { - ["s"] = { - "(leap-forward)", + ["s"] = { + "(leap-forward)", "leap forward", }, - ["S"] = { - "(leap-backward)", + ["S"] = { + "(leap-backward)", "leap forward", }, - ["gs"] = { - "(leap-from-window)", + ["gs"] = { + "(leap-from-window)", "leap from window", }, }, @@ -148,21 +148,21 @@ M.leap = { M.lazygit = { plugin = true, n = { - ["gg"] = { " LazyGit ", "Open LazyGit" }, + ["gg"] = { " LazyGit ", "Open LazyGit" }, }, } M.lspconfig = { plugin = true, n = { - ["[d"] = { + ["ck"] = { function() vim.diagnostic.goto_prev { float = { border = "rounded" } } end, "Goto prev", }, - ["cj"] = { + ["cj"] = { function() vim.diagnostic.goto_next { float = { border = "rounded" } } end, @@ -174,14 +174,14 @@ M.lspconfig = { M.clipboard = { plugin = false, n = { - ["y"] = { '"+y', "yank to system" }, - ["Y"] = { '"+Y', "yank to system" }, - ["yy"] = { '"+y', "yank to system" }, + ["y"] = { '"+y', "yank to system" }, + ["Y"] = { '"+Y', "yank to system" }, + ["yy"] = { '"+y', "yank to system" }, }, v = { - ["y"] = { '"+y', "yank to system" }, - ["Y"] = { '"+Y', "yank to system" }, - ["yy"] = { '"+y', "yank to system" }, + ["y"] = { '"+y', "yank to system" }, + ["Y"] = { '"+Y', "yank to system" }, + ["yy"] = { '"+y', "yank to system" }, }, } @@ -189,25 +189,25 @@ M.telescope = { plugin = true, n = { -- find - ["ff"] = { " Telescope find_files ", "Find files" }, - ["fa"] = { " Telescope find_files follow=true no_ignore=true hidden=true ", "Find all" }, - ["fw"] = { " Telescope live_grep ", "Live grep" }, - ["fb"] = { " Telescope buffers ", "Find buffers" }, - ["fh"] = { " Telescope help_tags ", "Help page" }, - ["fo"] = { " Telescope oldfiles ", "Find oldfiles" }, - ["fz"] = { " Telescope current_buffer_fuzzy_find ", "Find in current buffer" }, + ["ff"] = { " Telescope find_files ", "Find files" }, + ["fa"] = { " Telescope find_files follow=true no_ignore=true hidden=true ", "Find all" }, + ["fw"] = { " Telescope live_grep ", "Live grep" }, + ["fb"] = { " Telescope buffers ", "Find buffers" }, + ["fh"] = { " Telescope help_tags ", "Help page" }, + ["fo"] = { " Telescope oldfiles ", "Find oldfiles" }, + ["fz"] = { " Telescope current_buffer_fuzzy_find ", "Find in current buffer" }, -- git - ["cm"] = { " Telescope git_commits ", "Git commits" }, - ["gt"] = { " Telescope git_status ", "Git status" }, + ["cm"] = { " Telescope git_commits ", "Git commits" }, + ["gt"] = { " Telescope git_status ", "Git status" }, -- pick a hidden term - ["pt"] = { " Telescope terms ", "Pick hidden term" }, + ["pt"] = { " Telescope terms ", "Pick hidden term" }, -- theme switcher - ["th"] = { " Telescope themes ", "Nvchad themes" }, + ["th"] = { " Telescope themes ", "Nvchad themes" }, - ["ma"] = { " Telescope marks ", "telescope bookmarks" }, + ["ma"] = { " Telescope marks ", "telescope bookmarks" }, }, } @@ -239,11 +239,11 @@ M.nvimtree = { plugin = true, n = { -- toggle - [""] = { " NvimTreeToggle ", "Toggle nvimtree" }, - [""] = { " NvimTreeToggle ", "Toggle nvimtree" }, + [""] = { " NvimTreeToggle ", "Toggle nvimtree" }, + [""] = { " NvimTreeToggle ", "Toggle nvimtree" }, -- focus - ["e"] = { " NvimTreeFocus ", "Focus nvimtree" }, + ["e"] = { " NvimTreeFocus ", "Focus nvimtree" }, }, } @@ -256,13 +256,13 @@ M.movements = { -- go to beginning and end [""] = { "", "Beginning of line" }, - [""] = { "", "End of line" }, + [""] = { "", "End of line" }, -- navigate within insert mode - [""] = { "", "Move left" }, - [""] = { "", "Move right" }, - [""] = { "", "Move down" }, - [""] = { "", "Move up" }, + [""] = { "", "Move left" }, + [""] = { "", "Move right" }, + [""] = { "", "Move down" }, + [""] = { "", "Move up" }, }, n = { --big move @@ -271,10 +271,14 @@ M.movements = { -- go to beginning and end ["H"] = { "", "Beginning of line" }, - ["L"] = { "", "End of line" }, + ["L"] = { "", "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"] = { "", "Beginning of line" }, - ["L"] = { "", "End of line" }, + ["L"] = { "", "End of line" }, }, t = { [""] = { @@ -308,13 +312,13 @@ M.edit = { }, -- do something useful with the arrows - [""] = { " move-2", "Move line up", opts = { expr = true } }, - [""] = { " move+", "Move line down", opts = { expr = true } }, - [""] = { " << ", "Less indentation", opts = { expr = true } }, - [""] = { " >> ", "More indentation", opts = { expr = true } }, + [""] = { " move-2", "Move line up", opts = { expr = true } }, + [""] = { " move+", "Move line down", opts = { expr = true } }, + [""] = { " << ", "Less indentation", opts = { expr = true } }, + [""] = { " >> ", "More indentation", opts = { expr = true } }, -- format with conform - ["ff"] = { + ["ff"] = { function() require("conform").format() end, @@ -322,7 +326,7 @@ M.edit = { }, -- -- remove trailing whitespace - ["fw"] = { + ["fw"] = { function() require("mini.trailspace").trim() end, @@ -334,8 +338,8 @@ M.edit = { [""] = { ">gv", "More indentation" }, }, x = { - [""] = { "move'<-2gv=gv", "Move line up", opts = { expr = true } }, - [""] = { "move'<-2gv=gv", "Move line down", opts = { expr = true } }, + [""] = { "move'<-2gv=gv", "Move line up", opts = { expr = true } }, + [""] = { "move'<-2gv=gv", "Move line down", opts = { expr = true } }, }, t = { --big move @@ -348,7 +352,7 @@ M.ui = { plugin = false, n = { -- toggle wrap - ["tw"] = { + ["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 - ["tn"] = { "setlocal nonumber!", "toggle line numbers" }, - ["trn"] = { "setlocal nornu!", "toggle relative line numbers" }, - ["ts"] = { "setlocal spell!", "toggle spell check" }, + ["tn"] = { "setlocal nonumber!", "toggle line numbers" }, + ["trn"] = { "setlocal nornu!", "toggle relative line numbers" }, + ["ts"] = { "setlocal spell!", "toggle spell check" }, -- open windows - ['"'] = { "vsplit", "open a new window to the side" }, - ["%"] = { "split", "open a new window on the totop" }, + ['"'] = { "vsplit", "open a new window to the side" }, + ["%"] = { "split", "open a new window on the totop" }, + + -- resize windows + [""] = { "resize +1", "resize window" }, + [""] = { "resize -1", "resize window" }, + [""] = { "vertical resize +1", "resize window" }, + [""] = { "vertical resize -1", "resize window" }, -- tabs - ["wtn"] = { "tabnew", "open a new tab" }, - ["wtc"] = { "tabclose", "close current tab" }, - ["wtj"] = { "tabnext", "open a new tab" }, - ["wtk"] = { "tabprevious", "open a new tab" }, + ["wtn"] = { "tabnew", "open a new tab" }, + ["wtc"] = { "tabclose", "close current tab" }, + ["wtj"] = { "tabnext", "open a new tab" }, + ["wtk"] = { "tabprevious", "open a new tab" }, + + -- folds + [""] = { "zMzv", "focus on this fold" }, }, } diff --git a/spell/de.utf-8.spl b/spell/de.utf-8.spl new file mode 100644 index 0000000..37cbbca Binary files /dev/null and b/spell/de.utf-8.spl differ diff --git a/spell/de.utf-8.sug b/spell/de.utf-8.sug new file mode 100644 index 0000000..13ff0a3 Binary files /dev/null and b/spell/de.utf-8.sug differ diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add new file mode 100644 index 0000000..313c823 --- /dev/null +++ b/spell/en.utf-8.add @@ -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 diff --git a/spell/en.utf-8.add.spl b/spell/en.utf-8.add.spl new file mode 100644 index 0000000..7577e2e Binary files /dev/null and b/spell/en.utf-8.add.spl differ