Add neovim config
This commit is contained in:
47
nvim/lua/config/options.lua
Normal file
47
nvim/lua/config/options.lua
Normal file
@@ -0,0 +1,47 @@
|
||||
-- Explorer tree style
|
||||
vim.cmd("let g:netrw_liststyle = 3")
|
||||
|
||||
-- Theme
|
||||
|
||||
local opt = vim.opt
|
||||
|
||||
-- Show string numbers relative to cursor position
|
||||
opt.relativenumber = true
|
||||
-- Show string numper of cursor position
|
||||
opt.number = true
|
||||
|
||||
-- tabs & idents
|
||||
opt.tabstop = 2 -- 2 spaces for tab
|
||||
opt.shiftwidth = 2 -- 2 spaces for ident
|
||||
opt.expandtab = true -- expand tab to spaces
|
||||
opt.autoindent = true -- save indent when start new line
|
||||
|
||||
-- Wrap long strings to fit screen size
|
||||
opt.wrap = true
|
||||
|
||||
-- search
|
||||
opt.ignorecase = true -- ignore case
|
||||
opt.smartcase = true -- case-sensitive when mixed case in search
|
||||
|
||||
-- highlite line with cursor
|
||||
-- opt.cursorline = true
|
||||
|
||||
-- turn on terminal colors
|
||||
opt.termguicolors = true
|
||||
opt.background = "dark"
|
||||
opt.signcolumn = "yes"
|
||||
|
||||
-- backspace
|
||||
opt.backspace = "indent,eol,start" -- allow backspace on indent, end of line or insert mode start position
|
||||
|
||||
-- clipboard
|
||||
opt.clipboard:append("unnamedplus") -- use system clipboard as default register
|
||||
|
||||
-- split windows
|
||||
opt.splitright = true -- split vertical window to the right
|
||||
opt.splitbelow = true -- split horizontal window to the bottom
|
||||
|
||||
-- turn off swapfile
|
||||
opt.swapfile = false
|
||||
|
||||
-- opt.messagesopt = "wait:10000,history:50"
|
||||
Reference in New Issue
Block a user