change style in init

This commit is contained in:
Christoph J. Scherr 2024-07-08 11:12:40 +02:00
parent ed0bd3cc06
commit 0b52884aa7
1 changed files with 68 additions and 71 deletions

139
init.lua
View File

@ -1,89 +1,86 @@
local opt = vim.opt
local g = vim.g
vim.g.mapleader = ' ' vim.g.mapleader = ' '
vim.g.maplocalleader = ';' vim.g.maplocalleader = ';'
vim.g.python3_host_prog = '/usr/bin/python3' vim.g.python3_host_prog = '/usr/bin/python3'
vim.o.mouse = 'a' -- mouse does annoying things for me if it's not 'a' vim.opt.mouse = 'a' -- mouse does annoying things for me if it's not 'a'
vim.o.signcolumn = 'yes' vim.opt.signcolumn = 'yes'
vim.o.clipboard = '' -- don't just use the system clipboard vim.opt.clipboard = '' -- don't just use the system clipboard
vim.o.wrap = false vim.opt.wrap = false
vim.o.breakindent = false vim.opt.breakindent = false
vim.o.spell = false vim.opt.spell = false
vim.o.conceallevel = 2 vim.opt.conceallevel = 2
vim.o.concealcursor = 'nc' vim.opt.concealcursor = 'nc'
vim.o.undofile = true vim.opt.undofile = true
vim.o.undolevels = 10000 vim.opt.undolevels = 10000
vim.o.writebackup = false vim.opt.writebackup = false
vim.o.history = 5000 vim.opt.history = 5000
vim.o.shada = { "'1000", '<50', 's10', 'h' } vim.opt.shada = { "'1000", '<50', 's10', 'h' }
vim.g.syntax = true vim.g.syntax = true
-- Tabs and Indents -- Tabs and Indents
-- === -- ===
vim.o.textwidth = 80 -- Text width maximum chars before wrapping vim.opt.textwidth = 80 -- Text width maximum chars before wrapping
vim.o.tabstop = 4 -- The number of spaces a tab is vim.opt.tabstop = 4 -- The number of spaces a tab is
vim.o.shiftwidth = 4 -- Number of spaces to use in auto(indent) vim.opt.shiftwidth = 4 -- Number of spaces to use in auto(indent)
vim.o.smarttab = true -- Tab insert blanks according to 'shiftwidth' vim.opt.smarttab = true -- Tab insert blanks according to 'shiftwidth'
vim.o.autoindent = true -- Use same indenting on new lines vim.opt.autoindent = true -- Use same indenting on new lines
vim.o.smartindent = true -- Smart autoindenting on new lines vim.opt.smartindent = true -- Smart autoindenting on new lines
vim.o.shiftround = true -- Round indent to multiple of 'shiftwidth' vim.opt.shiftround = true -- Round indent to multiple of 'shiftwidth'
-- Timing -- Timing
-- === -- ===
vim.o.ttimeout = true vim.opt.ttimeout = true
vim.o.timeoutlen = 500 -- Time out on mappings vim.opt.timeoutlen = 500 -- Time out on mappings
vim.o.ttimeoutlen = 10 -- Time out on key codes vim.opt.ttimeoutlen = 10 -- Time out on key codes
vim.o.updatetime = 250 -- Idle time to write swap and trigger CursorHold vim.opt.updatetime = 250 -- Idle time to write swap and trigger CursorHold
-- Searching -- Searching
-- === -- ===
vim.o.ignorecase = true -- Search ignoring case vim.opt.ignorecase = true -- Search ignoring case
vim.o.smartcase = true -- Keep case when searching with * vim.opt.smartcase = true -- Keep case when searching with *
vim.o.infercase = true -- Adjust case in insert completion mode vim.opt.infercase = true -- Adjust case in insert completion mode
vim.o.incsearch = true -- Incremental search vim.opt.incsearch = true -- Incremental search
vim.opt.hlsearch = true -- highlight searched stuff vim.opt.hlsearch = true -- highlight searched stuff
-- Formatting -- Formatting
-- === -- ===
vim.o.wrap = false -- No wrap by default vim.opt.wrap = false -- No wrap by default
vim.o.linebreak = true -- Break long lines at 'breakat' vim.opt.linebreak = true -- Break long lines at 'breakat'
vim.o.breakat = '\\ \\ ;:,!?' -- Long lines break chars vim.opt.breakat = '\\ \\ ;:,!?' -- Long lines break chars
vim.o.startofline = false -- Cursor in same column for few commands vim.opt.startofline = false -- Cursor in same column for few commands
vim.o.splitbelow = true -- Splits open bottom right vim.opt.splitbelow = true -- Splits open bottom right
vim.o.splitright = true vim.opt.splitright = true
vim.o.breakindentopt = { shift = 2, min = 20 } vim.opt.breakindentopt = { shift = 2, min = 20 }
vim.o.formatoptions = '' -- see :h fo-table & :h formatoptions vim.opt.formatoptions = '' -- see :h fo-table & :h formatoptions
vim.opt.breakindent = true vim.opt.breakindent = true
-- Diff -- Diff
-- === -- ===
vim.o.diffopt:append { 'iwhite', 'indent-heuristic', 'algorithm:patience' } vim.opt.diffopt:append { 'iwhite', 'indent-heuristic', 'algorithm:patience' }
vim.o.wildmode = 'longest:full,full' -- Command-line completion mode vim.opt.wildmode = 'longest:full,full' -- Command-line completion mode
-- Folds -- Folds
-- === -- ===
vim.o.foldlevel = 10 -- start with all folds open vim.opt.foldlevel = 10 -- start with all folds open
-- Editor UI -- Editor UI
-- === -- ===
vim.o.guifont = 'FiraCode Nerd Font:h15' vim.o.guifont = 'FiraCode Nerd Font:h15'
vim.o.termguicolors = true vim.opt.termguicolors = true
vim.o.shortmess = 'xsTOInfFitloCaAs' vim.opt.shortmess = 'xsTOInfFitloCaAs'
vim.o.showmode = true -- Show mode in cmd window vim.opt.showmode = true -- Show mode in cmd window
vim.o.scrolloff = 10 -- Keep at least n lines above/below vim.opt.scrolloff = 10 -- Keep at least n lines above/below
vim.o.sidescrolloff = 10 -- Keep at least n lines left/right vim.opt.sidescrolloff = 10 -- Keep at least n lines left/right
vim.o.numberwidth = 2 -- Minimum number of columns to use for the line number vim.opt.numberwidth = 2 -- Minimum number of columns to use for the line number
vim.o.number = true -- Show line numbers vim.opt.number = true -- Show line numbers
vim.o.relativenumber = true -- Show relative line numbers vim.opt.relativenumber = true -- Show relative line numbers
vim.o.ruler = true -- Default status ruler vim.opt.ruler = true -- Default status ruler
vim.o.showtabline = 1 -- Don't change this, goes back to a vanilla vim default vim.opt.showtabline = 1 -- Don't change this, goes back to a vanilla vim default
vim.o.laststatus = 3 -- Always show laststatus vim.opt.laststatus = 3 -- Always show laststatus
-- Sets how neovim will display certain whitespace characters in the editor. -- Sets how neovim will display certain whitespace characters in the editor.
-- See `:help 'list'` -- See `:help 'list'`
@ -117,31 +114,31 @@ if vim.g.neovide == true then
vim.g.neovide_fullscreen = true vim.g.neovide_fullscreen = true
end end
vim.o.helpheight = 0 -- Disable help window resizing vim.opt.helpheight = 0 -- Disable help window resizing
vim.o.winwidth = 30 -- Minimum width for active window vim.opt.winwidth = 30 -- Minimum width for active window
vim.o.winminwidth = 1 -- Minimum width for inactive windows vim.opt.winminwidth = 1 -- Minimum width for inactive windows
vim.o.winheight = 1 -- Minimum height for active window vim.opt.winheight = 1 -- Minimum height for active window
vim.o.winminheight = 1 -- Minimum height for inactive window vim.opt.winminheight = 1 -- Minimum height for inactive window
vim.o.showcmd = false -- show command in status line vim.opt.showcmd = false -- show command in status line
vim.o.cmdheight = 0 vim.opt.cmdheight = 0
vim.o.cmdwinheight = 5 -- Command-line lines vim.opt.cmdwinheight = 5 -- Command-line lines
vim.o.equalalways = true -- Resize windows on split or close vim.opt.equalalways = true -- Resize windows on split or close
vim.o.colorcolumn = '80' -- Column highlight at textwidth's max character-limit vim.opt.colorcolumn = '80' -- Column highlight at textwidth's max character-limit
vim.o.cursorline = true vim.opt.cursorline = true
vim.o.cursorlineopt = { 'number', 'screenline' } vim.opt.cursorlineopt = { 'number', 'screenline' }
vim.o.pumheight = 10 -- Maximum number of items to show in the popup menu vim.opt.pumheight = 10 -- Maximum number of items to show in the popup menu
vim.o.pumwidth = 10 -- Minimum width for the popup menu vim.opt.pumwidth = 10 -- Minimum width for the popup menu
vim.o.pumblend = 10 -- Popup blend vim.opt.pumblend = 10 -- Popup blend
-- Spelling correction -- Spelling correction
-- === -- ===
vim.o.spell = false -- manually enable spell with `set spell` or `<leader>ts` vim.opt.spell = false -- manually enable spell with `set spell` or `<leader>ts`
vim.o.spelllang = 'en,de_de,' vim.opt.spelllang = 'en,de_de,'
vim.o.spellsuggest = 'double,50,timeout:5000' vim.opt.spellsuggest = 'double,50,timeout:5000'
-- autocommands -- autocommands
-- === -- ===