Fully port over options from vim config
This commit is contained in:
parent
9d7afda967
commit
153b9a0843
@ -1,36 +1,101 @@
|
|||||||
|
-- Disable unused language providers
|
||||||
|
vim.g.loaded_node_provider = 0
|
||||||
|
vim.g.loaded_perl_provider = 0
|
||||||
|
vim.g.loaded_ruby_provider = 0
|
||||||
|
|
||||||
|
-- Keep cursor from buffer edges
|
||||||
|
vim.opt.sidescrolloff = 5
|
||||||
|
|
||||||
|
-- Enable visually highlighting listchars
|
||||||
|
vim.opt.list = true
|
||||||
|
-- Customize the listchars display strings
|
||||||
|
-- nbsp: Circled Reverse Solidus (U+29B8, utf-8: E2 A6 B8)
|
||||||
|
-- trail: Middle Dot (U+00B7, utf-8: C2 B7)
|
||||||
|
-- tab: White Right-Pointing Small Triangle (U+25B9, utf-8: E2 96 B9)
|
||||||
|
-- Box Drawings Light Triple Dash Horizontal (U+2504, utf-8: E2 94 84)
|
||||||
|
-- extends: Right-Pointing Double Angle Quotation Mark (U+00BB, utf-8: C2 BB)
|
||||||
|
-- precedes: Left-Pointing Double Angle Quotation Mark (U+00AB, utf-8: C2 AB)
|
||||||
|
vim.opt.listchars = 'nbsp:⦸,trail:·,tab:▹┄,extends:»,precedes:«'
|
||||||
|
|
||||||
|
-- Wrap lines which are longer than screen width
|
||||||
|
vim.opt.wrap = true
|
||||||
|
-- Break wrapped lines at a character in breakat
|
||||||
|
vim.opt.linebreak = true
|
||||||
|
-- Downwards Arrow With Tip Rightwards (U+21B3, utf-8: E2 86 B3)
|
||||||
|
vim.opt.showbreak = '↳ '
|
||||||
|
|
||||||
|
-- TODO: spellcapcheck
|
||||||
|
-- TODO: virtualedit=block
|
||||||
|
-- TODO: whichwrap=b,h,l,s,<,>,[,],~
|
||||||
|
|
||||||
|
-- Don't show completeopt preview buffer
|
||||||
|
vim.opt.completeopt = 'menu'
|
||||||
|
|
||||||
|
-- Set window title to titlestring
|
||||||
|
vim.opt.title = true
|
||||||
|
|
||||||
|
-- Don't show mode in command line
|
||||||
|
vim.opt.showmode = false
|
||||||
|
|
||||||
-- Enable line numbers & use relative line number for current line
|
-- Enable line numbers & use relative line number for current line
|
||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
vim.opt.relativenumber = true
|
vim.opt.relativenumber = true
|
||||||
|
|
||||||
-- Always display the sign column
|
-- Turn backup off
|
||||||
vim.opt.signcolumn = 'yes'
|
vim.opt.backup = false
|
||||||
vim.opt.sidescrolloff = 5
|
vim.opt.swapfile = false
|
||||||
vim.opt.list = true
|
|
||||||
vim.opt.listchars = 'nbsp:⦸,trail:·,tab:▹┄,extends:»,precedes:«'
|
|
||||||
vim.opt.wrap = true
|
|
||||||
vim.opt.linebreak = true
|
|
||||||
vim.opt.showbreak = '↳ '
|
|
||||||
vim.opt.showmode = false
|
|
||||||
vim.opt.writebackup = false
|
vim.opt.writebackup = false
|
||||||
|
|
||||||
|
-- Highlight search matches & show search matches while typing
|
||||||
vim.opt.hlsearch = true
|
vim.opt.hlsearch = true
|
||||||
vim.opt.incsearch = true
|
vim.opt.incsearch = true
|
||||||
|
-- Set ignore search case unless mixed
|
||||||
|
vim.opt.ignorecase = true
|
||||||
|
vim.opt.smartcase = true
|
||||||
|
-- Don't ignore case in command line file completions
|
||||||
vim.opt.fileignorecase = false
|
vim.opt.fileignorecase = false
|
||||||
|
|
||||||
|
-- Allow buffers with changes to be hidden
|
||||||
vim.opt.hidden = true
|
vim.opt.hidden = true
|
||||||
|
|
||||||
|
-- Open new splits on the other side of the axis
|
||||||
vim.opt.splitbelow = true
|
vim.opt.splitbelow = true
|
||||||
vim.opt.splitright = true
|
vim.opt.splitright = true
|
||||||
|
|
||||||
|
-- Use existing windows and tabs when jumping to errors
|
||||||
vim.opt.switchbuf = 'usetab'
|
vim.opt.switchbuf = 'usetab'
|
||||||
|
|
||||||
|
-- Automatically write changes to files
|
||||||
vim.opt.autowrite = true
|
vim.opt.autowrite = true
|
||||||
|
|
||||||
|
-- Don't add 2 spaces after end of sentence
|
||||||
vim.opt.joinspaces = false
|
vim.opt.joinspaces = false
|
||||||
|
|
||||||
|
-- Enable all mouse features
|
||||||
vim.opt.mouse = 'a'
|
vim.opt.mouse = 'a'
|
||||||
|
|
||||||
-- Use 2 space tabs by default
|
-- Always display the sign column
|
||||||
|
vim.opt.signcolumn = 'yes'
|
||||||
|
|
||||||
|
-- When in diff mode, use the patience algorithm for more readable diffs
|
||||||
|
-- FIXME: vim.opt.diffopt = vim.opt.diffopt .. ',algorithm:patience'
|
||||||
|
|
||||||
|
-- Insert spaces when <Tab> is pressed in insert mode
|
||||||
vim.opt.expandtab = true
|
vim.opt.expandtab = true
|
||||||
|
|
||||||
|
-- Use 2 space tabs by default
|
||||||
vim.opt.shiftwidth = 2
|
vim.opt.shiftwidth = 2
|
||||||
vim.opt.softtabstop = 2
|
vim.opt.softtabstop = 2
|
||||||
vim.opt.smartindent = true
|
|
||||||
vim.opt.cinoptions = 'N-sE-sg1h1l1(0,W4i2'
|
|
||||||
|
|
||||||
-- Disable unused providers
|
-- Do smart autoindenting when starting a new line
|
||||||
vim.g.loaded_node_provider = 0
|
vim.opt.smartindent = true
|
||||||
vim.g.loaded_perl_provider = 0
|
|
||||||
vim.g.loaded_ruby_provider = 0
|
-- Customize how re-indented lines behave a C language files
|
||||||
|
-- N-s - don't indent inside C++ namespace
|
||||||
|
-- E-s - don't indent inside C++ extern "C"
|
||||||
|
-- g1 - indent scope declarations {public,private,protected} 1 space
|
||||||
|
-- h1 - indent statements after scope declarations 1 space more
|
||||||
|
-- l1 - indent case statement scopes with the case label
|
||||||
|
-- (0,W4 - indent inside unclosed parenthesis
|
||||||
|
-- i2 - indent C++ class base declarations and constructor initializers
|
||||||
|
vim.opt.cinoptions = 'N-sE-sg1h1l1(0,W4i2'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user