local opt = vim.opt local g = vim.g vim.g.mapleader = ' ' vim.g.maplocalleader = ';' vim.g.python3_host_prog = '/usr/bin/python3' vim.o.mouse = 'a' -- mouse does annoying things for me if it's not 'a' vim.o.signcolumn = 'yes' vim.o.clipboard = '' -- don't just use the system clipboard vim.o.wrap = false vim.o.breakindent = false vim.o.spell = false vim.o.conceallevel = 2 vim.o.concealcursor = 'nc' vim.o.undofile = true vim.o.undolevels = 10000 vim.o.writebackup = false vim.o.history = 5000 vim.o.shada = { "'1000", '<50', 's10', 'h' } vim.g.syntax = true -- Tabs and Indents -- === vim.o.textwidth = 80 -- Text width maximum chars before wrapping vim.o.tabstop = 4 -- The number of spaces a tab is vim.o.shiftwidth = 4 -- Number of spaces to use in auto(indent) vim.o.smarttab = true -- Tab insert blanks according to 'shiftwidth' vim.o.autoindent = true -- Use same indenting on new lines vim.o.smartindent = true -- Smart autoindenting on new lines vim.o.shiftround = true -- Round indent to multiple of 'shiftwidth' -- Timing -- === vim.o.ttimeout = true vim.o.timeoutlen = 500 -- Time out on mappings vim.o.ttimeoutlen = 10 -- Time out on key codes vim.o.updatetime = 250 -- Idle time to write swap and trigger CursorHold -- Searching -- === vim.o.ignorecase = true -- Search ignoring case vim.o.smartcase = true -- Keep case when searching with * vim.o.infercase = true -- Adjust case in insert completion mode vim.o.incsearch = true -- Incremental search vim.opt.hlsearch = true -- highlight searched stuff -- Formatting -- === vim.o.wrap = false -- No wrap by default vim.o.linebreak = true -- Break long lines at 'breakat' vim.o.breakat = '\\ \\ ;:,!?' -- Long lines break chars vim.o.startofline = false -- Cursor in same column for few commands vim.o.splitbelow = true -- Splits open bottom right vim.o.splitright = true vim.o.breakindentopt = { shift = 2, min = 20 } vim.o.formatoptions = '' -- see :h fo-table & :h formatoptions vim.opt.breakindent = true -- Diff -- === vim.o.diffopt:append { 'iwhite', 'indent-heuristic', 'algorithm:patience' } vim.o.wildmode = 'longest:full,full' -- Command-line completion mode -- Folds -- === vim.o.foldlevel = 10 -- start with all folds open -- Editor UI -- === vim.o.guifont = 'FiraCode Nerd Font:h15' vim.o.termguicolors = true vim.o.shortmess = 'xsTOInfFitloCaAs' vim.o.showmode = true -- Show mode in cmd window vim.o.scrolloff = 10 -- Keep at least n lines above/below vim.o.sidescrolloff = 10 -- Keep at least n lines left/right vim.o.numberwidth = 2 -- Minimum number of columns to use for the line number vim.o.number = true -- Show line numbers vim.o.relativenumber = true -- Show relative line numbers vim.o.ruler = true -- Default status ruler vim.o.showtabline = 1 -- Don't change this, goes back to a vanilla vim default vim.o.laststatus = 3 -- Always show laststatus -- Sets how neovim will display certain whitespace characters in the editor. -- See `:help 'list'` -- and `:help 'listchars'` vim.opt.list = true vim.opt.listchars = { tab = 'ยป ', trail = 'ยท', nbsp = 'โฃ' } if vim.g.started_by_firenvim == true then opt.showtabline = 1 -- Don't show tabline in firenvim, unless multitab opt.laststatus = 1 -- Don't show laststatus in firenvim opt.wrap = true end -- Preview substitutions live, as you type! vim.opt.inccommand = 'split' if vim.g.neovide == true then -- fulscreen with F11 vim.api.nvim_set_keymap('n', '', ':let g:neovide_fullscreen = !g:neovide_fullscreen', {}) vim.g.neovide_underline_automatic_scaling = true -- vim.g.neovide_floating_blur_amount_x = 2.0 -- vim.g.neovide_floating_blur_amount_y = 2.0 vim.g.neovide_scroll_animation_length = 0.1 -- vim.g.neovide_cursor_animation_length = 0 -- vim.g.neovide_cursor_trail_size = 0 vim.g.neovide_hide_mouse_when_typing = true vim.g.neovide_fullscreen = true end vim.o.helpheight = 0 -- Disable help window resizing vim.o.winwidth = 30 -- Minimum width for active window vim.o.winminwidth = 1 -- Minimum width for inactive windows vim.o.winheight = 1 -- Minimum height for active window vim.o.winminheight = 1 -- Minimum height for inactive window vim.o.showcmd = false -- show command in status line vim.o.cmdheight = 0 vim.o.cmdwinheight = 5 -- Command-line lines vim.o.equalalways = true -- Resize windows on split or close vim.o.colorcolumn = '80' -- Column highlight at textwidth's max character-limit vim.o.cursorline = true vim.o.cursorlineopt = { 'number', 'screenline' } vim.o.pumheight = 10 -- Maximum number of items to show in the popup menu vim.o.pumwidth = 10 -- Minimum width for the popup menu vim.o.pumblend = 10 -- Popup blend -- Spelling correction -- === vim.o.spell = false -- manually enable spell with `set spell` or `ts` vim.o.spelllang = 'en,de_de,' vim.o.spellsuggest = 'double,50,timeout:5000' -- autocommands -- === local function augroup(name) return vim.api.nvim_create_augroup('plex_' .. name, {}) end -- [[ Basic Keymaps ]] -- See `:help vim.keymap.set()` -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` -- Highlight when yanking (copying) text -- Try it with `yap` in normal mode -- See `:help vim.highlight.on_yank()` vim.api.nvim_create_autocmd('TextYankPost', { desc = 'Highlight when yanking (copying) text', group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }), callback = function() vim.highlight.on_yank() end, }) -- [[ Install `lazy.nvim` plugin manager ]] -- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim' if not vim.loop.fs_stat(lazypath) then local lazyrepo = 'https://github.com/folke/lazy.nvim.git' vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath } end ---@diagnostic disable-next-line: undefined-field vim.opt.rtp:prepend(lazypath) require 'custom.maps' require 'custom.autocmds' require('lazy').setup({ { import = 'custom.plugins' }, }, { ui = { -- If you are using a Nerd Font: set icons to an empty table which will use the -- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table icons = vim.g.have_nerd_font and {} or { cmd = 'โŒ˜', config = '๐Ÿ› ', event = '๐Ÿ“…', ft = '๐Ÿ“‚', init = 'โš™', keys = '๐Ÿ—', plugin = '๐Ÿ”Œ', runtime = '๐Ÿ’ป', require = '๐ŸŒ™', source = '๐Ÿ“„', start = '๐Ÿš€', task = '๐Ÿ“Œ', lazy = '๐Ÿ’ค ', }, }, }) require 'kickstart.health' -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et